POST /BankTransactions
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. |
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 |
summarizeErrors |
Boolean | No |
If false return 200 OK and mix of successfully created objects and any with validation errors Default value: false |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
BankTransactions[] |
Array | No | |
BankTransactions[].LineAmountTypes |
String | No |
Line amounts are exclusive of tax by default if you don’t specify this element. See Line Amount Types Possible values:
|
BankTransactions[].Date |
String | No |
Date of transaction – YYYY-MM-DD |
BankTransactions[].Url |
String | No |
URL link to a source document – shown as “Go to App Name” |
BankTransactions[].Type |
String | Yes |
See Bank Transaction Types Possible values:
|
BankTransactions[].StatusAttributeString |
String | No |
A string to indicate if a invoice status |
BankTransactions[].Total |
Number | No |
Total of bank transaction tax inclusive |
BankTransactions[].Reference |
String | No |
Reference for the transaction. Only supported for SPEND and RECEIVE transactions. |
BankTransactions[].TotalTax |
Number | No |
Total tax on bank transaction |
BankTransactions[].LineItems[] |
Array | Yes |
See LineItems |
BankTransactions[].LineItems[].Quantity |
Number | No |
LineItem Quantity |
BankTransactions[].LineItems[].UnitAmount |
Number | No |
LineItem Unit Amount |
BankTransactions[].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. |
BankTransactions[].LineItems[].Item |
No | ||
BankTransactions[].LineItems[].AccountCode |
String | No |
See Accounts |
BankTransactions[].LineItems[].RepeatingInvoiceID |
String | No |
The Xero identifier for a Repeating Invoice |
BankTransactions[].LineItems[].LineItemID |
String | No |
LineItem unique ID |
BankTransactions[].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 |
BankTransactions[].LineItems[].TaxType |
String | No |
The tax type from TaxRates |
BankTransactions[].LineItems[].Taxability |
String | No |
The type of taxability Possible values:
|
BankTransactions[].LineItems[].TaxBreakdown[] |
Array | No |
An array of tax components defined for this line item |
BankTransactions[].LineItems[].TaxBreakdown[].TaxComponentId |
String | No |
The unique ID number of this component |
BankTransactions[].LineItems[].TaxBreakdown[].Name |
String | No |
The name of the jurisdiction |
BankTransactions[].LineItems[].TaxBreakdown[].Type |
String | No |
The type of the jurisdiction Possible values:
|
BankTransactions[].LineItems[].TaxBreakdown[].TaxAmount |
Number | No |
The amount of the tax |
BankTransactions[].LineItems[].TaxBreakdown[].TaxableAmount |
Number | No |
The amount that is taxable |
BankTransactions[].LineItems[].TaxBreakdown[].NonTaxableAmount |
Number | No |
The amount that is not taxable |
BankTransactions[].LineItems[].TaxBreakdown[].TaxPercentage |
Number | No |
The percentage of the tax |
BankTransactions[].LineItems[].TaxBreakdown[].ExemptAmount |
Number | No |
The amount that is exempt |
BankTransactions[].LineItems[].TaxBreakdown[].StateAssignedNo |
String | No |
The state assigned number of the jurisdiction |
BankTransactions[].LineItems[].TaxBreakdown[].JurisdictionRegion |
String | No |
Name identifying the region within the country |
BankTransactions[].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 |
BankTransactions[].LineItems[].AccountID |
String | No |
The associated account ID related to this line item |
BankTransactions[].LineItems[].SalesTaxCodeId |
Number | No |
The ID of the sales tax code |
BankTransactions[].LineItems[].ItemCode |
String | No |
See Items |
BankTransactions[].LineItems[].Tracking[] |
Array | No |
Optional Tracking Category – see Tracking. Any LineItem can have a maximum of 2 elements. |
BankTransactions[].LineItems[].Tracking[].TrackingCategoryID |
String | No |
The Xero identifier for a tracking category |
BankTransactions[].LineItems[].Tracking[].Name |
String | No |
The name of the tracking category |
BankTransactions[].LineItems[].Tracking[].Option |
String | No |
See Tracking Options |
BankTransactions[].LineItems[].Tracking[].TrackingOptionID |
String | No |
The Xero identifier for a tracking category option |
BankTransactions[].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. |
BankTransactions[].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 |
BankTransactions[].UpdatedDateUTC |
String | No |
Last modified date UTC format |
BankTransactions[].SubTotal |
Number | No |
Total of bank transaction excluding taxes |
BankTransactions[].BankTransactionID |
String | No |
Xero generated unique identifier for bank transaction |
BankTransactions[].CurrencyRate |
Number | No |
Exchange rate to base currency when money is spent or received. e.g.0.7500 Only used for bank transactions in non base currency. If this isn’t specified for non base currency accounts then either the user-defined rate (preference) or the XE.com day rate will be used. Setting currency is only supported on overpayments. |
BankTransactions[].Status |
String | No |
See Bank Transaction Status Codes Possible values:
|
BankTransactions[].OverpaymentID |
String | No |
Xero generated unique identifier for an Overpayment. This will be returned on BankTransactions with a Type of SPEND-OVERPAYMENT or RECEIVE-OVERPAYMENT |
BankTransactions[].ValidationErrors[] |
Array | No |
Displays array of validation error messages from the API |
BankTransactions[].ValidationErrors[].Message |
String | No |
Validation error message |
BankTransactions[].IsReconciled |
Boolean | No |
Boolean to show if transaction is reconciled |
BankTransactions[].Contact |
Object | No | |
BankTransactions[].Contact.BankAccountDetails |
String | No |
Bank account number of contact |
BankTransactions[].Contact.Website |
String | No |
Website address for contact (read only) |
BankTransactions[].Contact.Name |
String | No |
Full name of contact/organisation (max length = 255) |
BankTransactions[].Contact.SalesTrackingCategories[] |
Array | No |
The default sales tracking categories for contacts |
BankTransactions[].Contact.SalesTrackingCategories[].TrackingOptionName |
String | No |
The default purchase tracking category name for contacts |
BankTransactions[].Contact.SalesTrackingCategories[].TrackingCategoryName |
String | No |
The default sales tracking category name for contacts |
BankTransactions[].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:
|
BankTransactions[].Contact.TrackingCategoryOption |
String | No |
The name of the Tracking Option assigned to the contact under SalesTrackingCategories and PurchasesTrackingCategories |
BankTransactions[].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) |
BankTransactions[].Contact.TrackingCategoryName |
String | No |
The name of the Tracking Category assigned to the contact under SalesTrackingCategories and PurchasesTrackingCategories |
BankTransactions[].Contact.LastName |
String | No |
Last name of contact person (max length = 255) |
BankTransactions[].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. |
BankTransactions[].Contact.PurchasesTrackingCategories[] |
Array | No |
The default purchases tracking categories for contacts |
BankTransactions[].Contact.PurchasesTrackingCategories[].TrackingOptionName |
String | No |
The default purchase tracking category name for contacts |
BankTransactions[].Contact.PurchasesTrackingCategories[].TrackingCategoryName |
String | No |
The default sales tracking category name for contacts |
BankTransactions[].Contact.UpdatedDateUTC |
String | No |
UTC timestamp of last update to contact |
BankTransactions[].Contact.BrandingTheme |
Object | No | |
BankTransactions[].Contact.BrandingTheme.Name |
String | No |
Name of branding theme |
BankTransactions[].Contact.BrandingTheme.BrandingThemeID |
String | No |
Xero identifier |
BankTransactions[].Contact.BrandingTheme.Type |
String | No |
Always INVOICE Possible values:
|
BankTransactions[].Contact.BrandingTheme.LogoUrl |
String | No |
The location of the image file used as the logo on this branding theme |
BankTransactions[].Contact.BrandingTheme.SortOrder |
Integer | No |
Integer – ranked order of branding theme. The default branding theme has a value of 0 |
BankTransactions[].Contact.BrandingTheme.CreatedDateUTC |
String | No |
UTC timestamp of creation date of branding theme |
BankTransactions[].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. |
BankTransactions[].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:
|
BankTransactions[].Contact.Attachments[] |
Array | No |
Displays array of attachments from the API |
BankTransactions[].Contact.Attachments[].ContentLength |
Integer | No |
Length of the file content |
BankTransactions[].Contact.Attachments[].IncludeOnline |
Boolean | No |
Include the file with the online invoice |
BankTransactions[].Contact.Attachments[].AttachmentID |
String | No |
Unique ID for the file |
BankTransactions[].Contact.Attachments[].MimeType |
String | No |
Type of file |
BankTransactions[].Contact.Attachments[].Url |
String | No |
URL to the file on xero.com |
BankTransactions[].Contact.Attachments[].FileName |
String | No |
Name of the file |
BankTransactions[].Contact.PurchasesDefaultAccountCode |
String | No |
The default purchases account code for contacts |
BankTransactions[].Contact.ContactID |
String | No |
Xero identifier |
BankTransactions[].Contact.AccountsPayableTaxType |
String | No |
The tax type from TaxRates |
BankTransactions[].Contact.ContactStatus |
String | No |
Current status of a contact – see contact status types Possible values:
|
BankTransactions[].Contact.Addresses[] |
Array | No |
Store certain address types for a contact – see address types |
BankTransactions[].Contact.Addresses[].City |
String | No |
max length = 255 |
BankTransactions[].Contact.Addresses[].AddressType |
String | No |
define the type of address Possible values:
|
BankTransactions[].Contact.Addresses[].AttentionTo |
String | No |
max length = 255 |
BankTransactions[].Contact.Addresses[].AddressLine2 |
String | No |
max length = 500 |
BankTransactions[].Contact.Addresses[].Region |
String | No |
max length = 255 |
BankTransactions[].Contact.Addresses[].Country |
String | No |
max length = 50, [A-Z], [a-z] only |
BankTransactions[].Contact.Addresses[].AddressLine1 |
String | No |
max length = 500 |
BankTransactions[].Contact.Addresses[].AddressLine4 |
String | No |
max length = 500 |
BankTransactions[].Contact.Addresses[].AddressLine3 |
String | No |
max length = 500 |
BankTransactions[].Contact.Addresses[].PostalCode |
String | No |
max length = 50 |
BankTransactions[].Contact.StatusAttributeString |
String | No |
Status of object |
BankTransactions[].Contact.CompanyNumber |
String | No |
Company registration number (max length = 50) |
BankTransactions[].Contact.Phones[] |
Array | No |
Store certain phone types for a contact – see phone types |
BankTransactions[].Contact.Phones[].PhoneType |
String | No |
Possible values:
|
BankTransactions[].Contact.Phones[].PhoneNumber |
String | No |
max length = 50 |
BankTransactions[].Contact.Phones[].PhoneAreaCode |
String | No |
max length = 10 |
BankTransactions[].Contact.Phones[].PhoneCountryCode |
String | No |
max length = 20 |
BankTransactions[].Contact.BatchPayments |
No |
Bank details for use on a batch payment stored with each contact |
|
BankTransactions[].Contact.FirstName |
String | No |
First name of contact person (max length = 255) |
BankTransactions[].Contact.SalesDefaultAccountCode |
String | No |
The default sales account code for contacts |
BankTransactions[].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. |
BankTransactions[].Contact.AccountsReceivableTaxType |
String | No |
The tax type from TaxRates |
BankTransactions[].Contact.DefaultCurrency |
String | No |
3 letter alpha code for the currency – see list of currency codes Possible values:
|
BankTransactions[].Contact.HasValidationErrors |
Boolean | No |
A boolean to indicate if a contact has an validation errors Default value: false |
BankTransactions[].Contact.AccountNumber |
String | No |
A user defined account number. This can be updated via the API and the Xero UI (max length = 50) |
BankTransactions[].Contact.Balances |
Object | No |
The raw AccountsReceivable(sales invoices) and AccountsPayable(bills) outstanding and overdue amounts, not converted to base currency (read only) |
BankTransactions[].Contact.Balances.AccountsReceivable |
Object | No | |
BankTransactions[].Contact.Balances.AccountsReceivable.Overdue |
Number | No | |
BankTransactions[].Contact.Balances.AccountsReceivable.Outstanding |
Number | No | |
BankTransactions[].Contact.Balances.AccountsPayable |
Object | No | |
BankTransactions[].Contact.Balances.AccountsPayable.Overdue |
Number | No | |
BankTransactions[].Contact.Balances.AccountsPayable.Outstanding |
Number | No | |
BankTransactions[].Contact.XeroNetworkKey |
String | No |
Store XeroNetworkKey for contacts. |
BankTransactions[].Contact.Discount |
Number | No |
The default discount rate for the contact (read only) |
BankTransactions[].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. |
BankTransactions[].Contact.ValidationErrors[] |
Array | No |
Displays validation errors returned from the API |
BankTransactions[].Contact.ValidationErrors[].Message |
String | No |
Validation error message |
BankTransactions[].Contact.EmailAddress |
String | No |
Email address of contact person (umlauts not supported) (max length = 255) |
BankTransactions[].Contact.HasAttachments |
Boolean | No |
A boolean to indicate if a contact has an attachment Default value: false |
BankTransactions[].Contact.PaymentTerms |
Object | No | |
BankTransactions[].Contact.PaymentTerms.Bills |
Object | No | |
BankTransactions[].Contact.PaymentTerms.Bills.Day |
Integer | No |
Day of Month (0-31) |
BankTransactions[].Contact.PaymentTerms.Bills.Type |
String | No |
Possible values:
|
BankTransactions[].Contact.PaymentTerms.Sales |
Object | No | |
BankTransactions[].Contact.PaymentTerms.Sales.Day |
Integer | No |
Day of Month (0-31) |
BankTransactions[].Contact.PaymentTerms.Sales.Type |
String | No |
Possible values:
|
BankTransactions[].Contact.ContactGroups[] |
Array | No |
Displays which contact groups a contact is included in |
BankTransactions[].Contact.ContactGroups[].Name |
String | No |
The Name of the contact group. Required when creating a new contact group |
BankTransactions[].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:
|
BankTransactions[].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 |
BankTransactions[].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. |
BankTransactions[].Contact.ContactPersons[] |
Array | No |
See contact persons |
BankTransactions[].Contact.ContactPersons[].IncludeInEmails |
Boolean | No |
boolean to indicate whether contact should be included on emails with invoices etc. |
BankTransactions[].Contact.ContactPersons[].EmailAddress |
String | No |
Email address of person |
BankTransactions[].Contact.ContactPersons[].LastName |
String | No |
Last name of person |
BankTransactions[].Contact.ContactPersons[].FirstName |
String | No |
First name of person |
BankTransactions[].HasAttachments |
Boolean | No |
Boolean to indicate if a bank transaction has an attachment Default value: false |
BankTransactions[].BankAccount |
Object | Yes | |
BankTransactions[].BankAccount.Code |
String | No |
Customer defined alpha numeric account code e.g 200 or SALES (max length = 10) |
BankTransactions[].BankAccount.EnablePaymentsToAccount |
Boolean | No |
Boolean – describes whether account can have payments applied to it |
BankTransactions[].BankAccount.Name |
String | No |
Name of account (max length = 150) |
BankTransactions[].BankAccount.Type |
String | No |
See Account Types Possible values:
|
BankTransactions[].BankAccount.ShowInExpenseClaims |
Boolean | No |
Boolean – describes whether account code is available for use with expense claims |
BankTransactions[].BankAccount.BankAccountNumber |
String | No |
For bank accounts only (Account Type BANK) |
BankTransactions[].BankAccount.ReportingCodeName |
String | No |
Shown if set |
BankTransactions[].BankAccount.Description |
String | No |
Description of the Account. Valid for all types of accounts except bank accounts (max length = 4000) |
BankTransactions[].BankAccount.TaxType |
String | No |
The tax type from taxRates |
BankTransactions[].BankAccount.AddToWatchlist |
Boolean | No |
Boolean – describes whether the account is shown in the watchlist widget on the dashboard |
BankTransactions[].BankAccount.Class |
String | No |
See Account Class Types Possible values:
|
BankTransactions[].BankAccount.UpdatedDateUTC |
String | No |
Last modified date UTC format |
BankTransactions[].BankAccount.BankAccountType |
String | No |
For bank accounts only. See Bank Account types Possible values:
|
BankTransactions[].BankAccount.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:
|
BankTransactions[].BankAccount.Status |
String | No |
Accounts with a status of ACTIVE can be updated to ARCHIVED. See Account Status Codes Possible values:
|
BankTransactions[].BankAccount.ReportingCode |
String | No |
Shown if set |
BankTransactions[].BankAccount.AccountID |
String | No |
The Xero identifier for an account – specified as a string following the endpoint name e.g. /297c2dc5-cc47-4afd-8ec8-74990b8761e9 |
BankTransactions[].BankAccount.ValidationErrors[] |
Array | No |
Displays array of validation error messages from the API |
BankTransactions[].BankAccount.ValidationErrors[].Message |
String | No |
Validation error message |
BankTransactions[].BankAccount.HasAttachments |
Boolean | No |
boolean to indicate if an account has an attachment (read only) Default value: false |
BankTransactions[].BankAccount.CurrencyCode |
String | No |
3 letter alpha code for the currency – see list of currency codes Possible values:
|
BankTransactions[].CurrencyCode |
String | No |
3 letter alpha code for the currency – see list of currency codes Possible values:
|
BankTransactions[].PrepaymentID |
String | No |
Xero generated unique identifier for a Prepayment. This will be returned on BankTransactions with a Type of SPEND-PREPAYMENT or RECEIVE-PREPAYMENT |
pagination |
Object | No | |
pagination.page |
Integer | No | |
pagination.itemCount |
Integer | No | |
pagination.pageCount |
Integer | No | |
pagination.pageSize |
Integer | No | |
Warnings[] |
Array | No |
Displays array of warning messages from the API |
Warnings[].Message |
String | No |
Validation error message |
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.