POST /Receipts/{ReceiptID}

Servers

Path parameters

Name Type Required Description
ReceiptID String Yes

Unique identifier for a Receipt

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

xero-tenant-id String Yes

Xero identifier for Tenant

Idempotency-Key String No

This allows you to safely retry requests without the risk of duplicate processing. 128 character max.

Query parameters

Name Type Required Description
unitdp Integer No

e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts

Request body fields

Name Type Required Description
Receipts[] Array No
Receipts[].LineAmountTypes String No

Line amounts are exclusive of tax by default if you don’t specify this element. See Line Amount Types

Possible values:

  • "Inclusive"
  • "Exclusive"
  • "NoTax"
Receipts[].Date String No

Date of receipt – YYYY-MM-DD

Receipts[].Url String No

URL link to a source document – shown as “Go to [appName]” in the Xero app

Receipts[].Warnings[] Array No

Displays array of warning messages from the API

Receipts[].Warnings[].Message String No

Validation error message

Receipts[].User Object No
Receipts[].User.IsSubscriber Boolean No

Boolean to indicate if user is the subscriber

Receipts[].User.UserID String No

Xero identifier

Receipts[].User.EmailAddress String No

Email address of user

Receipts[].User.OrganisationRole String No

User role that defines permissions in Xero and via API (READONLY, INVOICEONLY, STANDARD, FINANCIALADVISER, etc)

Possible values:

  • "INVOICEONLY"
  • "FINANCIALADVISER"
  • "CASHBOOKCLIENT"
  • "READONLY"
  • "UNKNOWN"
  • "STANDARD"
  • "MANAGEDCLIENT"
  • "REMOVED"
Receipts[].User.LastName String No

Last name of user

Receipts[].User.FirstName String No

First name of user

Receipts[].User.UpdatedDateUTC String No

Timestamp of last change to user

Receipts[].ReceiptID String No

Xero generated unique identifier for receipt

Receipts[].ReceiptNumber String No

Xero generated sequence number for receipt in current claim for a given user

Receipts[].Total Number No

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

Receipts[].Reference String No

Additional reference number

Receipts[].TotalTax Number No

Total tax on receipt

Receipts[].LineItems[] Array No
Receipts[].LineItems[].Quantity Number No

LineItem Quantity

Receipts[].LineItems[].UnitAmount Number No

LineItem Unit Amount

Receipts[].LineItems[].TaxAmount Number No

The tax amount is auto calculated as a percentage of the line amount (see below) based on the tax rate. This value can be overriden if the calculated is not correct.

Receipts[].LineItems[].Item No
Receipts[].LineItems[].AccountCode String No

See Accounts

Receipts[].LineItems[].RepeatingInvoiceID String No

The Xero identifier for a Repeating Invoice

Receipts[].LineItems[].LineItemID String No

LineItem unique ID

Receipts[].LineItems[].Description String No

Description needs to be at least 1 char long. A line item with just a description (i.e no unit amount or quantity) can be created by specifying just a element that contains at least 1 character

Receipts[].LineItems[].TaxType String No

The tax type from TaxRates

Receipts[].LineItems[].Taxability String No

The type of taxability

Possible values:

  • "NOT_APPLICABLE"
  • "EXEMPT"
  • "PART_TAXABLE"
  • "TAXABLE"
  • "NON_TAXABLE"
Receipts[].LineItems[].TaxBreakdown[] Array No

An array of tax components defined for this line item

Receipts[].LineItems[].TaxBreakdown[].TaxComponentId String No

The unique ID number of this component

Receipts[].LineItems[].TaxBreakdown[].Name String No

The name of the jurisdiction

Receipts[].LineItems[].TaxBreakdown[].Type String No

The type of the jurisdiction

Possible values:

  • "SYSGST/USSPECIAL"
  • "SYSGST/USCOUNTRY"
  • "SYSGST/USCOUNTY"
  • "SYSGST/USSTATE"
  • "SYSGST/USCITY"
Receipts[].LineItems[].TaxBreakdown[].TaxAmount Number No

The amount of the tax

Receipts[].LineItems[].TaxBreakdown[].TaxableAmount Number No

The amount that is taxable

Receipts[].LineItems[].TaxBreakdown[].NonTaxableAmount Number No

The amount that is not taxable

