Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    Error codes

    What to do for each code that Treasury adds to the shared ones, and the code behind each refusal of the product.

    On this page

    A refused request answers with the error object and a stable code, and a refusal changes nothing. The object, the codes every API shares and which of them to retry are on Errors. This page says what to do for the codes of this API.

    An error

    {
      "code": "statement_gap",
      "message": "The opening balance of the file is not the closing balance of the last statement of the account.",
      "requestId": "5230bc15-93a3-4a2b-afcd-d66c34c7a35a"
    }

    Send the same request again after you fixed the cause, with the same operationId, or send a new change with a new one. See Idempotency and concurrency.

    Codes of this API

    CodeHTTPWhat to do
    not_an_approver422Use an approver of the account. The approvers are set with your account.
    account_not_found404List the accounts and use one of their ids.
    statement_not_found404List the statements of the account and use one of their ids.
    transaction_not_found404Read the id from a list or from the operation result.
    match_not_found404Use the matchId of a booked transaction.
    open_item_not_found404List the open items and use one of their ids.
    payment_not_found404List the payment proposals and use one of their ids.
    batch_not_found404Read the batchId from the answer of the export.
    operation_not_found404Check the operationId; send the change if it was never sent.
    company_not_found404Use the companyId of a company of your account, as the accounts list shows it.
    subscription_not_found404List the subscriptions and use one of their ids.
    delivery_not_found404List the deliveries and use one of their ids.
    nothing_to_retry422Read the delivery: only a delivery whose state is retrying can be retried.
    nothing_parked422Read the delivery: only a delivery whose state is parked can be replayed.
    endpoint_not_answering422Bring the endpoint back, then replay the event.
    statement_duplicate422Nothing to do: read the statement that is stored.
    statement_gap422Import the statement that comes before it first.
    transaction_pending422Import the statement that books it, then match it.
    already_matched422Read the match. To undo a payment, use the return of the bank, which reverses it.
    nothing_to_accept422Split the transaction or book it to an entry.
    invalid_match_state422Read the match and use the operation that fits its state.
    transfer_unavailable422Import the statement of the other account, or choose another transaction.
    open_item_exceeded422Read the open amount of the item and assign no more than that.
    bill_has_proposal422Work on the proposal that exists.
    amount_exceeds_open422Read the open amount of the bill. After a returned payment the open amount returns once the return is matched.
    invalid_payment_status422Read the proposal and use the operation that fits its status.
    self_approval422Ask another approver.
    insufficient_authority422Read requiredAuthority of the proposal and ask an approver who holds it.
    statement_unbalanced422Check that the file is complete and export it again from your bank.
    statement_out_of_period422Export the statement again for the period you mean.
    statement_duplicate_line422Remove the repeated line or import only the days that are new.
    allocation_empty422Send at least one allocation.
    allocation_mismatch422Make the parts add up to the amount, or accept only a match that covers it.
    allocation_exceeds_line422Lower the parts.
    allocation_kind422Use the operation for a transfer, or accept the suggestion for a return.
    wrong_side422Choose items of the other side.
    unknown_entry422Use one of the values listed for entry.
    entry_wrong_side422Use an entry for a debit or for a credit, as the transaction is.
    transfer_same_account422Choose a transaction of another account.
    transfer_mismatch422Choose the transaction with the opposite amount.
    bill_not_payable422Use an open item whose side is payable.
    no_beneficiary_account422Have the bank account of the beneficiary added to your account, then prepare the payment.
    amount_invalid422Send a positive decimal string.
    reason_required422Send reason.
    batch_empty422Send at least one paymentIds entry.
    mixed_accounts422Export one file for each account.

    Refusals of the product

    The product refuses an action with a sentence. The API refuses the same action with the code on the right.

    The product saysThe API answers
    This line is not in the statements.transaction_not_found
    This account does not exist.account_not_found
    This invoice or bill is not in the ledger of the company.open_item_not_found
    This payment does not exist.payment_not_found
    The record changed since you opened it. Open it again.revision_conflict
    A pending line is matched once the bank books it.transaction_pending
    This line is already matched.already_matched
    There is no suggestion to accept. Split the line or book it to an entry.nothing_to_accept
    The line is not in a state that allows this.invalid_match_state
    The parts do not add up to the amount of the line.allocation_mismatch
    Choose at least one invoice or bill.allocation_empty
    The parts are larger than the line.allocation_exceeds_line
    A split holds invoices, bills and entries only.allocation_kind
    The invoice or bill does not owe that much any more.open_item_exceeded
    A credit is matched to invoices you issued, a debit to bills you received.wrong_side
    This entry does not exist.unknown_entry
    This entry does not fit the direction of the line.entry_wrong_side
    Both lines are on the same account.transfer_same_account
    The two lines are not the same amount in opposite directions.transfer_mismatch
    The other line is already matched or not yet booked.transfer_unavailable
    Only a line that was left can be reopened.invalid_match_state
    This statement is already imported.statement_duplicate
    The statement does not start where the last one ended.statement_gap
    The lines do not add up to the closing balance.statement_unbalanced
    A line is dated outside the period of the statement.statement_out_of_period
    A line of the file is already stored or repeated in the file.statement_duplicate_line
    Only a bill you received can be paid.bill_not_payable
    The account of the beneficiary is not on file.no_beneficiary_account
    This bill already has a payment proposal.bill_has_proposal
    Enter an amount greater than zero.amount_invalid
    The amount is more than the bill still owes.amount_exceeds_open
    The payment is not in a status that allows this.invalid_payment_status
    This person does not approve payments.not_an_approver
    A payment is never approved by the person who prepared it.self_approval
    This amount needs a director.insufficient_authority
    Write the reason.reason_required
    Only approved payments are exported.invalid_payment_status
    Choose at least one payment.batch_empty
    One file holds the payments of one account.mixed_accounts

    Where next