Saltar al contenido principal

kobana finance transfers

Comandos de kobana finance transfers. Toda opción global (Opciones globales) vale aquí.

ComandoHTTPDescripción
transfers createPOST /v1/transfersCrear transferencia
transfers getGET /v1/transfers/{id}Obtener transferencia por ID

transfers create​

Crear transferencia

kobana finance transfers create [OPCIONES]

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.

Encabezados

NombreTipoObligatorioDescripción
X-Workspace-IdstringsíWorkspace 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).

Cuerpo de la solicitud

NombreTipoObligatorioDescripción
from_account_idstring (uuid)síSource account UUID (debited). Must belong to the tenant.
to_account_idstring (uuid)síDestination account UUID (credited). Must belong to the tenant and differ from from_account_id.
amountnumbersíPositive number in BRL (up to 13 integer digits, 2 decimals).
occurred_atstring (date-time)síWhen the movement hits both accounts (ISO 8601).
descriptionstringsí
competence_datestring (date-time)noAccounting period this transfer belongs to. Defaults to occurred_at when omitted.
notesstringno
is_pendingbooleannoDefaults to false. true marks a forecast transfer.
custom_metadataobjectnoMetadados do usuário: objeto JSON livre, gravado nas duas pernas. Envie null para limpar. Máx. 64 KB serializado, 16 níveis.

Otros campos y objetos anidados: kobana schema finance.transfers.create.

Respuestas

HTTPDescripción
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​

Obtener transferencia por ID

kobana finance transfers get [ID] [OPCIONES]

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 de la ruta: id

Parámetros de consulta

NombreTipoObligatorioDescripción
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.

Encabezados

NombreTipoObligatorioDescripción
X-Workspace-IdstringsíWorkspace 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).

Respuestas

HTTPDescripción
200The transfer.
404Transfer not found within the tenant.