POST /Setup
Servers
- https://api.xero.com/api.xro/2.0
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. |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
ConversionDate |
Object | No |
The date when the organisation starts using Xero |
ConversionDate.Month |
Integer | No |
The month the organisation starts using Xero. Value is an integer between 1 and 12 |
ConversionDate.Year |
Integer | No |
The year the organisation starts using Xero. Value is an integer greater than 2006 |
Accounts[] |
Array | No | |
Accounts[].Code |
String | No |
Customer defined alpha numeric account code e.g 200 or SALES (max length = 10) |
Accounts[].EnablePaymentsToAccount |
Boolean | No |
Boolean – describes whether account can have payments applied to it |
Accounts[].Name |
String | No |
Name of account (max length = 150) |
Accounts[].Type |
String | No |
See Account Types Possible values:
|
Accounts[].ShowInExpenseClaims |
Boolean | No |
Boolean – describes whether account code is available for use with expense claims |
Accounts[].BankAccountNumber |
String | No |
For bank accounts only (Account Type BANK) |
Accounts[].ReportingCodeName |
String | No |
Shown if set |
Accounts[].Description |
String | No |
Description of the Account. Valid for all types of accounts except bank accounts (max length = 4000) |
Accounts[].TaxType |
String | No |
The tax type from taxRates |
Accounts[].AddToWatchlist |
Boolean | No |
Boolean – describes whether the account is shown in the watchlist widget on the dashboard |
Accounts[].Class |
String | No |
See Account Class Types Possible values:
|
Accounts[].UpdatedDateUTC |
String | No |
Last modified date UTC format |
Accounts[].BankAccountType |
String | No |
For bank accounts only. See Bank Account types Possible values:
|
Accounts[].SystemAccount |
String | No |
If this is a system account then this element is returned. See System Account types. Note that non-system accounts may have this element set as either “” or null. Possible values:
|
Accounts[].Status |
String | No |
Accounts with a status of ACTIVE can be updated to ARCHIVED. See Account Status Codes Possible values:
|
Accounts[].ReportingCode |
String | No |
Shown if set |
Accounts[].AccountID |
String | No |
The Xero identifier for an account – specified as a string following the endpoint name e.g. /297c2dc5-cc47-4afd-8ec8-74990b8761e9 |
Accounts[].ValidationErrors[] |
Array | No |
Displays array of validation error messages from the API |
Accounts[].ValidationErrors[].Message |
String | No |
Validation error message |
Accounts[].HasAttachments |
Boolean | No |
boolean to indicate if an account has an attachment (read only) Default value: false |
Accounts[].CurrencyCode |
String | No |
3 letter alpha code for the currency – see list of currency codes Possible values:
|
ConversionBalances[] |
Array | No |
Balance supplied for each account that has a value as at the conversion date. |
ConversionBalances[].Balance |
Number | No |
The opening balances of the account. Debits are positive, credits are negative values |
ConversionBalances[].BalanceDetails[] |
Array | No | |
ConversionBalances[].BalanceDetails[].Balance |
Number | No |
The opening balances of the account. Debits are positive, credits are negative values |
ConversionBalances[].BalanceDetails[].CurrencyRate |
Number | No |
(Optional) Exchange rate to base currency when money is spent or received. If not specified, XE rate for the day is applied |
ConversionBalances[].BalanceDetails[].CurrencyCode |
String | No |
The currency of the balance (Not required for base currency) |
ConversionBalances[].AccountCode |
String | No |
The account code for a account |
How to start integrating
- Add HTTP Task to your workflow definition.
- 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.
- Click Test request to test run your request to the API and see the API's response.