Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > Getting Started >

What does AccountCode mean?

Started by Adrian Rowbotham -   in Getting Started

Testing with the API explorer I am trying to make a single line item which represents an order and which is due VAT (20%)

I include one line item:

"Code": "CODE 5678",
"Description": "Order 5678",
"Quantity": 1,
"UnitAmount": 500,
"TaxType": "OUTPUT2",
"LineAmount": 500

I get a validation error: "Account code or ID must be specified"

What is an AccountCode? The docs say "Default account code to be used for purchased/sale", which is does not explain what it is.

The examples give an apparently arbitrary number like 200. Where would I get this from?
Best Reply as chosen by Adrian Rowbotham (Original Poster)
AccountCode is the code for the account from Chart of Accounts that you want to use in the line item.

Xero Developer: Invoices endpoint

Welli Abdullah (Xero Staff)