Receipts[].LineItems[].TaxBreakdown[].TaxPercentage Number No

The percentage of the tax

Receipts[].LineItems[].TaxBreakdown[].ExemptAmount Number No

The amount that is exempt

Receipts[].LineItems[].TaxBreakdown[].StateAssignedNo String No

The state assigned number of the jurisdiction

Receipts[].LineItems[].TaxBreakdown[].JurisdictionRegion String No

Name identifying the region within the country

Receipts[].LineItems[].LineAmount Number No

If you wish to omit either the Quantity or UnitAmount you can provide a LineAmount and Xero will calculate the missing amount for you. The line amount reflects the discounted price if either a DiscountRate or DiscountAmount has been used i.e. LineAmount = Quantity * Unit Amount * ((100 - DiscountRate)/100) or LineAmount = (Quantity * UnitAmount) - DiscountAmount

Receipts[].LineItems[].AccountID String No

The associated account ID related to this line item

Receipts[].LineItems[].SalesTaxCodeId Number No

The ID of the sales tax code

Receipts[].LineItems[].ItemCode String No

See Items

Receipts[].LineItems[].Tracking[] Array No

Optional Tracking Category – see Tracking. Any LineItem can have a maximum of 2 elements.

Receipts[].LineItems[].Tracking[].TrackingCategoryID String No

The Xero identifier for a tracking category

Receipts[].LineItems[].Tracking[].Name String No

The name of the tracking category

Receipts[].LineItems[].Tracking[].Option String No

See Tracking Options

Receipts[].LineItems[].Tracking[].TrackingOptionID String No

The Xero identifier for a tracking category option

Receipts[].LineItems[].DiscountAmount Number No

Discount amount being applied to a line item. Only supported on ACCREC invoices and quotes. ACCPAY invoices and credit notes in Xero do not support discounts.

Receipts[].LineItems[].DiscountRate Number No

