Submit Statement Account Number
POST /api/v1/statements/:id/account-number
Supplies the account number for a statement whose parser could not extract one,
so account detection failed. The value is written to
parsed_data.metadata.acc_no, the statement's error is cleared, and account
detection re-runs from the detect_account step (parsing is not repeated).
This is the API equivalent of the in-app "enter account number" recovery prompt.
Requires the statements:edit permission. The statement must already have
parsed_data (i.e. it reached at least the parse step).
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| id | string | Statement ID |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| acc_no | string | Yes | The account number to inject. Whitespace is trimmed. |
Example Request
curl -X POST "https://statements.finopsbricks.com/api/v1/statements/stmt123xyz/account-number" \
-H "api-key: fob_stm_xxxxxxxxxxxx" \
-H "api-secret: xxxxxxxxxxxxxxxx" \
-H "content-type: application/json" \
-d '{"acc_no": "50100123456789"}'
Response
202 Accepted:
{
"data": {
"id": "stmt123xyz",
"job_id": "01HPXYZ...",
"step": "detect_account"
}
}
Errors
| Code | Description |
|---|---|
| 400 | Missing/empty acc_no, or the statement has no parsed_data yet |
| 401 | Invalid or missing API credentials |
| 403 | API key lacks statements:edit permission |
| 404 | Statement not found |
| 502 | The account-detection job could not be queued |