{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/fis/main/json-schema/fis-push-estimate-v1-response-dto-schema.json",
  "title": "PushEstimateV1ResponseDto",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fis-estimate-api-openapi.yml#/components/schemas/PushEstimateV1ResponseDto",
  "type": "object",
  "properties": {
    "pushCommunicationId": {
      "type": "string",
      "readOnly": true
    },
    "requestedOn": {
      "type": "string",
      "readOnly": true,
      "format": "date-time"
    },
    "status": {
      "type": "string",
      "readOnly": true,
      "enum": [
        "success",
        "failed",
        "pending"
      ]
    },
    "businessName": {
      "type": "string",
      "readOnly": true
    },
    "serviceName": {
      "type": "string",
      "readOnly": true,
      "enum": [
        "freshbooks",
        "quickbooks",
        "quickbooksDesktop",
        "xero",
        "oracleNetsuite",
        "sageBusinessCloud",
        "sageIntacct",
        "dynamicsBusinessCentral",
        "dynamics365Finance",
        "wave",
        "myob",
        "zohoBooks",
        "byod"
      ]
    },
    "data": {
      "readOnly": true,
      "allOf": [
        {
          "$ref": "#/$defs/PushEstimateV1"
        }
      ]
    }
  },
  "required": [
    "pushCommunicationId",
    "requestedOn",
    "status",
    "businessName",
    "serviceName",
    "data"
  ],
  "$defs": {
    "EstimateLineV1": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string",
          "maxLength": 4000
        },
        "quantity": {
          "type": "number",
          "format": "float"
        },
        "unitAmount": {
          "type": "number",
          "format": "float"
        },
        "discountPercentage": {
          "type": "number",
          "format": "float"
        },
        "subTotal": {
          "type": "number",
          "deprecated": true,
          "format": "float"
        },
        "taxAmount": {
          "type": "number",
          "format": "float"
        },
        "totalAmount": {
          "type": "number",
          "deprecated": true,
          "format": "float"
        },
        "accountRef": {
          "type": "string"
        },
        "taxRef": {
          "type": "string"
        },
        "inventoryRef": {
          "type": "string"
        }
      }
    },
    "PushEstimateV1": {
      "type": "object",
      "properties": {
        "passThrough": {
          "type": "object",
          "additionalProperties": true
        },
        "currencyRate": {
          "type": "number"
        },
        "dueDate": {
          "type": "string",
          "format": "date"
        },
        "postedDate": {
          "type": "string",
          "format": "date"
        },
        "acceptedDate": {
          "type": "string",
          "format": "date"
        },
        "expiryDate": {
          "type": "string",
          "format": "date"
        },
        "customerRef": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EstimateLineV1"
          }
        },
        "shipToAddress": {
          "$ref": "#/$defs/ShippingAddressDto"
        },
        "memo": {
          "type": "string",
          "maxLength": 4000
        }
      },
      "required": [
        "customerRef",
        "lines"
      ]
    },
    "ShippingAddressDto": {
      "type": "object",
      "properties": {
        "line1": {
          "type": "string",
          "maxLength": 500
        },
        "line2": {
          "type": "string",
          "maxLength": 500
        },
        "city": {
          "type": "string",
          "maxLength": 255
        },
        "region": {
          "type": "string",
          "maxLength": 255,
          "description": "Region within a country. For example, state name for USA, province name for Canada."
        },
        "country": {
          "type": "string",
          "description": "Country name as 3 ISO alpha-3 characters."
        },
        "postalCode": {
          "type": "string",
          "maxLength": 30,
          "description": "Postal code. For example, zip code for USA and Canada."
        }
      }
    }
  }
}