Percentage discount being applied to a line item (only supported on ACCREC invoices – ACC PAY invoices and credit notes in Xero do not support discounts

Receipts[].UpdatedDateUTC String No

Last modified date UTC format

Receipts[].SubTotal Number No

Total of receipt excluding taxes

Receipts[].Status String No

Current status of receipt – see status types

Possible values:

  • "AUTHORISED"
  • "SUBMITTED"
  • "DECLINED"
  • "DRAFT"
  • "VOIDED"
Receipts[].ValidationErrors[] Array No

Displays array of validation error messages from the API

Receipts[].ValidationErrors[].Message String No

Validation error message

Receipts[].Attachments[] Array No

Displays array of attachments from the API

Receipts[].Attachments[].ContentLength Integer No

Length of the file content

Receipts[].Attachments[].IncludeOnline Boolean No

Include the file with the online invoice

Receipts[].Attachments[].AttachmentID String No

Unique ID for the file

Receipts[].Attachments[].MimeType String No

Type of file

Receipts[].Attachments[].Url String No

URL to the file on xero.com

Receipts[].Attachments[].FileName String No

Name of the file

Receipts[].Contact Object No
Receipts[].Contact.BankAccountDetails String No

Bank account number of contact

Receipts[].Contact.Website String No

Website address for contact (read only)

Receipts[].Contact.Name String No

Full name of contact/organisation (max length = 255)

Receipts[].Contact.SalesTrackingCategories[] Array No

The default sales tracking categories for contacts

Receipts[].Contact.SalesTrackingCategories[].TrackingOptionName String No

The default purchase tracking category name for contacts

Receipts[].Contact.SalesTrackingCategories[].TrackingCategoryName String No

The default sales tracking category name for contacts

Receipts[].Contact.SalesDefaultLineAmountType String No

The default sales line amount type for a contact. Only available when summaryOnly parameter or paging is used, or when fetch by ContactId or ContactNumber.

Possible values:

  • "INCLUSIVE"
  • "NONE"
  • "EXCLUSIVE"
Receipts[].Contact.TrackingCategoryOption String No

The name of the Tracking Option assigned to the contact under SalesTrackingCategories and PurchasesTrackingCategories

Receipts[].Contact.TaxNumber String No

Tax number of contact – this is also known as the ABN (Australia), GST Number (New Zealand), VAT Number (UK) or Tax ID Number (US and global) in the Xero UI depending on which regionalized version of Xero you are using (max length = 50)

Receipts[].Contact.TrackingCategoryName String No

The name of the Tracking Category assigned to the contact under SalesTrackingCategories and PurchasesTrackingCategories

Receipts[].Contact.LastName String No

Last name of contact person (max length = 255)

Receipts[].Contact.IsSupplier Boolean No

true or false – Boolean that describes if a contact that has any AP invoices entered against them. Cannot be set via PUT or POST – it is automatically set when an accounts payable invoice is generated against this contact.

Receipts[].Contact.PurchasesTrackingCategories[] Array No

The default purchases tracking categories for contacts

Receipts[].Contact.PurchasesTrackingCategories[].TrackingOptionName String No

The default purchase tracking category name for contacts

Receipts[].Contact.PurchasesTrackingCategories[].TrackingCategoryName String No

The default sales tracking category name for contacts

Receipts[].Contact.UpdatedDateUTC String No

UTC timestamp of last update to contact

Receipts[].Contact.BrandingTheme Object No
Receipts[].Contact.BrandingTheme.Name String No

Name of branding theme

Receipts[].Contact.BrandingTheme.BrandingThemeID String No

Xero identifier

Receipts[].Contact.BrandingTheme.Type String No

Always INVOICE

Possible values:

  • "INVOICE"
Receipts[].Contact.BrandingTheme.LogoUrl String No

The location of the image file used as the logo on this branding theme

Receipts[].Contact.BrandingTheme.SortOrder Integer No

Integer – ranked order of branding theme. The default branding theme has a value of 0

Receipts[].Contact.BrandingTheme.CreatedDateUTC String No

UTC timestamp of creation date of branding theme

Receipts[].Contact.IsCustomer Boolean No

true or false – Boolean that describes if a contact has any AR invoices entered against them. Cannot be set via PUT or POST – it is automatically set when an accounts receivable invoice is generated against this contact.

Receipts[].Contact.PurchasesDefaultLineAmountType String No

The default purchases line amount type for a contact Only available when summaryOnly parameter or paging is used, or when fetch by ContactId or ContactNumber.

Possible values:

  • "INCLUSIVE"
  • "NONE"
  • "EXCLUSIVE"
Receipts[].Contact.Attachments[] Array No

Displays array of attachments from the API

Receipts[].Contact.Attachments[].ContentLength Integer No

Length of the file content

Receipts[].Contact.Attachments[].IncludeOnline Boolean No

Include the file with the online invoice

Receipts[].Contact.Attachments[].AttachmentID String No

Unique ID for the file

Receipts[].Contact.Attachments[].MimeType String No

Type of file

Receipts[].Contact.Attachments[].Url String No

URL to the file on xero.com

Receipts[].Contact.Attachments[].FileName String No

Name of the file

Receipts[].Contact.PurchasesDefaultAccountCode String No

The default purchases account code for contacts

Receipts[].Contact.ContactID String No

Xero identifier

Receipts[].Contact.AccountsPayableTaxType String No

The tax type from TaxRates

Receipts[].Contact.ContactStatus String No

Current status of a contact – see contact status types

Possible values:

  • "ARCHIVED"
  • "ACTIVE"
  • "GDPRREQUEST"
Receipts[].Contact.Addresses[] Array No

Store certain address types for a contact – see address types

Receipts[].Contact.Addresses[].City String No

max length = 255

Receipts[].Contact.Addresses[].AddressType String No

define the type of address

Possible values:

  • "STREET"
  • "POBOX"
Receipts[].Contact.Addresses[].AttentionTo String No

max length = 255

Receipts[].Contact.Addresses[].AddressLine2 String No

max length = 500

Receipts[].Contact.Addresses[].Region String No

max length = 255

Receipts[].Contact.Addresses[].Country String No

max length = 50, [A-Z], [a-z] only

Receipts[].Contact.Addresses[].AddressLine1 String No

max length = 500

Receipts[].Contact.Addresses[].AddressLine4 String No

max length = 500

Receipts[].Contact.Addresses[].AddressLine3 String No

max length = 500

Receipts[].Contact.Addresses[].PostalCode String No

max length = 50

Receipts[].Contact.StatusAttributeString String No

Status of object

Receipts[].Contact.CompanyNumber String No

Company registration number (max length = 50)

Receipts[].Contact.Phones[] Array No

Store certain phone types for a contact – see phone types

Receipts[].Contact.Phones[].PhoneType String No

Possible values:

  • "DEFAULT"
  • "OFFICE"
  • "DDI"
  • "MOBILE"
  • "FAX"
Receipts[].Contact.Phones[].PhoneNumber String No

max length = 50

Receipts[].Contact.Phones[].PhoneAreaCode String No

max length = 10

Receipts[].Contact.Phones[].PhoneCountryCode String No

max length = 20

Receipts[].Contact.BatchPayments No

Bank details for use on a batch payment stored with each contact

Receipts[].Contact.FirstName String No

First name of contact person (max length = 255)

Receipts[].Contact.SalesDefaultAccountCode String No

The default sales account code for contacts

Receipts[].Contact.ContactNumber String No

This can be updated via the API only i.e. This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50). If the Contact Number is used, this is displayed as Contact Code in the Contacts UI in Xero.

