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

ParameterTypeDescription
idstringStatement ID

Request Body

FieldTypeRequiredDescription
acc_nostringYesThe 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

CodeDescription
400Missing/empty acc_no, or the statement has no parsed_data yet
401Invalid or missing API credentials
403API key lacks statements:edit permission
404Statement not found
502The account-detection job could not be queued