Crear transacción
POST/financial-transactions
Creates a single transaction. Requires scope finance.transactions.write. workspace_id is always taken from the token, never from the body. auto_created and transfer_id are always server-controlled — values in the request are ignored. {name} accepted as alternative to {id} inside the nested person / category / classification_center object, for CSV-importer ergonomics; sending both inside the same object returns 400. Send classification_centers[] to split the amount across classification centers (rateio): effective amounts must sum to amount (1-cent tolerance) and each center's polarity must match type (both matches either). When present it supersedes the single classification_center field (which then mirrors rows[0]); the full split rides back on every read as classification_center_allocations[]. Pass an X-Idempotency-Key header on retries to avoid duplicate inserts.
Solicitud
Respuestas
- 201
- 400
- 401
- 403
- 409
- 422
- 429
- 500
Transaction created. The Location header points at the new row. X-Idempotent-Replay: true indicates a cached response from a previous identical request.
Malformed JSON body, or id and name sent together inside the same nested entity reference.
Missing / invalid / expired / revoked token.
Token lacks the finance.transactions.write scope.
X-Idempotency-Key was reused with a different request body.
Schema validation failure, or domain consistency violation (company / account not in tenant, account does not match company, FK out of scope).
Rate limit exceeded for this token. Reads and writes have separate budgets, both on a 1-hour sliding window. The response carries X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset and Retry-After — wait out Retry-After rather than retrying immediately.
Unhandled server error.