List Statements

GET /api/v1/statements

Returns a paginated list of statements.

Query Parameters

ParameterTypeDefaultDescription
pagenumber1Page number
limitnumber100Items per page (max 500)
fieldsstringallComma-separated field names
is_archivedboolean-Filter by archived status
accountstring-Filter by account ID
stepstring-Filter by processing step
file_typestring-Filter by file type (csv, pdf, xlsx)
parser_typestring-Filter by parser type
period_fromstring-Filter statements overlapping on/after this date (YYYY-MM-DD)
period_tostring-Filter statements overlapping on/before this date (YYYY-MM-DD)
period_sourcestring-Filter by period source (extracted, computed, user_entered)
period_missingboolean-Filter statements with missing period data
upload_fromstring-Filter by upload date on/after this date (YYYY-MM-DD, on created_at)
upload_tostring-Filter by upload date on/before this date (YYYY-MM-DD, on created_at)
reviewedboolean-Filter by review status. false includes never-reviewed statements
sort_bystringcreated_atSort column: created_at, period_start, period_end, file_size
sort_orderstringDESCSort direction: ASC or DESC

Example Request

curl -X GET "https://statements.finopsbricks.com/api/v1/statements" \
  -H "api-key: fob_stm_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx"

Example: List Statements for Account

curl -X GET "https://statements.finopsbricks.com/api/v1/statements?account=acc123&is_archived=false" \
  -H "api-key: fob_stm_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx"

Example: Find Failed Statements

curl -X GET "https://statements.finopsbricks.com/api/v1/statements?step=uploaded" \
  -H "api-key: fob_stm_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx"

This returns statements that haven't progressed past the initial upload step, which may indicate processing issues.

Example: Filter by File Type

curl -X GET "https://statements.finopsbricks.com/api/v1/statements?file_type=pdf" \
  -H "api-key: fob_stm_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx"

Example: Filter by Statement Period

Find all statements that cover December 2024:

curl -X GET "https://statements.finopsbricks.com/api/v1/statements?period_from=2024-12-01&period_to=2024-12-31" \
  -H "api-key: fob_stm_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx"

This uses overlap logic: a statement is included if its period intersects with the query range.

Example: Find Statements with Missing Period

curl -X GET "https://statements.finopsbricks.com/api/v1/statements?period_missing=true" \
  -H "api-key: fob_stm_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx"

Example: Unreviewed Statements Uploaded This Month

reviewed=false includes statements that have never been reviewed:

curl -X GET "https://statements.finopsbricks.com/api/v1/statements?reviewed=false&upload_from=2025-01-01" \
  -H "api-key: fob_stm_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx"

Example: Sort by Largest File

curl -X GET "https://statements.finopsbricks.com/api/v1/statements?sort_by=file_size&sort_order=DESC" \
  -H "api-key: fob_stm_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx"

Response

{
  "data": [
    {
      "id": "stmt123xyz",
      "file_name": "statement_jan_2025.pdf",
      "mime_type": "application/pdf",
      "file_type": "pdf",
      "file_size": "245760",
      "parser_type": "hdfc_savings__pdf",
      "step": "complete",
      "error": null,
      "account_id": "acc123",
      "account_name": "Main Account",
      "account_currency": "INR",
      "is_archived": false,
      "created_at": "2025-01-05T10:30:00.000Z",
      "period_start": "2025-01-01",
      "period_end": "2025-01-31",
      "opening_balance": 5000050,
      "closing_balance": 4825075,
      "data_source": {
        "period_start": "extracted",
        "period_end": "extracted",
        "opening_balance": "computed",
        "closing_balance": "computed"
      },
      "review": {
        "is_done": true,
        "at": "2025-01-06T14:30:00.000Z",
        "type": "human",
        "by": "user123",
        "work_record_id": "wr456"
      }
    }
  ],
  "page_context": {
    "count": 1,
    "page": 1,
    "per_page": 100,
    "total": 25,
    "has_more": false
  }
}

Response Fields

See Statement Object for field descriptions.

Errors

CodeDescription
401Invalid or missing API credentials
403API key lacks statements:read permission