Skip to main content

kobana finance reconciliations

Commands of kobana finance reconciliations. Every global option (Global options) applies here.

CommandHTTPDescription
reconciliations createPOST /v1/reconciliationsCreate a reconciliation
reconciliations getGET /v1/reconciliations/{id}Get a reconciliation by id
reconciliations deleteDELETE /v1/reconciliations/{id}Delete a reconciliation

reconciliations create​

Create a reconciliation

kobana finance reconciliations create [OPTIONS]

POST /v1/reconciliations

Reconciles billings against bank transactions (n:m), settling every billing (paid/received). Requires scope finance/reconciliations with access level write. All billings must share one polarity and one company; transaction polarity must match (payable↔debit, receivable↔credit). A billing already reconciled/linked, cancelled or draft is rejected (422). Pass an X-Idempotency-Key header on retries.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringyesWorkspace to act on, as a UUID. The token identifies the organization; this header picks which of its workspaces the request reads or writes. It is checked against the token's organization, so a workspace owned by anyone else answers UNKNOWN_WORKSPACE — the same code as one that does not exist. Omitting it answers WORKSPACE_REQUIRED (400).

Request body

NameTypeRequiredDescription
billingsarray<object>yesBillings to reconcile. All must share one kind and one company.
transaction_idsarray<string (uuid)>yesBank transactions to reconcile the billings against.
custom_metadataobjectnoMetadados do usuário: objeto JSON livre. Envie null para limpar. Máx. 64 KB serializado, 16 níveis.

More fields and nested objects: kobana schema finance.reconciliations.create.

Responses

HTTPDescription
201Reconciliation created; the Location header points at GET /reconciliations/{id}.
400Malformed JSON body.
404A billing or transaction was not found within the tenant.
409X-Idempotency-Key reuse with a different body.
422Validation failure: mixed polarity/company, wrong transaction polarity, a member already reconciled/linked, or a cancelled/draft billing.

reconciliations get​

Get a reconciliation by id

kobana finance reconciliations get [ID] [OPTIONS]

GET /v1/reconciliations/{id}

Returns the reconciliation's light id-list shape (source, kind, billing_ids, transaction_ids). Requires scope finance/reconciliations with access level read. 404 when not in the tenant.

Path arguments: id

Query parameters

NameTypeRequiredDescription
fieldsstringnoComma-separated top-level fields to return, e.g. fields=description,amount,due_date. Omit for every field. id is always included; naming an object field returns it whole. An unknown name is a 400 whose details lists unknown and available.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringyesWorkspace to act on, as a UUID. The token identifies the organization; this header picks which of its workspaces the request reads or writes. It is checked against the token's organization, so a workspace owned by anyone else answers UNKNOWN_WORKSPACE — the same code as one that does not exist. Omitting it answers WORKSPACE_REQUIRED (400).

Responses

HTTPDescription
200The reconciliation.
404Reconciliation not found within the tenant.

reconciliations delete​

Delete a reconciliation

kobana finance reconciliations delete [ID] [OPTIONS]

DELETE /v1/reconciliations/{id}

Dissolves a manual reconciliation: reverts every member billing to pending and clears the links. Requires scope finance/reconciliations with access level delete. Imported (fintera) reconciliations are read-only → 422.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringyesWorkspace to act on, as a UUID. The token identifies the organization; this header picks which of its workspaces the request reads or writes. It is checked against the token's organization, so a workspace owned by anyone else answers UNKNOWN_WORKSPACE — the same code as one that does not exist. Omitting it answers WORKSPACE_REQUIRED (400).

Responses

HTTPDescription
200Reconciliation dissolved.
404Reconciliation not found within the tenant.
422The reconciliation is imported (source: fintera) and cannot be dissolved via the API.