Accounts
| URL | https://api.xero.com/api.xro/2.0/Accounts |
| Methods Supported | GET |
| Description | Returns the Chart of Accounts for a Xero organisation |
Optional parameters for GET Accounts
| AccountID | The Xero identifier for an account – specified as a string following the endpoint name e.g. /297c2dc5-cc47-4afd-8ec8-74990b8761e9 |
| Modified After | The ModifiedAfter filter is actually an HTTP header: ‘If-Modified-Since‘. A UTC timestamp (yyyy-mm-ddThh:mm:ss) . Only contacts created or modified since this timestamp will be returned e.g. 2009-11-12T00:00:00 |
| Where | Filter by an any element (see Filters) |
| order | Order by any element returned (see Order By) |
Response elements returned for GET Accounts
| AccountID | Xero identifier |
| Code | Customer defined account code eg. 200 |
| Name | Name of account |
| Status | See Account Status Codes |
| Type | See Account Types |
| Tax Type | See Tax Types |
| Description | Description of Account. All accounts except bank accounts return this element |
| Class | See Account Class Types |
| SystemAccount | If this is a system account then this element is returned. See System Account types |
| EnablePaymentsToAccount | Boolean – describes whether account can have payments applied to it |
| BankAccountNumber | Shown for bank accounts only |
| CurrencyCode | Shown for bank accounts only |
| ReportingCode | shown if set (NZ Orgs only) |
| ReportingCodeName | shown if set (NZ Orgs only) |
Example response for GET Accounts
<Accounts>
<Account>
<AccountID>297c2dc5-cc47-4afd-8ec8-74990b8761e9</AccountID>
<Code/>
<Name>BNZ Cheque Account</Name>
<Type>BANK</Type>
<TaxType>NONE</TaxType>
<EnablePaymentsToAccount>false</EnablePaymentsToAccount>
<BankAccountNumber>3809087654321500</BankAccountNumber>
<CurrencyCode>NZD</CurrencyCode>
</Account>
<Account>
<AccountID>5040915e-8ce7-4177-8d08-fde416232f18</AccountID>
<Code>200</Code>
<Name>Sales</Name>
<Type>REVENUE</Type>
<TaxType>OUTPUT</TaxType>
<Description>Income from any normal business activity</Description>
<EnablePaymentsToAccount>false</EnablePaymentsToAccount>
</Account>
</Accounts>
Example response for GET Accounts/297c2dc5-cc47-4afd-8ec8-74990b8761e9 (an AccountID identifier following the endpoint name)
<Accounts>
<Account>
<AccountID>297c2dc5-cc47-4afd-8ec8-74990b8761e9</AccountID>
<Code/>
<Name>BNZ Cheque Account</Name>
<Type>BANK</Type>
<TaxType>NONE</TaxType>
<EnablePaymentsToAccount>false</EnablePaymentsToAccount>
<BankAccountNumber>3809087654321500</BankAccountNumber>
<CurrencyCode>NZD</CurrencyCode>
</Account>
</Accounts>