Global API
Request

Invoice

6min

In Xero, the "Invoice" object includes Invoices, Bills.

When requesting an Invoice, use the requestJSON to pass the Invoice data, and the response will have responseJSON which stores the Invoices response returned by Xero.

The Invoice object has the following parameters.

Invoice

Field Name

Data Type

Description

Type

String

Represents whether the record is Invoice (ACCREC) or Bill (ACCPAY)

Contact

Contact

The ID (Unique Xero ID) for the referenced customer

DateString

String

Date Invoice was issued

DueDateString

String

Date Invoice is due

Status

String

Status of the Invoice

LineAmountTypes

String

Type of Amounts like Tax "Exclusive", "Inclusive" and "NoTax"

LineItems

LineItem

Individual line items of a transaction

SubTotal

Decimal

Total of Invoice excluding taxes

TotalTax

Decimal

Total tax on Invoice

Total

Decimal

Total of Invoice tax inclusive (i.e. SubTotal + TotalTax)

CurrencyCode

String

The currency that Invoice has been raised in

CurrencyRate

Decimal

The currency rate for a multicurrency Invoice

InvoiceID

String

Read-Only; Unique identifier generated by Xero

InvoiceNumber

String

ACCREC - Unique alpha numeric code identifying invoice (printable ASCII characters only) ACCPAY - non-unique alpha numeric code identifying invoice (printable ASCII characters only). This value will also display as Reference in the UI for ACCPAY.

Reference

String

ACCREC only - additional reference number

BrandingThemeID

String



Payments

Payment

Details of Payments that have been applied to an Invoice

CreditNotes

Details of credit notes that have been applied to an Invoice

AmountDue

Decimal

Amount remaining to be paid on Invoice

AmountPaid

Decimal

Sum of payments received for Invoice

AmountCredited

Decimal

Sum of all credit notes, over-payments and pre-payments applied to an Invoice

Salesforce_Account_Id

String

To link the Invoice with the Salesforce Account

Salesforce_Opportunity_Id

String

To link the Invoice with the Salesforce Opportunity

emailInvoice

Boolean

To send the Invoice via email after creating it



LineItem

Field Name

Data Type

Description

ItemCode

String

Code of the Product

Description

String

Description of the line item

TaxType

String

Used as an override if the default Tax Code for the selected AccountCode is not correct

AccountCode

String



LineItemID

String

The Xero generated identifier for a LineItem

UnitAmount

Decimal

Lineitem unit amount

TaxAmount

Decimal

The tax amount is auto calculated as a percentage of the line amount based on the tax rate

LineAmount

Decimal

The line amount reflects the discounted price if a DiscountRate has been used i.e LineAmount = Quantity * Unit Amount * ((100 - DiscountRate)/100)

Quantity

Decimal

LineItem Quantity

DiscountRate

Decimal

Percentage discount being applied to a line item. Only supported on ACCREC invoices - ACCPAY invoices

Tracking

Section for optional Tracking Category. Any LineItem can have a maximum of 2 TrackingCategories.

Payment

Field Name

Data Type

Description

PaymentID

String



PaymentDate

Date



DateVariable

String



Reference

String



Amount

Decimal



CurrencyRate

Decimal



HasAccount

Boolean



CreditNote

Field Name

Data Type

Description

CreditNoteID

String



CreditNoteNumber

String



ID

String



DateString

String



DateVariable

String



AppliedAmount

Decimal



Total

Decimal



TrackingCategory

Field Name

Data Type

Description

Name

String

The name of the tracking category e.g. Department, Region

Option

String

Name of the option (required)

TrackingCategoryID

String

The Xero identifier for a tracking option e.g. ae777a87-5ef3-4fa0-a4f0-d10e1f13073a





Updated 12 Mar 2024
Doc contributor
Doc contributor
Doc contributor
Did this page help you?