# The document object

> Every field in a parsed document, and what is not included.

Section: API reference
Source: https://statementbear.com/docs/api/document-object
Product: StatementBear statement parsing API, $0.49 per document, 25 free.

---

What a `200` returns. Fields are never removed or changed in meaning inside `v1`.

```json
{
  "id": "doc_5f2a9c4b1e77d0a3c8b6e412",
  "object": "document",
  "created": 1785372094,
  "issuer": { "name": "Monzo", "domain": "monzo.com" },
  "currency": "GBP",
  "period": { "year": 2026, "month": 3 },
  "accounts": [
    {
      "type": "bank",
      "last4": "4412",
      "name": null,
      "period": { "year": 2026, "month": 3 },
      "primary": true,
      "totals": { "credits": 3240.00, "debits": 2841.55 },
      "statedTotals": { "credits": 3240.00, "debits": 2841.55 },
      "openingBalance": 1204.11,
      "closingBalance": 1602.56,
      "transactions": [
        {
          "date": "2026-03-04",
          "description": "TESCO STORES 3412",
          "amount": 42.10,
          "direction": "debit",
          "category": "groceries"
        }
      ]
    }
  ],
  "verification": { "reconciled": true, "issues": [] },
  "usage": { "documents": 1 }
}
```

## Fields

Hover or tap a field name for more detail.

| Field | Type | Description |
| --- | --- | --- |
| `id` | `string` | Our id for this parse. Quote it in any support question. Also on the error body of a failed parse, so a failure can be traced to the call that produced it. |
| `object` | `"document"` | Always document. Present so responses are discriminable. A constant today. It is here so a future object type can be told apart without inspecting the rest of the body. |
| `created` | `number` | When we parsed it. Unix seconds. Our clock. The month the document covers is in period. |
| `issuer` | `object` | The bank as printed, plus its domain for logo lookups. domain is null when the institution's website cannot be identified with confidence. |
| `currency` | `string` | ISO 4217. One per document. Issuers do not mix currencies on one statement. A multi-currency provider issues a separate PDF per currency. |
| `period` | `object` | The month the document covers: { year, month } with month 1-12. Each account carries its own period too. They differ only on a combined PDF holding several months for one account. |
| `accounts` | `array` | One entry per account printed on the PDF. Usually one. Some issuers bill several accounts on one statement. They are kept separate because transfers between them are printed on both sides, so merging them counts each transfer as spending and as income. |
| `accounts[].type` | `"bank" \| "credit_card"` | bank covers any deposit account: current, checking, savings. Decides how to read credits. On a credit card they are the repayment and merchant refunds, so counting them as income inflates it. |
| `accounts[].last4` | `string \| null` | Last four of the account or card number, when it is printed. Null when the issuer prints no account or card number, or prints only a masked one. |
| `accounts[].name` | `string \| null` | The account's own name, e.g. "360 Performance Savings". Null when the issuer prints the product name at the top of the page rather than against the account, which is usual on a single-account statement. |
| `accounts[].period` | `object` | The month this account's rows cover. Equal to the document's period except on a combined PDF that holds several months for one account. |
| `accounts[].primary` | `boolean` | The account the issuer printed first. Exactly one per document. Only the primary account carries opening and closing balances, because the statement prints them once for the document. |
| `accounts[].totals` | `object` | Our sum of the rows: { credits, debits }, both positive. Summed from the transactions in this response, so it always agrees with them. |
| `accounts[].statedTotals` | `object \| null` | What the statement itself prints, exactly as printed. Use it to check our extraction against the document. It is not comparable across issuers: Amex's spend total is net of refunds and most banks' is not. |
| `accounts[].openingBalance` | `number \| null` | Opening balance, when the issuer prints one. With closingBalance it is the strongest check available, because the transactions have to account for the movement between them exactly. |
| `accounts[].closingBalance` | `number \| null` | Closing balance, when the issuer prints one. Null on secondary accounts and on issuers that print no balances. On a credit card it is the balance owed, printed positive. |
| `transactions[].date` | `string` | YYYY-MM-DD. The date printed against the row. The posting date on most statements and the transaction date on some. The document does not say which, so we return what is printed. |
| `transactions[].description` | `string` | The payee line as printed. Not normalised. Includes the branch, reference and city where the issuer prints them. Clean it to suit your own matching. |
| `transactions[].amount` | `number` | Always positive. direction carries the sign. Never negative, in any currency, on any account type. Negate when direction is debit for a signed figure. |
| `transactions[].direction` | `"credit" \| "debit"` | Read from the document, never from the payee name. Issuers encode it four ways: a sign on the amount, a section heading owning the rows beneath it, paired debit and credit columns, or a CR marker against a default. A trailing minus means money out on a bank statement and money in on a card statement. |
| `transactions[].category` | `string` | One of a fixed set. A hint for a first cut at spending mix. Not a merchant category code and not derived from one. Do not reconcile it against MCC data or use it where a regulator expects a defined taxonomy. |
| `verification` | `object` | Our check of the extraction against the document. reconciled: true means we checked and found nothing wrong. false with a non-empty issues array means we found something: treat the figures as unverified. |
| `verification.issues` | `string[]` | What did not add up. Often empty. Written for a person triaging a document. Branch on reconciled; show issues to whoever opens the PDF. |
| `usage` | `object` | What the call consumed: { documents }. Always 1 today. A file holding four accounts and six months is one document. X-Billable-Documents says whether it was charged. |

## Guarantees

- `amount` is always positive. `direction` carries the sign.
- Exactly one account has `primary: true`.
- `totals` always agrees with the `transactions` in the same response.
- `period.month` is 1-12.
- `currency` is one ISO 4217 code for the whole document.
- `date` is `YYYY-MM-DD`.

## Not included

- Scores, insights and affordability verdicts.
- Normalised merchant names or merchant ids. `description` is the payee line as printed.
- Balances on secondary accounts. The statement prints them once, for the primary account.
- Anything about the person whose statement it is, beyond what the document prints.

---

All documentation: https://statementbear.com/docs/llms.txt
Questions: api@statementbear.com
