Xero · Schema

Invoice

AccountingBank FeedsFinanceFinancial ServicesInvoicingPayrollSmall Business

Properties

Name Type Description
Type string See Invoice Types
Contact object
LineItems array See LineItems
Date string Date invoice was issued – YYYY-MM-DD. If the Date element is not specified it will default to the current date based on the timezone setting of the organisation
DueDate string Date invoice is due – YYYY-MM-DD
LineAmountTypes string
InvoiceNumber string ACCREC – Unique alpha numeric code identifying invoice (when missing will auto-generate from your Organisation Invoice Settings) (max length = 255)
Reference string ACCREC only – additional reference number
BrandingThemeID string See BrandingThemes
Url string URL link to a source document – shown as “Go to [appName]” in the Xero app
CurrencyCode string
CurrencyRate number The currency rate for a multicurrency invoice. If no rate is specified, the XE.com day rate is used. (max length = [18].[6])
Status string See Invoice Status Codes
SentToContact boolean Boolean to set whether the invoice in the Xero app should be marked as “sent”. This can be set only on invoices that have been approved
ExpectedPaymentDate string Shown on sales invoices (Accounts Receivable) when this has been set
PlannedPaymentDate string Shown on bills (Accounts Payable) when this has been set
CISDeduction number CIS deduction for UK contractors
CISRate number CIS Deduction rate for the organisation
SubTotal number Total of invoice excluding taxes
TotalTax number Total tax on invoice
Total number Total of Invoice tax inclusive (i.e. SubTotal + TotalTax). This will be ignored if it doesn’t equal the sum of the LineAmounts
TotalDiscount number Total of discounts applied on the invoice line items
InvoiceID string Xero generated unique identifier for invoice
RepeatingInvoiceID string Xero generated unique identifier for repeating invoices
HasAttachments boolean boolean to indicate if an invoice has an attachment
IsDiscounted boolean boolean to indicate if an invoice has a discount
Payments array See Payments
Prepayments array See Prepayments
Overpayments array See Overpayments
AmountDue number Amount remaining to be paid on invoice
AmountPaid number Sum of payments received for invoice
FullyPaidOnDate string The date the invoice was fully paid. Only returned on fully paid invoices
AmountCredited number Sum of all credit notes, over-payments and pre-payments applied to invoice
UpdatedDateUTC string Last modified date UTC format
CreditNotes array Details of credit notes that have been applied to an invoice
Attachments array Displays array of attachments from the API
HasErrors boolean A boolean to indicate if a invoice has an validation errors
StatusAttributeString string A string to indicate if a invoice status
ValidationErrors array Displays array of validation error messages from the API
Warnings array Displays array of warning messages from the API
InvoiceAddresses array An array of addresses used to auto calculate sales tax
View JSON Schema on GitHub

JSON Schema

