List account statement

This endpoint is used to query the bank account balance.

Params (Query Params)

ParameterValueDescriptionExample
account_branch_identifierNumberRequired. The bank branch identifier/agency codeEx: 0001
account_numberNumberRequired. The account numberEx: 401050

Headers

ParameterTypeDescriptionExample
AuthorizationStringBearer + Access_tokenBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzEzMzAwOTMxLCJpYXQiOjE3MTMyOTczMzEsImp0aSI6Ijc2ZWI4ZTE5ZjM4YjQ4NmZiODdmNzNjNTdkMWVmNDJhIiwidXNlcl9pZCI6MjQ2fQ.5zekMa7CUj9p-MvNHns5ke4ZPhYV3Y1CLOsYL7hDUUo

Params (Query Params)

ParameterTypeDescriptionExample
startdatetimeRequired. Start datetime in ISO formatstart=2023-10-01T00:00:00
enddatetimeRequired. End datetime in ISO formatend=2023-10-31T23:59:59
limitintegerOptional. Number of records per page (Min: 1, Max: 100, Default: 50)limit=20
cursor_idintegerOptional. Cursor ID for pagination navigationcursor_id=12345
cursor_datetimedatetimeOptional. Cursor datetime for pagination navigation (ISO 8601 format)cursor_datetime=2023-10-15T14:30:00
cursor_directionstringOptional. Pagination direction: next or previous (Default: next)cursor_direction=next

Example Requests

Basic Request

GET /v3/account-statements/1234/567890?start=2023-10-01T00:00:00&end=2023-10-31T23:59:59

Request with Pagination

GET /v3/account-statements/1234/567890?start=2023-10-01T00:00:00&end=2023-10-31T23:59:59&limit=25&cursor_direction=next

cURL Example

curl -X GET "https://api.saq.digital/v3/account-statements/1234/567890?start=2023-10-01T00:00:00&end=2023-10-31T23:59:59&limit=50" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json"

Important Filter Rules

Pagination Flow:

  1. First Request: Make a request without cursor parameters
  2. Next Page: Use the next URL from the response
  3. Previous Page: Use the previous URL from the response
  4. Direction Control: Use cursor_direction parameter ("next" or "previous")

Pagination Example Flow

# Step 1: First request
GET /v3/account-statements/1234/567890?start=2023-10-01T00:00:00&end=2023-10-31T23:59:59&limit=10

# Step 2: Use the "next" URL from response
GET /v3/account-statements/1234/567890?start=2023-10-01T00:00:00&end=2023-10-31T23:59:59&limit=10&cursor_id=12345&cursor_datetime=2023-10-15T14:30:00&cursor_direction=next

Response Schema (200 OK)

{
  "next": "https://api.saq.digital/v3/account-statements/1234/567890?cursor_id=12345&cursor_datetime=2023-10-15T14:30:00&cursor_direction=next",
  "previous": null,
  "results": [
    {
      "credit_or_debit": "CREDIT",
      "transaction_type": "PIX_CASHIN",
      "amount": 1500.50,
      "date_time": "2023-10-15T14:30:00",
      "date_time_utc": "2023-10-15T14:30:00Z",
      "identification": "PIX123456789",
      "code_transaction": "PIX123456789",
      "code": 12345,
      "qr_code_id": 98765,
      "transaction_id": 54321,
      "tag_id": "TAG_ABC123"
    },
    {
      "credit_or_debit": "DEBIT",
      "transaction_type": "PIX_CASHOUT",
      "amount": 750.25,
      "date_time": "2023-10-15T10:15:00",
      "date_time_utc": "2023-10-15T10:15:00Z",
      "identification": "PIX987654321",
      "code_transaction": "PIX987654321", 
      "code": 12346,
      "qr_code_id": null,
      "transaction_id": 54322,
      "tag_id": "TAG_XYZ789"
    }
  ]
}

Response Fields

Main Response

FieldTypeDescription
workedbooleanIndicates if the request was processed successfully
nextstring\nullURL for the next page (null if no more pages)
previousstring\nullURL for the previous page (null if first page)
resultsarrayList of MED records

Statement Item Fields

FieldTypeDescription
credit_or_debitenumTransaction direction: "CREDIT" or "DEBIT"
transaction_typeenumURL for the next page (null if no more pages)
amountdecimalTransaction amount
date_timedatetimeTransaction datetime
date_time_utcdatetimeTransaction datetime in UTC
identificationstring\nullTransaction identification
code_transactionstring\nullTransaction code
codeintegerInternal transaction code
qr_code_idinteger\nullQR code ID if applicable
transaction_idinteger\nullAssociated transaction ID
tag_idstring\nullTransaction tag identifier

Transaction Enums

ValueDescription
CREDITMoney entering the account (cashin)
DEBITMoney leaving the account (cashout)

Transaction Types (transaction_type)

ValueDescription
PIX_CASHINPIX incoming payment received
PIX_CASHOUTPIX outgoing payment sent
PIX_CASHIN_TAXTax charged on PIX incoming payment
PIX_CASHOUT_TAXTax charged on PIX outgoing payment
PIX_CASHOUT_TAX_MEDTax charged on PIX outgoing payment for MED
PIX_CHARGEBACKPIX chargeback transaction
PIX_CHARGEBACK_REFUNDRefund of a PIX chargeback
PIX_CASHOUT_REFUNDRefund of a PIX outgoing payment
PIX_CREDIT_IN_ACCOUNTPIX credit directly added to account
Language
Click Try It! to start a request and see the response here!