# Exporting transaction statements
# Initializing the export process
This API allows you to bulk-export transaction statements in PDF format, with and without a facsimile signature. The basic principles of working with the API are described above.
PLEASE NOTE!
Statements are generated asynchronously. Generation time varies from a few seconds to approximately half an hour, depending on the number of operations in the request.
Requires the scopes report.read, report.write, clients.read, transactions.read, and clients:client.read, which must be requested during authentication.
| Parameter | Type | Required | Description |
|---|---|---|---|
| cs1_ids | array | Yes | List of payment IDs for which statements will be generated |
| sign_type | string | Yes | Signature type to use: 1) no_sign — without signature 2) sign1 — with facsimile signature of Sizov A.E. |
Request:
POST https://api.psp.io/report-generator-nt/v1/report/payments/transactions/statements
{
"cs1_ids": [
"43913ddc000c4d3990fddbd3980c1725",
"1e68b13b34e247fd9ac3583ae9947127"
],
"sign_type": "sign1"
}
Response if the request is successfully created:
{
"report": {
"id": "9506073e-457d-4385-8eab-837672704c91",
"status": "initial",
"report_type": "report",
"error_message": null,
"created_at": "2023-05-29T20:38:55.469834Z",
"updated_at": "2023-05-29T20:38:55.469834Z"
}
}
# Checking export status
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Request id — at the end of the URL, specify the id received in the response when initializing the process |
Request:
GET https://api.psp.io/report-generator-nt/v1/report/9506073e-457d-4385-8eab-837672704c91
Response if the request is successfully created:
{
"report": {
"id": "9506073e-457d-4385-8eab-837672704c91",
"status": "success",
"report_type": "report",
"error_message": null,
"created_at": "2023-05-29T20:38:55.469834Z",
"updated_at": "2023-05-29T20:38:56.091098Z"
}
}
If the request status is success, it has been generated successfully and you can download the archive with files.
# Downloading statements in PDF
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Request id — in the URL, specify the id received in the response when initializing the process |
Request:
GET https://api.psp.io/report-generator-nt/v1/report/9506073e-457d-4385-8eab-837672704c91/download
Response if the request is successfully created:
The response will contain the raw bytes of PDF files. Save this response to a file. The result will be an archive response.zip with statements for the requested operations.