Pular para o conteúdo principal

kobana finance transfers

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

ComandoHTTPDescrição
transfers createPOST /v1/transfersCriar transferência
transfers getGET /v1/transfers/{id}Obter transferência por ID

transfers create​

Criar transferência

kobana finance transfers create [OPÇÕES]

POST /v1/transfers

Creates an account-to-account transfer as a linked debit/credit pair sharing one transfer_id. Requires scope finance/transactions with access level write. The two accounts must differ, both must belong to the tenant, and both must have a linked company (cross-company is allowed). 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
from_account_idstring (uuid)simSource account UUID (debited). Must belong to the tenant.
to_account_idstring (uuid)simDestination account UUID (credited). Must belong to the tenant and differ from from_account_id.
amountnumbersimPositive number in BRL (up to 13 integer digits, 2 decimals).
occurred_atstring (date-time)simWhen the movement hits both accounts (ISO 8601).
descriptionstringsim
competence_datestring (date-time)nãoAccounting period this transfer belongs to. Defaults to occurred_at when omitted.
notesstringnão
is_pendingbooleannãoDefaults to false. true marks a forecast transfer.
custom_metadataobjectnãoMetadados do usuário: objeto JSON livre, gravado nas duas pernas. Envie null para limpar. Máx. 64 KB serializado, 16 níveis.

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

Respostas

HTTPDescrição
201Transfer created. The Location header points at GET /transfers/{transfer_id}.
400Malformed JSON body.
404A source/destination account was not found within the tenant.
409X-Idempotency-Key reuse with a different body.
422Schema validation failure, same source/destination account, non-positive amount, or an account without a linked company.

transfers get​

Obter transferência por ID

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

GET /v1/transfers/{id}

Returns the linked debit/credit pair for a transfer_id. Requires scope finance/transactions with access level read. 404 when the transfer is 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 transfer.
404Transfer not found within the tenant.