Configuration
Generate report from data
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](/api-reference/transactions/transactions_id_get).
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
POST
api_reports_generation_post
Authorizations
Path Parameters
An id that uniquely identifies the account.
Required string length:
9Query 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
Available options:
monthly, weekly, daily, custom, none Whether to save the generated report in s3 or not, if set to true returns 201
Response
Report file
The response is of type string.