Bank Transfers


Overview

URL https://api.xero.com/api.xro/2.0/BankTransfers
Methods Supported GET, PUT (Beta)
Description Allows you to retrieve any bank transfers
Allows you to create bank transfers (Beta)

Elements for Bank Transfers

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
The following are only returned on a GET request
<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

Elements for FromBankAccount and ToBankAccount

Either of the following can be specified on a PUT request. At least one is required.
<Code> The Account Code of the Bank Account
<AccountID> The ID of the Bank Account
The following are only returned on a GET request
<Name> The Name Bank Account

PUT BankTransfers (Beta)

Use this method to create a bank transfer

Note the following functionality is not currently supported

  • You cannot specify the reference field
  • You cannot transfer between accounts in different currencies

Example of creating a bank transfers between accounts

<BankTransfers>
  <BankTransfer>
    <FromBankAccount>
      <Code>090</Code>
    </FromBankAccount> 
    <ToBankAccount>
      <Code>091</Code>
    </ToBankAccount> 
    <Amount>20.00</Amount>
  </BankTransfer>
</BankTransfers>

GET BankTransfers

Use this method to retrieve either one more many Bank Transfers

  • By default responses are formatted as XML. You can also retrieve responses in JSON format.
  • The BankTransationID is returned in responses for this endpoint.
  • The two sides of each bank transfer will automatically be recorded as RECEIVE-TRANSFER and SPEND-TRANSFER types in the GET BankTransactions endpoint
  • Optional parameters

    Record filter You can specify an individual record by appending the value to the endpoint, i.e.
    GET https://…/BankTransfers/{identifier}
    BankTransferID – The Xero identifier for a Bank Transfer
    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 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)

    Examples for GET BankTransfers

    1. Getting all bank transfers since a timestamp

    <BankTransfers>
        <BankTransfer>
          <BankTransferID>d79f3e07-5f11-45e4-9d1a-30be536d0e13</BankTransferID>
          <CreatedDateUTC>2014-02-25T19:27:15</CreatedDateUTC>
          <Date>2014-02-26T00:00:00</Date>
          <FromBankAccount>
            <AccountID>ac993f75-035b-433c-82e0-7b7a2d40802c</AccountID>
            <Name>Business Bank Account</Name>
          </FromBankAccount>
          <ToBankAccount>
            <AccountID>ebd06280-af70-4bed-97c6-7451a454ad85</AccountID>
            <Name>Business Savings Account</Name>
          </ToBankAccount>
          <Amount>20.00</Amount>
          <FromBankTransactionID>b11794bc-775b-4f78-9b28-8f13240082ff</FromBankTransactionID>
          <ToBankTransactionID>f589fb5e-34b3-4392-8207-4ba5a093ea6e</ToBankTransactionID>
        </BankTransfer>
      </BankTransfers>
    

    2. Getting an individual bank transfer

    <BankTransfers>
        <BankTransfer>
          <BankTransferID>f589fb5e-34b3-4392-8207-4ba5a093ea6e</BankTransferID>
          <CreatedDateUTC>2014-02-25T19:27:15</CreatedDateUTC>
          <Date>2014-02-26T00:00:00</Date>
          <FromBankAccount>
            <AccountID>ac993f75-035b-433c-82e0-7b7a2d40802c</AccountID>
            <Code>090</Code>
            <Name>Business Bank Account</Name>
          </FromBankAccount>
          <ToBankAccount>
            <AccountID>ebd06280-af70-4bed-97c6-7451a454ad85</AccountID>
            <Code>091</Code>
            <Name>Business Savings Account</Name>
          </ToBankAccount>
          <Amount>20.00</Amount>
          <FromBankTransactionID>b11794bc-775b-4f78-9b28-8f13240082ff</FromBankTransactionID>
          <ToBankTransactionID>f589fb5e-34b3-4392-8207-4ba5a093ea6e</ToBankTransactionID>
          <CurrencyRate>1.000000</CurrencyRate>
        </BankTransfer>
      </BankTransfers>