POST
/businesses/{bid}/expenses/recordCreate and record in one call
POST /businesses/{bid}/expenses/record
Requires the expenses scope.
A complete receipt in hand and no draft to keep: the same input the record step takes, recorded in one round-trip. Idempotent on the key.
Path parameters
| Name | Type | Description | |
|---|---|---|---|
bid | string | required | Business id, from POST /businesses. |
Headers
| Name | Type | Description | |
|---|---|---|---|
Idempotency-Key | string | Your own stable id for this call. A retry returns the same row with deduped: true instead of creating a duplicate. Interchangeable with externalRef in the body. |
Body
| Field | Type | Description | |
|---|---|---|---|
input | object | required | Same fields as creating an expense. |
Response
201: { "ok": true, … }
| Field | Type | Description | |
|---|---|---|---|
ok | boolean | required | |
expense | Expense | required | The purchase side of the ledger. A recorded expense is immutable; correct it with a storno. |
Errors: 400, 401, 403, 404, 409, 429. Every failure answers { "error": …, "reason": … }. Branch on reason.