Receipts[].Contact.AccountsReceivableTaxType String No

The tax type from TaxRates

Receipts[].Contact.DefaultCurrency String No

3 letter alpha code for the currency – see list of currency codes

Possible values:

  • "ISK"
  • "JMD"
  • "LTL"
  • "SVC"
  • "SAR"
  • "EEK"
  • "TTD"
  • "SBD"
  • "SHP"
  • "GBP"
  • "TRY"
  • "MOP"
  • "INR"
  • "MAD"
  • "CUP"
  • "CLF"
  • "SRD"
  • "SZL"
  • "IRR"
  • "CHF"
  • "EUR"
  • "KZT"
  • "ALL"
  • "MZN"
  • "CDF"
  • "BZD"
  • "KES"
  • "AOA"
  • "NGN"
  • "SEK"
  • "BND"
  • "UYU"
  • "BRL"
  • "YER"
  • "ANG"
  • "BYR"
  • "MRO"
  • "DJF"
  • "LSL"
  • "BBD"
  • "MGA"
  • "VND"
  • "DOP"
  • "TJS"
  • "FJD"
  • "BGN"
  • "TWD"
  • "QAR"
  • "VES"
  • "CNY"
  • "AUD"
  • "ZMW"
  • "WST"
  • "MDL"
  • "KHR"
  • "NZD"
  • "AMD"
  • "AZN"
  • "TZS"
  • "GIP"
  • "AED"
  • "AFN"
  • "DZD"
  • "PKR"
  • "KYD"
  • "AWG"
  • "BSD"
  • "PEN"
  • "XAF"
  • "NAD"
  • "ZWD"
  • "BTN"
  • "KRW"
  • "NPR"
  • "FKP"
  • "TND"
  • "LVL"
  • "MWK"
  • "JOD"
  • "LRD"
  • "RSD"
  • "SCR"
  • "HUF"
  • "IDR"
  • "LAK"
  • "UAH"
  • "ZAR"
  • "OMR"
  • "PGK"
  • "SLL"
  • "MVR"
  • "USD"
  • "MXV"
  • "MKD"
  • "COP"
  • "CAD"
  • "KMF"
  • "MXN"
  • "PYG"
  • "XCD"
  • "STD"
  • "IQD"
  • "TOP"
  • "VEF"
  • "VUV"
  • "SOS"
  • "CVE"
  • "CUC"
  • "KGS"
  • "TMT"
  • "THB"
  • "BOB"
  • "UZS"
  • "BYN"
  • "SKK"
  • "ILS"
  • "PLN"
  • "RON"
  • "BHD"
  • "BIF"
  • "SLE"
  • "XPF"
  • "ARS"
  • "GTQ"
  • "RUB"
  • "HKD"
  • "ZMK"
  • "RWF"
  • "BDT"
  • "ETB"
  • "LYD"
  • "JPY"
  • "SGD"
  • "STN"
  • "MNT"
  • "NIO"
  • "GEL"
  • "MUR"
  • "NOK"
  • "ERN"
  • "SYP"
  • "MYR"
  • "DKK"
  • "HRK"
  • "CLP"
  • "GNF"
  • "GMD"
  • "BAM"
  • "HTG"
  • "LBP"
  • "PHP"
  • "EGP"
  • "SDG"
  • "CRC"
  • "CZK"
  • "KWD"
  • "KPW"
  • "GHS"
  • "GYD"
  • "LKR"
  • "BMD"
  • "BWP"
  • "MRU"
  • "PAB"
  • "UGX"
  • "MMK"
  • "XOF"
  • "HNL"