xero-invoice-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/Invoice",
  "title": "Invoice",
  "externalDocs": {
    "url": "http://developer.xero.com/documentation/api/invoices/"
  },
  "properties": {
    "Type": {
      "description": "See Invoice Types",
      "type": "string",
      "enum": [
        "ACCPAY",
        "ACCPAYCREDIT",
        "APOVERPAYMENT",
        "APPREPAYMENT",
        "ACCREC",
        "ACCRECCREDIT",
        "AROVERPAYMENT",
        "ARPREPAYMENT"
      ]
    },
    "Contact": {
      "$ref": "#/components/schemas/Contact"
    },
    "LineItems": {
      "description": "See LineItems",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/LineItem"
      }
    },
    "Date": {
      "description": "Date invoice was issued \u2013 YYYY-MM-DD. If the Date element is not specified it will default to the current date based on the timezone setting of the organisation",
      "type": "string",
      "x-is-msdate": true
    },
    "DueDate": {
      "description": "Date invoice is due \u2013 YYYY-MM-DD",
      "type": "string",
      "x-is-msdate": true
    },
    "LineAmountTypes": {
      "$ref": "#/components/schemas/LineAmountTypes",
      "type": "string"
    },
    "InvoiceNumber": {
      "description": "ACCREC \u2013 Unique alpha numeric code identifying invoice (when missing will auto-generate from your Organisation Invoice Settings) (max length = 255)",
      "maxLength": 255,
      "type": "string"
    },
    "Reference": {
      "description": "ACCREC only \u2013 additional reference number",
      "type": "string"
    },
    "BrandingThemeID": {
      "description": "See BrandingThemes",
      "type": "string",
      "format": "uuid"
    },
    "Url": {
      "description": "URL link to a source document \u2013 shown as \u201cGo to [appName]\u201d in the Xero app",
      "type": "string"
    },
    "CurrencyCode": {
      "$ref": "#/components/schemas/CurrencyCode",
      "type": "string"
    },
    "CurrencyRate": {
      "description": "The currency rate for a multicurrency invoice. If no rate is specified, the XE.com day rate is used. (max length = [18].[6])",
      "type": "number",
      "format": "double",
      "x-is-money": true
    },
    "Status": {
      "description": "See Invoice Status Codes",
      "type": "string",
      "enum": [
        "DRAFT",
        "SUBMITTED",
        "DELETED",
        "AUTHORISED",
        "PAID",
        "VOIDED"
      ]
    },
    "SentToContact": {
      "description": "Boolean to set whether the invoice in the Xero app should be marked as \u201csent\u201d. This can be set only on invoices that have been approved",
      "type": "boolean"
    },
    "ExpectedPaymentDate": {
      "description": "Shown on sales invoices (Accounts Receivable) when this has been set",
      "type": "string",
      "x-is-msdate": true
    },
    "PlannedPaymentDate": {
      "description": "Shown on bills (Accounts Payable) when this has been set",
      "type": "string",
      "x-is-msdate": true
    },
    "CISDeduction": {
      "description": "CIS deduction for UK contractors",
      "readOnly": true,
      "type": "number",
      "format": "double",
      "x-is-money": true
    },
    "CISRate": {
      "description": "CIS Deduction rate for the organisation",
      "type": "number",
      "format": "double",
      "readOnly": true,
      "x-is-money": true
    },
    "SubTotal": {
      "description": "Total of invoice excluding taxes",
      "readOnly": true,
      "type": "number",
      "format": "double",
      "x-is-money": true
    },
    "TotalTax": {
      "description": "Total tax on invoice",
      "readOnly": true,
      "type": "number",
      "format": "double",
      "x-is-money": true
    },
    "Total": {
      "description": "Total of Invoice tax inclusive (i.e. SubTotal + TotalTax). This will be ignored if it doesn\u2019t equal the sum of the LineAmounts",
      "readOnly": true,
      "type": "number",
      "format": "double",
      "x-is-money": true
    },
    "TotalDiscount": {
      "description": "Total of discounts applied on the invoice line items",
      "readOnly": true,
      "type": "number",
      "format": "double",
      "x-is-money": true
    },
    "InvoiceID": {
      "description": "Xero generated unique identifier for invoice",
      "type": "string",
      "format": "uuid"
    },
    "RepeatingInvoiceID": {
      "description": "Xero generated unique identifier for repeating invoices",
      "type": "string",
      "format": "uuid"
    },
    "HasAttachments": {
      "description": "boolean to indicate if an invoice has an attachment",
      "readOnly": true,
      "type": "boolean",
      "default": "false",
      "example": "false"
    },
    "IsDiscounted": {
      "description": "boolean to indicate if an invoice has a discount",
      "readOnly": true,
      "type": "boolean"
    },
    "Payments": {
      "description": "See Payments",
      "readOnly": true,
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Payment"
      }
    },
    "Prepayments": {
      "description": "See Prepayments",
      "readOnly": true,
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Prepayment"
      }
    },
    "Overpayments": {
      "description": "See Overpayments",
      "readOnly": true,
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Overpayment"
      }
    },
    "AmountDue": {
      "description": "Amount remaining to be paid on invoice",
      "readOnly": true,
      "type": "number",
      "format": "double",
      "x-is-money": true
    },
    "AmountPaid": {
      "description": "Sum of payments received for invoice",
      "readOnly": true,
      "type": "number",
      "format": "double",
      "x-is-money": true
    },
    "FullyPaidOnDate": {
      "description": "The date the invoice was fully paid. Only returned on fully paid invoices",
      "readOnly": true,
      "type": "string",
      "x-is-msdate": true
    },
    "AmountCredited": {
      "description": "Sum of all credit notes, over-payments and pre-payments applied to invoice",
      "readOnly": true,
      "type": "number",
      "format": "double",
      "x-is-money": true
    },
    "UpdatedDateUTC": {
      "description": "Last modified date UTC format",
      "type": "string",
      "x-is-msdate-time": true,
      "example": "/Date(1573755038314)/",
      "readOnly": true
    },
    "CreditNotes": {
      "description": "Details of credit notes that have been applied to an invoice",
      "readOnly": true,
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/CreditNote"
      }
    },
    "Attachments": {
      "description": "Displays array of attachments from the API",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Attachment"
      }
    },
    "HasErrors": {
      "description": "A boolean to indicate if a invoice has an validation errors",
      "type": "boolean",
      "default": "false",
      "example": "false"
    },
    "StatusAttributeString": {
      "description": "A string to indicate if a invoice status",
      "type": "string"
    },
    "ValidationErrors": {
      "description": "Displays array of validation error messages from the API",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ValidationError"
      }
    },
    "Warnings": {
      "description": "Displays array of warning messages from the API",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ValidationError"
      }
    },
    "InvoiceAddresses": {
      "description": "An array of addresses used to auto calculate sales tax",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/InvoiceAddress"
      }
    }
  },
  "type": "object"
}