Pular para o conteúdo principal

kobana finance reconciliations

Comandos de kobana finance reconciliations. Toda opção global (Opções globais) vale aqui.

ComandoHTTPDescrição
reconciliations createPOST /v1/reconciliationsCriar conciliação
reconciliations getGET /v1/reconciliations/{id}Obter conciliação por ID
reconciliations deleteDELETE /v1/reconciliations/{id}Excluir conciliação

reconciliations create​

Criar conciliação

kobana finance reconciliations create [OPÇÕES]

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.

Cabeçalhos

NomeTipoObrigatórioDescrição
X-Workspace-IdstringsimWorkspace 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).

Corpo da requisição

NomeTipoObrigatórioDescrição
billingsarray<object>simBillings to reconcile. All must share one kind and one company.
transaction_idsarray<string (uuid)>simBank transactions to reconcile the billings against.
custom_metadataobjectnãoMetadados do usuário: objeto JSON livre. Envie null para limpar. Máx. 64 KB serializado, 16 níveis.

Outros campos e objetos aninhados: kobana schema finance.reconciliations.create.

Respostas

HTTPDescrição
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​

Obter conciliação por ID

kobana finance reconciliations get [ID] [OPÇÕES]

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.

Argumentos do caminho: id

Parâmetros de consulta

NomeTipoObrigatórioDescrição
fieldsstringnãoComma-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.

Cabeçalhos

NomeTipoObrigatórioDescrição
X-Workspace-IdstringsimWorkspace 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).

Respostas

HTTPDescrição
200The reconciliation.
404Reconciliation not found within the tenant.

reconciliations delete​

Excluir conciliação

kobana finance reconciliations delete [ID] [OPÇÕES]

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.

Argumentos do caminho: id

Cabeçalhos

NomeTipoObrigatórioDescrição
X-Workspace-IdstringsimWorkspace 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).

Respostas

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