Skip to main content
POST
https://api.owem.com.br
/
v4
/
i
/
ledger
/
extract
Generate Bank Statement
curl --request POST \
  --url https://api.owem.com.br/v4/i/ledger/extract \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "accountId": "<string>",
  "startDate": {},
  "endDate": {},
  "format": "<string>",
  "options": {
    "options.sections": {
      "summary": true,
      "monthlyTable": true,
      "monthSummary": true,
      "transactionTable": true
    },
    "options.columns": {
      "dateTime": true,
      "type": true,
      "description": true,
      "endToEndId": true,
      "payerReceiver": true,
      "payerBankInfo": true,
      "grossAmount": true,
      "fee": true,
      "netAmount": true,
      "status": true
    }
  }
}
'
{
  "requestId": "b38de769-1b3f-4730-b6e5-858a72982890",
  "success": true,
  "size": 1,
  "data": {
    "success": true,
    "extractId": "bd17bf27-1b14-490d-bcd8-ab6e679010ff",
    "status": "new"
  }
}

Purpose

This endpoint requests the generation of a bank statement in PDF or CSV format for a specific account. Processing is asynchronous: the API returns immediately with a 202 Accepted status and an extractId. Use the Get Generated Statement endpoint to check the status and get the download link when ready. You can customize the statement content through the options field:
  • Sections (options.sections): choose which parts of the report to include — general summary, monthly table, monthly summary and/or transaction table.
  • Columns (options.columns): choose which columns appear in the transaction table — date/time, type, description, E2E, payer/receiver, bank, amounts, status, etc.
If the options field is not sent, all sections and columns are included by default.

Authentication

Authorization
string
required
Basic Auth required in format: Basic {Base64(API_KEY:API_SECRET)}
Requires the ledger_extract:create scope on the API Key.

Request Body

accountId
string
required
Bank account ID to generate the statement for.
startDate
number | string
required
Period start. Accepts timestamp in milliseconds (e.g. 1770778800000) or date string in YYYY-MM-DD format (e.g. "2026-02-11").
endDate
number | string
required
Period end. Accepts timestamp in milliseconds (e.g. 1770951600000) or date string in YYYY-MM-DD format (e.g. "2026-02-13").
format
string
default:"pdf"
Statement format. Values: pdf, csv
options
object
Statement customization options. If omitted, all sections and columns are included.

Response

requestId
string
UUID for request tracking.
success
boolean
Operation status.
size
number
Number of records returned.
data
object
{
  "requestId": "b38de769-1b3f-4730-b6e5-858a72982890",
  "success": true,
  "size": 1,
  "data": {
    "success": true,
    "extractId": "bd17bf27-1b14-490d-bcd8-ab6e679010ff",
    "status": "new"
  }
}

Validations

RuleDescription
accountIdRequired. Must belong to the API Key user.
startDateRequired. Timestamp in ms or YYYY-MM-DD string.
endDateRequired. Timestamp in ms or YYYY-MM-DD string.
startDate ≤ endDateStart date cannot be after end date.
Maximum range365 days between startDate and endDate.
formatMust be pdf or csv. Default: pdf.

Status Codes

HTTPDescription
202Request accepted (asynchronous processing)
400Validation failed
401Invalid credentials
403No permission for the account or insufficient scope
429Rate limit exceeded
500Internal error

Asynchronous Flow

1

Request Statement

Send a POST /v4/i/ledger/extract with the desired parameters. The API returns 202 with the extractId.
2

Processing

The system processes the statement in the background. Status changes from new to processing.
3

Check Status

Use GET /v4/i/ledger/extract/{extractId} to monitor. When status is done, the reportUrl field contains the download link.
Processing time varies based on the volume of transactions in the period. Statements with thousands of transactions may take a few seconds.
The reportUrl is a signed URL valid for 24 hours. After this period, the URL expires and you will need to generate a new statement. We recommend downloading the file (PDF/CSV) as soon as the status is done.