Receipts[].Contact.HasValidationErrors Boolean No

A boolean to indicate if a contact has an validation errors

Default value: false

Receipts[].Contact.AccountNumber String No

A user defined account number. This can be updated via the API and the Xero UI (max length = 50)

Receipts[].Contact.Balances Object No

The raw AccountsReceivable(sales invoices) and AccountsPayable(bills) outstanding and overdue amounts, not converted to base currency (read only)

Receipts[].Contact.Balances.AccountsReceivable Object No
Receipts[].Contact.Balances.AccountsReceivable.Overdue Number No
Receipts[].Contact.Balances.AccountsReceivable.Outstanding Number No
Receipts[].Contact.Balances.AccountsPayable Object No
Receipts[].Contact.Balances.AccountsPayable.Overdue Number No
Receipts[].Contact.Balances.AccountsPayable.Outstanding Number No
Receipts[].Contact.XeroNetworkKey String No

Store XeroNetworkKey for contacts.

Receipts[].Contact.Discount Number No

The default discount rate for the contact (read only)

Receipts[].Contact.MergedToContactID String No

ID for the destination of a merged contact. Only returned when using paging or when fetching a contact by ContactId or ContactNumber.

Receipts[].Contact.ValidationErrors[] Array No

Displays validation errors returned from the API

Receipts[].Contact.ValidationErrors[].Message String No

Validation error message

Receipts[].Contact.EmailAddress String No

Email address of contact person (umlauts not supported) (max length = 255)

Receipts[].Contact.HasAttachments Boolean No

A boolean to indicate if a contact has an attachment

Default value: false

Receipts[].Contact.PaymentTerms Object No
Receipts[].Contact.PaymentTerms.Bills Object No
Receipts[].Contact.PaymentTerms.Bills.Day Integer No

Day of Month (0-31)

Receipts[].Contact.PaymentTerms.Bills.Type String No

Possible values:

  • "DAYSAFTERBILLMONTH"
  • "OFCURRENTMONTH"
  • "DAYSAFTERBILLDATE"
  • "OFFOLLOWINGMONTH"
Receipts[].Contact.PaymentTerms.Sales Object No
Receipts[].Contact.PaymentTerms.Sales.Day Integer No

Day of Month (0-31)

Receipts[].Contact.PaymentTerms.Sales.Type String No

Possible values:

  • "DAYSAFTERBILLMONTH"
  • "OFCURRENTMONTH"
  • "DAYSAFTERBILLDATE"
  • "OFFOLLOWINGMONTH"
Receipts[].Contact.ContactGroups[] Array No

Displays which contact groups a contact is included in

Receipts[].Contact.ContactGroups[].Name String No

The Name of the contact group. Required when creating a new contact group

Receipts[].Contact.ContactGroups[].Status String No

The Status of a contact group. To delete a contact group update the status to DELETED. Only contact groups with a status of ACTIVE are returned on GETs.

Possible values:

  • "DELETED"
  • "ACTIVE"
Receipts[].Contact.ContactGroups[].ContactGroupID String No

The Xero identifier for an contact group – specified as a string following the endpoint name. e.g. /297c2dc5-cc47-4afd-8ec8-74990b8761e9

Receipts[].Contact.ContactGroups[].Contacts[] Array No

The ContactID and Name of Contacts in a contact group. Returned on GETs when the ContactGroupID is supplied in the URL.

Receipts[].Contact.ContactPersons[] Array No

See contact persons

Receipts[].Contact.ContactPersons[].IncludeInEmails Boolean No

boolean to indicate whether contact should be included on emails with invoices etc.

Receipts[].Contact.ContactPersons[].EmailAddress String No

Email address of person

Receipts[].Contact.ContactPersons[].LastName String No

Last name of person

Receipts[].Contact.ContactPersons[].FirstName String No

First name of person

Receipts[].HasAttachments Boolean No

boolean to indicate if a receipt has an attachment

Default value: false

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.