Push one bank statement (camt.053 as JSON): its lines are staged as bank lines and its balances checked. Books nothing.
Changed onThe statement of one bank account, camt.053 flattened: iban and currency (Acct), statement_id (Stmt/Id), opening_date/opening_balance (the opening booked balance, at the start of that day), closing_date/closing_balance (the closing booked balance, at the end of that day) and entries (Ntry, amount signed: CdtDbtInd folded into the sign; every booking_date between the two balance dates). Amounts are decimal strings in the account's precision. Answers 201 with push_id, import_id, inserted, duplicate and chain (ok or breaks). Requires an Idempotency-Key header (8 to 200 characters): a retry with the same key and the same statement answers the first result with replayed: true; the same key over another statement is refused with idempotency_conflict. Refused whole, with reason, when the opening plus the entries is not the closing (fin.bank_push_unbalanced), when the opening does not continue the account's newest balance (fin.bank_push_opening_mismatch) or starts before it (fin.bank_push_overlaps), when entries taken for lines the account already holds leave the period unbalanced (fin.bank_push_duplicates_unbalanced), or when the iban or currency is another account's. An entry's external_id is read as this app's own, and this statement's when statement_id is given. Only an app Magistry reviewed for finance may push. Nothing is booked: a person classifies and reconciles the lines in Books.
Request
- Base URLhttps://app.magistry.io
- Auth
- HTTP bearer
- or OAuth 2Authorization codehttps://app.magistry.io/api/oauth/authorizeToken URLhttps://app.magistry.io/api/oauth/tokenScopesfinance:write
Headers
Required, here or as idempotency_key in the body. A unique string you choose for this request; send the SAME key when retrying and the first answer is returned instead of writing twice (idempotent-replayed: true). The same key with other arguments is 409 idempotency_conflict. If the header and idempotency_key are both sent they must be equal.
Request body
The entity, one of those this app was granted (GET /api/v1/finance/entities lists them). In a GET query string entity is accepted too.
The bank account (GET /api/v1/finance/bank-accounts lists them).
The account's IBAN as the statement states it (Acct/Id/IBAN).
The account's currency, ISO 4217 (Acct/Ccy).
The statement's own id (Stmt/Id).
Bal OPBD: the day whose opening balance this is.
Bal OPBD: the balance at the start of opening_date, signed.
Bal CLBD: the day whose closing balance this is.
Bal CLBD: the balance at the end of closing_date, signed.
Ntry: the lines, at most 5000.
Same as the Idempotency-Key header; give one of the two.
Response
Result
Changes
- warning
added the new
method_not_allowedenum value to theerrorresponse property for the response status - warning
added the new
method_not_allowedenum value to theerrorresponse property for the response status - warning
added the new
method_not_allowedenum value to theerrorresponse property for the response status
11 more changes in this revision
- warning