Skip to Content
Docs
Report runs

Start a report run

POST/report_runs

Builds one report in the background, with the same data and definitions as Insights. Pay.com sends report_run.succeeded with a short-lived download link.

Headers

AuthorizationstringRequired
HTTP Basic auth: your API key as the password, with an empty username. See Authentication.
idempotency-keystring

A unique key, such as a UUID, that makes a POST safe to retry. Pay.com keeps each key for 24 hours, separately for each workspace. A retry with the same key, endpoint and body gets the first response. Another endpoint or body gets 400 idempotency_error, and a retry while the first is running gets 409.

Parameters

typestringRequired

One of orders, order_items, subscriptions, mrr_movements, subscribers, seats, cohorts, trials, recovery, invoices, credit_notes, refunds, disputes, tax, settlements, customers, payment_methods or checkout_conversion.

periodobjectRequired

A subscriptions report is a snapshot at end.

Show 2 child parametersHide child parameters
startstringRequired
endstringRequired
filtersobject
Show 5 child parametersHide child parameters
sellerstring

One of merchant or pay_com.

countrystring
productstring
sourcestring

An engine, app_store or google_play.

currencystring
reporting_currencystring

Converts every amount into this currency at each day's rate. Defaults to your workspace's reporting currency.

Returns

The report run, pending.

idstring
resourcestring
statusstring

One of pending, succeeded or failed.

typestring

One of orders, order_items, subscriptions, mrr_movements, subscribers, seats, cohorts, trials, recovery, invoices, credit_notes, refunds, disputes, tax, settlements, customers, payment_methods or checkout_conversion.

periodobject
Show 2 child attributesHide child attributes
startstring
endstring
filtersobject
reporting_currencystring or null
fileobject or null
Show 2 child attributesHide child attributes
urlstring
expires_atstring
failure_reasonstring or null
createdstring
test_modeboolean

Errors

400
The request is invalid.
401
The API key is missing or wrong.
403
The key's permissions don't allow this route.
409
A request with this idempotency key is still running.
Was this page helpful?