Reports API (LATEST)

API Integration Support: integration@dintero.com License: UNLICENSED

Changelog

All notable changes to the API.

2021-12-01

Updated returned report metadata to reflect the additinonal data stored pr. report

2021-09-23

Removed not implemented endpoint from spec
Added admin:reports scope to endpoints

2021-08-31

Added new endpoint for fetching reports metadata

2021-08-26

Removed not implemented endpoint from spec
Added new save flag for persisting reports
Added new response for when the save flag is used to persist reports

reports

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.

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
Authorizations:
JWT
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

query Parameters
template_id
required
string

The template to generate report from

example:

  • checkout_transaction_order
template_data_path
required
string

Path to the data for the report

examples:

  • /checkout/v1/transactions/{transaction.id}
template_accept
required
string

The Content-Type for the report

examples:

  • application/pdf
template_accept_language
required
string

The Content-Language for the report

examples:

  • no
  • en
template_accept_timezone
string <iana-timezone>

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
data_from
string <date-time>

The start of the data interval

data_to
string <date-time>

The end of the data interval

schedule
string
Enum: "monthly" "weekly" "daily" "custom" "none"

Schedule for the report

save
boolean

Whether to save the generated report in s3 or not, if set to true returns 201

Request Body schema: application/json
required
Array
key
required
string
path
required
string
data
required
object

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
"string"

List report metadata

Get list of report metadata for the account

Scopes:

  • read:reports
  • admin:reports
Authorizations:
JWT
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

query Parameters
limit
integer [ 1 .. 100 ]
Default: 10

A limit on the number of objects to be returned. Limit can range between 1 and 100 items, and the default is 10 items.

starting_after
string

cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, end the result contains paging_token=pt1, your subsequent call can include starting_after=pt1 in order to fetch the next page of the list.

Responses

Response samples

Content type
application/json
{
  • "reports": [
    ],
  • "starting_after": "string"
}