The following elements are returned in the BankTransfers response
FromBankAccount | See FromBankAccount |
ToBankAccount | See ToBankAccount |
Amount | The amount being transferred |
Date | The date of the Transfer YYYY-MM-DD |
BankTransferID | The identifier of the Bank Transfer |
CurrencyRate | The currency rate |
FromBankTransactionID | The Bank Transaction ID for the source account |
ToBankTransactionID | The Bank Transaction ID for the destination account |
HasAttachments | Boolean to indicate if a Bank Transfer has an attachment |
CreatedDateUTC | UTC timestamp of creation date of bank transfer |
Elements for FromBankAccount and ToBankAccount | |
Code | The Account Code of the Bank Account |
AccountID | The ID of the Bank Account |
Name | The Name Bank Account |
Record filter | You can specify an individual record by appending the BankTransferID to the endpoint, i.e.
GET https://.../BankTransfers/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 bank transfers 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 ) |
Example response when retrieving all BankTransfers
GET https://api.xero.com/api.xro/2.0/BankTransfers
Example response when retrieving a single BankTransfer
GET https://api.xero.com/api.xro/2.0/BankTransfers/f589fb5e-34b3-4392-8207-4ba5a093ea6e
Use this method to create a bank transfer
The following are required to create a bank transfer | |
FromBankAccount | See FromBankAccount |
ToBankAccount | See ToBankAccount |
Amount | |
The following are optional to create a bank transfer | |
Date | The date of the Transfer YYYY-MM-DD. Defaults to current date. |
Elements for FromBankAccount and ToBankAccount | |
Code | The Account Code of the Bank Account. If Code is not included then AccountID is required. |
AccountID | The ID of the Bank Account. If AccountID is not included then Code is required. |
Example of creating a bank transfer between accounts
PUT https://api.xero.com/api.xro/2.0/BankTransfers
You can upload up to 10 attachments(each up to 3mb in size) per bank transfer, once the bank transfer has been created in Xero. To do this you'll need to know the ID of the bank transfer which you'll use to construct the URL when POST/PUTing a byte stream containing the attachment file. e.g. https://api.xero.com/api.xro/2.0/BankTransfers/ f0ec0d8c-6fce-4330-bb3b-8306278c6fd8/Attachments/ image.png. See the Attachments page for more details.
Example of uploading an attachment
POST /api.xro/2.0/BankTransfers/f0ec0d8c-4330-bb3b-83062c6fd8/Attachments/Image002932.png
Headers: Authorization: OAuth... Content Type: image/png Content-Length: 10293 Body: {RAW-IMAGE-CONTENT}
View a summary of the actions made by all users to the bank transfer. See the History and Notes page for more details.
Example retrieving the history of a bank transfer
GET https://api.xero.com/api.xro/2.0/BankTransfers/{Guid}/History
Add a note which will appear in the history against a bank transfer. See the History and Notes page for more details.
Example of creating a note against a bank transfer
PUT https://api.xero.com/api.xro/2.0/BankTransfers/{Guid}/History