Account statements
You can get bank statements for your settlement or escrow account for any given day in rubles—for example, to confirm a payout.
To get a statement, use the report/account_statement method.
Endpoint
/api/v1/report/account_statement
Request parameters
| Name | Mandatory | Type | Description |
|---|---|---|---|
account_number | + | string | Account number (20 digits) for which you request a statement |
date_from | + | date | Statement start date. Example: 2023-06-01 |
date_to | + | date | Statement end date. Example: 2023-06-01 |
The
date_fromanddate_tovalues must match.
Request example
curl -X POST \
https://demo.bank131.ru/api/v1/report/account_statement \
-H 'Content-Type: application/json; charset=utf-8' \
-H 'X-PARTNER-PROJECT: your_project_name' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"date_from": "2023-06-01",
"date_to": "2023-06-01",
"account_number": "40702810600200000014"
}'
Response parameters
| Name | Mandatory | Type | Description |
|---|---|---|---|
status | + | string | Status. Possible values: error, ok |
method | - | object | Method data |
error | - | object | Error |
Successful response example
{
"status": "ok",
"method": {
"name": "account_statement",
"account_statement": {
"date_from": "2022-11-13",
"date_to": "2022-11-13",
"account_number": "40703810500000000025",
"total_turnover": {
"debet": 0,
"credit": 10000
},
"total_balance": {
"opening": 0,
"closing": 10000
},
"transactions": [{
"amount": 10000,
"currency": "rub",
"payment_date": "2022-11-13",
"bank_system_id": "2080040097819020",
"transaction_id": "c7b923ec-844f-4d98-ad02-795d62fe1989",
"session_id": "ps_3230",
"purpose": "Account replenishment",
"counter_party": {
"kpp": "165501001",
"inn": "1655415696",
"name": "Fee for money transfer processing services",
"account_number": "70606810600004710401",
"bank_code": "049205131"
},
"type": "credit"
}]
}
}
}
Unsuccessful response examples
- Invalid dates
- Invalid JSON format
- Internal error
date_from does not match date_to
{
"status": "error",
"error": {
"description": "Invalid input request parameters: (max interval is 1 day)",
"code": "invalid_request"
}
}
date_from is greater than date_to
{
"status": "error",
"error": {
"description": "Invalid input request parameters: (date_to must be greater than date_from); (max interval is 1 day)",
"code": "invalid_request"
}
}
Invalid date in date_from
{
"status": "error",
"error": {
"description": "Invalid value in date_from",
"code": "invalid_request"
}
}
Invalid date in date_to
{
"status": "error",
"error": {
"description": "Invalid value in date_to",
"code": "invalid_request"
}
}
{
"status": "error",
"error": {
"description": "Invalid request",
"code": "invalid_request"
}
}
This response is returned in the following cases:
- the account number is specified incorrectly
- the specified account does not exist
- the specified account does not belong to the user who initiated the request
{
"status": "error",
"error": {
"description": "Internal error",
"code": "internal_error"
}
}