With this endpoint bank transactions can be added to a new bank statement, or to an existing one.
Whether to create a new statement or use an existing one depends on the statementName parameter. If the specified name refers to an existing bank statement, it will be used and the provided transactions will be added to the existing one, otherwise a new statement will be created. Please make sure to use unique bank statement names if you don't want to accidentally add lines to an existing statement.
Please note, that unlike the bank statement import functionality which is available in the Money section of Clear Books, this method won't check the uniqueness of transactions. E.g. posting the same transaction twice (regardless if it's in the same request or in different requests) will result in the transaction added multiple times.
You might also need to take a look at the listBankAccounts method, which amongst other data returns the account code of existing bank accounts (gl_account_code), which needs to be provided in the bankAccount field of this method.
Field | Type | Description | |
---|---|---|---|
bankAccount | integer | The account code of the bank account (e.g.: 7502001). Please take a look at listBankAccounts if you want to retrieve a list of existing bank accounts. | required |
statementName | string | The name of the bank statement. If you specify the name of an existing statement then transactions will be added to that one, otherwise a new statement will be created. | optional |
statementLines | array | A list of bank statement transactions. | optional |
BankStatementLine description | string | The description of the transaction. | optional |
BankStatementLine date | string | The bank date of the transaction (specified in YYYY-MM-DD format). | optional |
BankStatementLine amount | float | The amount of the transaction. | optional |
Field | Type | Description | |
---|---|---|---|
This method returns no parameters. |
<?xml version="1.0" encoding="UTF-8"?> <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"> <Header> <authenticate xmlns="https://secure.clearbooks.co.uk/api/accounting/soap/"> <apiKey xmlns="">yourApiKey</apiKey> </authenticate> </Header> <Body> <addBankStatementLines xmlns="https://secure.clearbooks.co.uk/api/accounting/soap/"> <bankAccount>7502001</bankAccount> <statementName>apiStatement</statementName> <statementLines> <BankStatementLine> <description>test1</description> <date>2017-12-01</date> <amount>200.24</amount> </BankStatementLine> <BankStatementLine> <description>test2</description> <date>2017-12-02</date> <amount>-56.43</amount> </BankStatementLine> </statementLines> </addBankStatementLines> </Body> </Envelope> |
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body/> </SOAP-ENV:Envelope> |
Clear Books, accredited by The Institute of Certified Bookkeepers and registered with the Financial Conduct Authority (reg. no. 843585), delivers valued, comprehensive online accounting software for small businesses in the UK.