Reports Payments Export
This endpoint for creating an export file of a selection of payments
Reference
POST /reports/payments/export
Fields
field | type | description/constraints | Req |
---|---|---|---|
userId | int | The userId | Yes |
orderId | int | The orderId | No |
invoiceId | string | The invoiceId | No |
afasInvoiceId | string | The afas invoiceId | No |
status | string | Available options: | No |
- paid | |||
- cancelled | |||
- failed | |||
- expired | |||
dateStart | datetime | No | |
dateEnd | datetime | No | |
format | string | Default: xlsx | No |
Available options: | |||
- xlsx | |||
- csv | |||
- json | |||
- xml | |||
url | boolean/string | true -> return a URL for downloading the exportfile (default) | No |
false -> direct download of binary data | |||
Please note: authentication-token has to be provided when downloading the report, just like any other endpoint. | |||
The url will only be valid for a period of 10 minutes. | |||
After the file has been downloaded, it is automatically removed. |
Example
Request
POST /rest/v1/reports/payments/export HTTP/2
{
"userId": 12311,
"dateStart": "2019-01-01 00:00:00",
"dateEnd": "2020-01-01 00:00:00",
"format": "xlsx",
"url": true
}
Response
{
"result": true,
"errors": [],
"data": {
"userId": 12311,
"dateStart": "2019-01-01 00:00:00",
"dateEnd": "2020-01-01 00:00:00",
"format": "xlsx",
"url": "https://api.goedgeplaatst.nl/rest/v1/reports/download/api_reports_transactions_12996OiD6HQ.xlsx"
}
}