{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/quickbooks/json-schema/quickbooks-invoiceresponse-schema.json",
  "title": "invoiceresponse",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/quickbooks-online-accounting-openapi-generated.yml#/components/schemas/invoiceresponse",
  "type": "object",
  "properties": {
    "TxnDate": {
      "type": "string",
      "format": "date",
      "description": "The date entered by the user when this transaction occurred. yyyy/MM/dd is the valid date format.\nFor posting transactions, this is the posting date that affects the financial statements. If the date is not supplied, the current date on the server is used.\nSort order is ASC by default.",
      "x-intuit-required": "Optional",
      "x-intuit-default": "current server date",
      "x-intuit-filterable": true,
      "x-intuit-sortable": true
    },
    "ShipFromAddr": {
      "allOf": [
        {
          "$ref": "#/$defs/physicaladdress"
        }
      ],
      "description": "Identifies the address where the goods are shipped from. For transactions without shipping, it represents the address where the sale took place.\nIf automated sales tax is enabled (Preferences.TaxPrefs.PartnerTaxEnabled is set to true) and automated tax calculations are being used, this field is required for an accurate sales tax calculation.\nFor international addresses - countries should be passed as 3 ISO alpha-3 characters or the full name of the country. \n If a physical address is updated from within the transaction object, the QuickBooks Online API flows individual address components differently into the Line elements of the transaction response then when the transaction was first created:Line1 and Line2 elements are populated with the customer name and company name.\nOriginal Line1 through Line 5 contents, City, SubDivisionCode, and PostalCode flow into Line3 through Line5as a free format strings.",
      "x-intuit-required": "Conditionally required"
    },
    "CurrencyRef": {
      "type": "object",
      "x-intuit-type": "CurrencyRefType",
      "description": "Reference to the currency in which all amounts on the associated transaction are expressed. This must be defined if multicurrency is enabled for the company.\nMulticurrency is enabled for the company if Preferences.MultiCurrencyEnabled is set to true. Read more about multicurrency support here. Applicable if multicurrency is enabled for the company.",
      "x-intuit-required": "Conditionally required"
    },
    "HomeBalance": {
      "type": "number",
      "description": "Convenience field containing the amount in Balance expressed in terms of the home currency. Calculated by QuickBooks business logic.\nValue is valid only when CurrencyRef is specified. Applicable if multicurrency is enabled for the company."
    },
    "ShipDate": {
      "type": "string",
      "format": "date",
      "description": "Date for delivery of goods or services.",
      "x-intuit-required": "Optional"
    },
    "TrackingNum": {
      "type": "string",
      "description": "Shipping provider's tracking number for the delivery of the goods associated with the transaction.",
      "x-intuit-required": "Optional"
    },
    "ClassRef": {
      "allOf": [
        {
          "$ref": "#/$defs/referencetype"
        }
      ],
      "description": "Reference to the Class associated with the transaction. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerTxn is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.",
      "x-intuit-required": "Optional"
    },
    "PrintStatus": {
      "type": "string",
      "description": "Printing status of the invoice.\nValid values:\nNotSet,\nNeedToPrint,\nPrintComplete\n.",
      "x-intuit-required": "Optional",
      "x-intuit-default": "<span class=\"literal\">NotSet</span>"
    },
    "EmailStatus": {
      "type": "string",
      "description": "Email status of the invoice.\nValid values:\nNotSet,\nNeedToSend,\nEmailSent",
      "x-intuit-required": "Optional",
      "x-intuit-default": "<span class=\"literal\">NotSet</span>"
    },
    "SalesTermRef": {
      "allOf": [
        {
          "$ref": "#/$defs/referencetype"
        }
      ],
      "description": "Reference to the sales term associated with the transaction. Query the Term name list resource to determine the appropriate Term object for this reference. Use Term.Id and Term.Name from that object for SalesTermRef.value and SalesTermRef.name, respectively.",
      "x-intuit-required": "Optional",
      "x-intuit-filterable": true
    },
    "DeliveryInfo": {
      "allOf": [
        {
          "$ref": "#/$defs/deliveryinfo"
        }
      ],
      "description": "Email delivery information. Returned when a request has been made to deliver email with the send operation."
    },
    "TxnSource": {
      "type": "string",
      "description": "Used internally to specify originating source of a credit card transaction.",
      "x-intuit-required": "Optional"
    },
    "LinkedTxn": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/linkedtxn"
      },
      "description": "Zero or more related transactions to this Invoice object. The following linked relationships are supported:\nLinks to Estimate and TimeActivity objects can be established directly to this Invoice object with UI or with the API. Create, Read, Update, and Query operations are avaialble at the API level for these types of links.\n\nOnly one link can be made to an Estimate. Progress Invoicing is not supported via the API. \n\nLinks to expenses incurred on behalf of the customer are returned in the response with LinkedTxn.TxnType set to ReimburseCharge, ChargeCredit or StatementCharge corresponding to billable customer expenses of type Cash, Delayed Credit, and Delayed Charge, respectively. Links to these types of transactions are established within the QuickBooks UI, only, and are available as read-only at the API level.\n\nLinks to payments applied to an Invoice object are returned in the response with LinkedTxn.TxnType set to Payment. Links to Payment transactions are established within the QuickBooks UI, only, and are available as read-only at the API level.\n\nUse LinkedTxn.TxnId as the ID in a separate read request for the specific resource to retrieve details of the linked object.",
      "x-intuit-required": "Optional"
    },
    "DepositToAccountRef": {
      "allOf": [
        {
          "$ref": "#/$defs/referencetype"
        }
      ],
      "description": "Account to which money is deposited. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType is Other Current Asset or Bank. Use Account.Id and Account.Name from that object for DepositToAccountRef.value and DepositToAccountRef.name, respectively.\n\nBefore you can use this field ensure that the company allows deposits in their invoices first. This can be found by querying the Preferences endpoint.  SalesFormsPrefs.AllowDeposit must be equal to true. If you do not specify this account the payment is applied to the Undeposited Funds account.",
      "x-intuit-required": "Optional"
    },
    "GlobalTaxCalculation": {
      "type": "string",
      "description": "Method in which tax is applied. Allowed values are:\nTaxExcluded,\nTaxInclusive, and\nNotApplicable. Not applicable to US companies; required for non-US companies.",
      "x-intuit-required": "Conditionally required",
      "x-intuit-default": "<span class=\"literal\">TaxExcluded</span>"
    },
    "TotalAmt": {
      "type": "number",
      "description": "Indicates the total amount of the transaction. This includes the total of all the charges, allowances, and taxes. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks."
    },
    "AllowOnlineAffirmPayment": {
      "type": "boolean",
      "description": "Specifies if online Affirm payments are allowed for this invoice and corresponds to the Affirm check box on the QuickBooks UI. Active when the company is payments-enabled, i.e., Preferences.SalesFormsPrefs.ETransactionPaymentEnabled is set to true and the company has been onboarded for Affirm with an ACTIVE subscription status.\nIf set to true, allow invoice to be paid with online Affirm payments. The Affirm check box is checked on the QuickBooks UI for this invoice. True by default if the company allows invoices to be paid with Affirm.\n\nIf set to false, online Affirm payments are not allowed. The Affirm check box is not checked on the QuickBooks UI for this invoice.\n\nDefaults to the active subscription status. If a value is explicitly sent, that value is used. If no value is sent, the default value is used.",
      "x-intuit-required": "Optional",
      "x-intuit-default": "<span class=\"literal\">false</span>"
    },
    "InvoiceLink": {
      "type": "string",
      "description": "Sharable link for the invoice sent to external customers. The link is generated only for invoices with online payment enabled and having a valid customer email address. Include query param `include=invoiceLink` to get the link back on query response."
    },
    "AllowOnlineACHPayment": {
      "type": "boolean",
      "description": "Specifies if this invoice can be paid with online bank transfers and corresponds to the Bank transfer check box on the QuickBooks UI. Active when the company is payments-enabled, i.e., Preferences.SalesFormsPrefs.ETransactionPaymentEnabled is set to true.\nIf set to true, allow invoice to be paid with online bank transfers. The Bank transfer check box is checked on the QuickBooks UI for this invoice. True by default if the company allows invoices to be paid with ACH.\n\nIf set to false, online bank transfers are not allowed. The Bank transfer check box is not checked on the QuickBooks UI for this invoice.",
      "x-intuit-required": "Optional",
      "x-intuit-default": "<span class=\"literal\">false</span>"
    },
    "TransactionLocationType": {
      "type": "string",
      "description": "The account location. For UAE, valid values include ABUDHABI\n\nAJMAN\n\nSHARJAH\n\nDUBAI\n\nFUJAIRAH\n\nRAS_AL_KHAIMAH\n\nUMM_AL_QUWAIN\n\nOTHER_GCC",
      "x-intuit-required": "Optional"
    },
    "DueDate": {
      "type": "string",
      "format": "date",
      "description": "Date when the payment of the transaction is due. If date is not provided, the number of days specified in\nSalesTermRef added the transaction date will be used.",
      "x-intuit-required": "Optional",
      "x-intuit-filterable": true,
      "x-intuit-sortable": true
    },
    "MetaData": {
      "allOf": [
        {
          "$ref": "#/$defs/modificationmetadata"
        }
      ],
      "description": "Descriptive information about the object. The MetaData values are set by Data Services and are read only for all applications.",
      "x-intuit-required": "Optional"
    },
    "DocNumber": {
      "type": "string",
      "description": "Reference number for the transaction. If not explicitly provided at create time, this field is populated based on the setting of Preferences:CustomTxnNumber as follows:\nIf Preferences:CustomTxnNumber is true a custom value can be provided. If no value is supplied, the resulting DocNumber is null.\n\nIf Preferences:CustomTxnNumber is false, resulting DocNumber is system generated by incrementing the last number by 1.\n\nIf Preferences:CustomTxnNumber is false then do not send a value as it can lead to unwanted duplicates. If a DocNumber value is sent for an Update operation, then it just updates that particular invoice and does not alter the internal system DocNumber. \nNote: DocNumber is an optional field for all locales except France. For France locale if Preferences:CustomTxnNumber is enabled it will not be automatically generated and is a required field. If a duplicate DocNumber needs to be supplied, add the query parameter name/value pair, include=allowduplicatedocnum to the URI.",
      "x-intuit-required": "Conditionally required",
      "x-intuit-filterable": true,
      "x-intuit-sortable": true
    },
    "PrivateNote": {
      "type": "string",
      "description": "User entered, organization-private note about the transaction. This note does not appear on the invoice to the customer. This field maps to the Statement Memo field on the Invoice form in the QuickBooks Online UI.",
      "x-intuit-required": "Optional"
    },
    "RecurDataRef": {
      "allOf": [
        {
          "$ref": "#/$defs/referencetype"
        }
      ],
      "description": "A reference to the Recurring Transaction. It captures what recurring transaction template the Invoice was created from."
    },
    "Line": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/line"
      },
      "description": "Individual line items of a transaction. Valid Line types include \nSalesItemLine,\nGroupLine,\nDescriptionOnlyLine (also used for inline Subtotal lines),\nDiscountLine and \nSubTotalLine (used for the overall transaction). If the transaction is taxable there is a limit of 750 lines per transaction.",
      "x-intuit-required": "Required"
    },
    "BillEmailCc": {
      "allOf": [
        {
          "$ref": "#/$defs/emailaddress"
        }
      ],
      "description": "Identifies the carbon copy e-mail address where the invoice is sent. If not specified, this field is populated from that defined in Preferences.SalesFormsPrefs.SalesEmailCc. If this email address is invalid, carbon copy email is not sent.",
      "x-intuit-required": "Optional"
    },
    "CustomerMemo": {
      "allOf": [
        {
          "$ref": "#/$defs/memoref"
        }
      ],
      "description": "User-entered message to the customer; this message is visible to end user on their transactions.",
      "x-intuit-required": "Optional"
    },
    "AllowOnlinePayPalPayment": {
      "type": "boolean",
      "description": "Specifies if online PayPal/Venmo payments are allowed for this invoice and corresponds to the PayPal check box on the QuickBooks UI. Active when the company is payments-enabled, i.e., Preferences.SalesFormsPrefs.ETransactionPaymentEnabled is set to true and the company has been onboarded for PayPal with an ACTIVE subscription status.\nIf set to true, allow invoice to be paid with online PayPal payments. The PayPal check box is checked on the QuickBooks UI for this invoice. True by default if the company allows invoices to be paid with PayPal.\n\nIf set to false, online PayPal payments are not allowed. The PayPal check box is not checked on the QuickBooks UI for this invoice.\n\nDefaults to the active subscription status. If a value is explicitly sent, that value is used. If no value is sent, the default value is used.",
      "x-intuit-required": "Optional",
      "x-intuit-default": "<span class=\"literal\">false</span>"
    },
    "ProjectRef": {
      "allOf": [
        {
          "$ref": "#/$defs/referencetype"
        }
      ],
      "description": "Reference to the Project ID associated with this transaction.",
      "x-intuit-required": "Conditionally required",
      "x-intuit-filterable": true
    },
    "ExchangeRate": {
      "type": "number",
      "description": "The number of home currency units it takes to equal one unit of currency specified by CurrencyRef. Applicable if multicurrency is enabled for the company.",
      "x-intuit-required": "Optional",
      "x-intuit-default": "1"
    },
    "TaxExemptionRef": {
      "allOf": [
        {
          "$ref": "#/$defs/referencetype"
        }
      ],
      "description": "Reference to the TaxExepmtion ID associated with this object. Available for companies that have automated sales tax enabled.\nTaxExemptionRef.Name: The Tax Exemption Id for the customer to which this object is associated. This Id is typically issued by the state.\n\nTaxExemptionRef.value: The system-generated Id of the exemption type.\n\n For internal use only"
    },
    "Deposit": {
      "type": "number",
      "description": "The deposit made towards this invoice.",
      "x-intuit-required": "Optional"
    },
    "Balance": {
      "type": "number",
      "description": "The balance reflecting any payments made against the transaction. Initially set to the value of\nTotalAmt. A Balance of 0 indicates the invoice is fully paid. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks. If you process a linked transaction against a specific transaction, the \nbalance value won't change. It will remain the same.",
      "x-intuit-filterable": true,
      "x-intuit-sortable": true
    },
    "CustomerRef": {
      "allOf": [
        {
          "$ref": "#/$defs/referencetype"
        }
      ],
      "description": "Reference to a customer or job. Query the Customer name list resource to determine the appropriate Customer object for this reference. Use Customer.Id and Customer.DisplayName from that object for CustomerRef.value and CustomerRef.name, respectively.",
      "x-intuit-required": "Required",
      "x-intuit-filterable": true
    },
    "TxnTaxDetail": {
      "allOf": [
        {
          "$ref": "#/$defs/txntaxdetail"
        }
      ],
      "description": "This data type provides information for taxes charged on the transaction as a whole. It captures the details sales taxes calculated for the transaction based on the tax codes referenced by the transaction. This can be calculated by QuickBooks business logic or you may supply it when adding a transaction. See Global tax model for more information about this element.\n\nIf sales tax is disabled (Preferences.TaxPrefs.UsingSalesTax is set to false) then TxnTaxDetail is ignored and not stored.",
      "x-intuit-required": "Optional"
    },
    "AllowOnlineCreditCardPayment": {
      "type": "boolean",
      "description": "Specifies if online credit card payments are allowed for this invoice and corresponds to the Credit card check box on the QuickBooks UI. Active when the company is payments-enabled, i.e., Preferences.SalesFormsPrefs.ETransactionPaymentEnabled is set to true.\nIf set to true, allow invoice to be paid with online credit card payments. The Credit card check box is checked on the QuickBooks UI for this invoice. True by default if the company allows invoices to be paid with credit cards.\n\nIf set to false, online credit card payments are not allowed. The Credit card check box is not checked on the QuickBooks UI for this invoice.",
      "x-intuit-required": "Optional",
      "x-intuit-default": "<span class=\"literal\">false</span>"
    },
    "SyncToken": {
      "type": "string",
      "description": "Version number of the object. It is used to lock an object for use by one app at a time. As soon as an application modifies an object, its SyncToken is incremented. Attempts to modify an object specifying an older SyncToken fails. Only the latest version of the object is maintained by QuickBooks Online.",
      "x-intuit-required": "Required for update"
    },
    "CustomField": {
      "allOf": [
        {
          "$ref": "#/$defs/customfield"
        }
      ],
      "description": "One of, up to three custom fields for the transaction. Available for custom fields so configured for the company. Check Preferences.SalesFormsPrefs.CustomField and Preferences.VendorAndPurchasesPrefs.POCustomField for custom fields currenly configured. Click here to learn about managing custom fields.",
      "x-intuit-required": "Optional"
    },
    "ShipAddr": {
      "allOf": [
        {
          "$ref": "#/$defs/physicaladdress"
        }
      ],
      "description": "Identifies the address where the goods must be shipped. If\nShipAddris not specified, and a default\nCustomer:ShippingAddr is specified in QuickBooks for this customer, the default ship-to address will be used by QuickBooks. \n For international addresses - countries should be passed as 3 ISO alpha-3 characters or the full name of the country. \n If a physical address is updated from within the transaction object, the QuickBooks Online API flows individual address components differently into the Line elements of the transaction response then when the transaction was first created:Line1 and Line2 elements are populated with the customer name and company name.\nOriginal Line1 through Line 5 contents, City, SubDivisionCode, and PostalCode flow into Line3 through Line5as a free format strings.",
      "x-intuit-required": "Optional"
    },
    "HomeTotalAmt": {
      "type": "number",
      "description": "Total amount of the transaction in the home currency. Includes the total of all the charges, allowances and taxes. Calculated by QuickBooks business logic.\nValue is valid only when CurrencyRef is specified. Applicable if multicurrency is enabled for the company."
    },
    "DepartmentRef": {
      "allOf": [
        {
          "$ref": "#/$defs/referencetype"
        }
      ],
      "description": "A reference to a Department object specifying the location of the transaction. Available if Preferences.AccountingInfoPrefs.TrackDepartments is set to true.\n\nQuery the Department name list resource to determine the appropriate department object for this reference. Use Department.Id and Department.Name from that object for DepartmentRef.value and DepartmentRef.name, respectively.",
      "x-intuit-required": "Optional"
    },
    "BillEmailBcc": {
      "allOf": [
        {
          "$ref": "#/$defs/emailaddress"
        }
      ],
      "description": "Identifies the blind carbon copy e-mail address where the invoice is sent. If not specified, this field is populated from that defined in Preferences.SalesFormsPrefs.SalesEmailBcc. If this email address is invalid, blind carbon copy email is not sent.",
      "x-intuit-required": "Optional"
    },
    "ShipMethodRef": {
      "allOf": [
        {
          "$ref": "#/$defs/referencetype"
        }
      ],
      "description": "Reference to the ShipMethod associated with the transaction. There is no shipping method list. Reference resolves to a string. Reference to the ShipMethod associated with the transaction. There is no shipping method list. Reference resolves to a string.",
      "x-intuit-required": "Optional"
    },
    "BillAddr": {
      "allOf": [
        {
          "$ref": "#/$defs/physicaladdress"
        }
      ],
      "description": "Bill-to address of the Invoice. If\nBillAddris not specified, and a default\nCustomer:BillingAddr is specified in QuickBooks for this customer, the default bill-to address is used by QuickBooks. \n For international addresses - countries should be passed as 3 ISO alpha-3 characters or the full name of the country. \n If a physical address is updated from within the transaction object, the QuickBooks Online API flows individual address components differently into the Line elements of the transaction response then when the transaction was first created:Line1 and Line2 elements are populated with the customer name and company name.\nOriginal Line1 through Line 5 contents, City, SubDivisionCode, and PostalCode flow into Line3 through Line5as a free format strings.\n\nIf you update the CustomerRef, the address passed using BillAddr will be honored.",
      "x-intuit-required": "Optional"
    },
    "FreeFormAddress": {
      "type": "boolean",
      "description": "Denotes how ShipAddr is stored: formatted or unformatted. The value of this flag is system defined based on format of shipping address at object create time.If set to false, shipping address is returned in a formatted style using City, Country, CountrySubDivisionCode, Postal code.\nIf set to true, shipping address is returned in an unformatted style using Line1 through Line5 attributes."
    },
    "ApplyTaxAfterDiscount": {
      "type": "boolean",
      "description": "If false or null, calculate the sales tax first, and then apply the discount. If true, subtract the discount first and then calculate the sales tax.",
      "x-intuit-required": "Optional",
      "x-intuit-default": "false"
    },
    "BillEmail": {
      "allOf": [
        {
          "$ref": "#/$defs/emailaddress"
        }
      ],
      "description": "Identifies the e-mail address where the invoice is sent. If\nEmailStatus=NeedToSend,\nBillEmailis a required input.",
      "x-intuit-required": "Conditionally required"
    },
    "Id": {
      "type": "string",
      "description": "Unique identifier for this object.",
      "x-intuit-required": "Required for update",
      "x-intuit-filterable": true
    },
    "AllowOnlinePayment": {
      "type": "boolean",
      "description": "Deprecated flag to allow online payments. In use before AllowOnlineCreditCardPayment and AllowOnlineACHPayment flags existed and provided to maintain backward compatibility.\nIf set to true, this invoice was created before AllowOnlinePayment was deprecated and denotes both CC and ACH payments are allowed. In addition, the AllowOnlineCreditCardPayment and AllowOnlineACHPayment flags must be set to true.\n\nIf set to false, this invoice was created after the AllowOnlinePayment flag was deprecated and is not used.\n\n Do not modify."
    },
    "AllowIPNPayment": {
      "type": "boolean",
      "description": "Flag to allow payments from legacy Intuit Payment Network (IPN). Provided to maintain backward compatibility and must always be set to false. Do not modify"
    }
  },
  "required": [
    "CustomerRef",
    "Line"
  ],
  "$defs": {
    "customfield": {
      "type": "object",
      "title": "customfield",
      "properties": {
        "DefinitionId": {
          "type": "string",
          "description": "Unique identifier of the CustomFieldDefinition that corresponds to this CustomField.",
          "x-intuit-required": "Required"
        },
        "StringValue": {
          "type": "string",
          "description": "The value for the\nStringTypecustom field.",
          "x-intuit-required": "Optional"
        },
        "Type": {
          "type": "string",
          "description": "Data type of custom field. Only one type is currently supported:\nStringType."
        },
        "Name": {
          "type": "string",
          "description": "Name of the custom field.",
          "x-intuit-required": "Optional"
        }
      },
      "required": [
        "DefinitionId"
      ]
    },
    "deliveryinfo": {
      "type": "object",
      "title": "deliveryinfo",
      "properties": {
        "DeliveryType": {
          "type": "string",
          "description": "Type of the delivery. Used to confirm that email has been sent via the send operation.\n Valid values currently include: Email."
        },
        "DeliveryTime": {
          "type": "string",
          "format": "date-time",
          "description": "Delivery date and time."
        }
      }
    },
    "emailaddress": {
      "type": "object",
      "title": "emailaddress",
      "properties": {
        "Address": {
          "type": "string",
          "description": "An email address. The address format must follow the RFC 822 standard.",
          "x-intuit-required": "Optional"
        }
      }
    },
    "line": {
      "type": "object",
      "title": "line",
      "properties": {
        "Received": {
          "type": "string",
          "description": "Supported for Purchase Order only. The amount/quantity received of the line, which depends on the type of the line. It can represent the received amount or received quantity based on the line type detail. Applies to existing and new entities."
        },
        "LinkedTxn": {
          "type": "array",
          "items": {},
          "description": "Transaction to which the current entity is related. For example, an invoice line may link to a sales order or estimate.",
          "x-intuit-required": "Optional"
        },
        "Description": {
          "type": "string",
          "description": "Free form text description of the line item that appears in the printed record.",
          "x-intuit-required": "Optional"
        },
        "ProjectRef": {
          "allOf": [
            {
              "$ref": "#/$defs/referencetype"
            }
          ],
          "description": "Reference to the Project ID associated with this transaction.",
          "x-intuit-required": "Conditionally required"
        },
        "LineNum": {
          "type": "number",
          "description": "Specifies the position of the line in the collection of transaction lines. Positive integer",
          "x-intuit-required": "Optional"
        },
        "Amount": {
          "type": "number",
          "description": "The amount of the line item.",
          "x-intuit-required": "Required"
        },
        "Id": {
          "type": "string",
          "description": "The Id of the line item. Its use in requests is as folllows:\nIf\nIdis greater than zero and exists for the company, the request is considered an update operation for a line item.\n\nIf no\nIdis provided, the\nIdprovided is less than or equal to zero, or the\nIdprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.\n\nAvailable in all objects that use lines and support the update operation.",
          "x-intuit-required": "Required for update"
        }
      },
      "required": [
        "Amount"
      ]
    },
    "linkedtxn": {
      "type": "object",
      "title": "linkedtxn",
      "properties": {
        "TxnLineId": {
          "type": "string",
          "description": "Required for Deposit and Bill entities. The line number of a specific line of the linked transaction. If supplied, the\nTxnId and\nTxnType attributes of the linked transaction must also be populated.",
          "x-intuit-required": "Conditionally required"
        },
        "TxnId": {
          "type": "string",
          "description": "Transaction Id of the related transaction.",
          "x-intuit-required": "Required"
        },
        "TxnType": {
          "type": "string",
          "description": "Transaction type of the linked object.",
          "x-intuit-required": "Required"
        }
      },
      "required": [
        "TxnId",
        "TxnType"
      ]
    },
    "memoref": {
      "type": "object",
      "title": "memoref",
      "properties": {
        "value": {
          "type": "string",
          "description": "User-entered message to the customer; this message is visible to the end user on their transactions.",
          "x-intuit-required": "Required"
        }
      },
      "required": [
        "value"
      ]
    },
    "modificationmetadata": {
      "type": "object",
      "title": "modificationmetadata",
      "properties": {
        "CreateTime": {
          "type": "string",
          "format": "date-time",
          "description": "Time the entity was created in the source domain.",
          "x-intuit-filterable": true,
          "x-intuit-sortable": true
        },
        "LastUpdatedTime": {
          "type": "string",
          "format": "date-time",
          "description": "Time the entity was last updated in the source domain.",
          "x-intuit-filterable": true,
          "x-intuit-sortable": true
        }
      }
    },
    "physicaladdress": {
      "type": "object",
      "title": "physicaladdress",
      "properties": {
        "City": {
          "type": "string",
          "description": "City name.",
          "x-intuit-required": "Optional"
        },
        "Country": {
          "type": "string",
          "description": "For international addresses, the request can be an ISO alpha-3 code or the full name of the country. The response for update and read operations returns ISO alpha-3 country codes only.",
          "x-intuit-required": "Optional"
        },
        "Line5": {
          "type": "string",
          "description": "Fifth line of the address.",
          "x-intuit-required": "Optional"
        },
        "Line4": {
          "type": "string",
          "description": "Fourth line of the address.",
          "x-intuit-required": "Optional"
        },
        "Line3": {
          "type": "string",
          "description": "Third line of the address.",
          "x-intuit-required": "Optional"
        },
        "Line2": {
          "type": "string",
          "description": "Second line of the address.",
          "x-intuit-required": "Optional"
        },
        "Line1": {
          "type": "string",
          "description": "First line of the address.",
          "x-intuit-required": "Optional"
        },
        "PostalCode": {
          "type": "string",
          "description": "Postal code. For example, zip code for USA and Canada",
          "x-intuit-required": "Optional"
        },
        "CountrySubDivisionCode": {
          "type": "string",
          "description": "Region within a country. For example, state name for USA, province name for Canada.",
          "x-intuit-required": "Optional"
        },
        "Id": {
          "type": "string",
          "description": "Unique identifier of the QuickBooks object for the address, autoincremented when the address is changed. This is an internal value included for backwards compatibility and can be ignored.",
          "x-intuit-required": "Required for update"
        }
      }
    },
    "referencetype": {
      "type": "object",
      "title": "referencetype",
      "properties": {
        "name": {
          "type": "string",
          "description": "An identifying name for the object being referenced by value and is derived from the field that holds the common name of that object. This varies by context and specific type of object referenced. For example, references to a Customer object use Customer.DisplayName to populate this field. Optionally returned in responses, implementation dependent.",
          "x-intuit-required": "Optional"
        },
        "value": {
          "type": "string",
          "description": "The ID for the referenced object as found in the Id field of the object payload. The context is set by the type of reference and is specific to the QuickBooks company file.",
          "x-intuit-required": "Required"
        }
      },
      "required": [
        "value"
      ]
    },
    "txntaxdetail": {
      "type": "object",
      "title": "txntaxdetail",
      "properties": {
        "TxnTaxCodeRef": {
          "allOf": [
            {
              "$ref": "#/$defs/referencetype"
            }
          ],
          "description": "Reference to the transaction tax code. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively. If specified and sales tax is disabled (Preferences.TaxPrefs.UsingSalesTax is set to false), this element is ignored and not returned. For sales transactions, only: if automated sales tax is enabled (Preferences.TaxPrefs.PartnerTaxEnabled is set to true) the supplied transaction tax code is replaced by the automated sales tax engine recommendation.",
          "x-intuit-required": "Optional"
        },
        "TotalTax": {
          "type": "number",
          "description": "Total tax calculated for the transaction, excluding any tax lines manually inserted into the transaction line list.",
          "x-intuit-required": "Optional"
        },
        "TaxLine": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/line"
          },
          "x-intuit-required": "Optional"
        }
      }
    }
  }
}