api_reports_generation_post
Using this endpoint with the query parameter save set to true, will result in an 201 response, otherwise, the response will be 200.
Generate PDF report for transaction:
First, fetch the transaction from Get transaction.
Store the transaction in the transaction variable and send this payload:
[
{
"key": "transaction",
"path": "/checkout/v1/transactions/{transaction.id}",
"data": transaction
}
]
with these query parameters set:
- template_id=checkout_transaction_order
- template_data_path=/checkout/v1/transactions/{transaction.id}
- template_accept=application/pdf
- template_accept_language=en
scopes:
- admin:reports
- write:reports
- read:reports
Path parameters
An id that uniquely identifies the account.
Query parameters
The template to generate report from
example:
- checkout_transaction_order
Path to the data for the report
examples:
- /checkout/v1/transactions/{transaction.id}
The Content-Type for the report
examples:
- application/pdf
The Content-Language for the report
examples:
- no
- en
The timezone for the report List of timezones: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones Defaults to Europe/Oslo
examples:
- Europe/Stockholm
- Europe/London
- Europe/Helsinki
The start of the data interval
The end of the data interval
Schedule for the report
Whether to save the generated report in s3 or not, if set to true returns 201
Request body
Response
Report file