Skip to Content
Docs
Insights

Retrieve insights

GET/insights

The figures for a period, each with the previous period of the same length, using the definitions the Commerce tab shows.

  • With currency, figures count only sales in that currency, in its own amounts. Without it, every figure is in your reporting currency, each sale converted at the rate on the day it was paid.
  • Figures are up to updated, a few minutes behind.
  • Settlements aren't here: they're the main API's.

Headers

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

Query parameters

period_startstringRequired

The first day, in your workspace's time zone.

period_endstringRequired

The last day, included. Up to 366 days after period_start.

currencystring

Three-letter ISO currency code, in lowercase.

countrystring

Only sales to buyers in this country (ISO 3166-1 alpha-2).

productstring

Only this product's lines (prod_). sales.shipping is then 0.

Returns

The figures.

resourcestring
currencystring

The currency asked for, or your reporting currency.

periodobject
Show 2 child attributesHide child attributes
startstring
endstring
previous_periodobject
Show 2 child attributesHide child attributes
startstring
endstring
updatedstring
salesobject
Show 3 child attributesHide child attributes
grossobject
Show 2 child attributesHide child attributes
valuenumber
previousnumber

The same figure for the previous period of the same length.

netobject

Gross less refunds. Disputes aren't taken off.

Show 2 child attributesHide child attributes
valuenumber
previousnumber

The same figure for the previous period of the same length.

shippinginteger

Shipping charged.

ordersobject
Show 3 child attributesHide child attributes
countobject
Show 2 child attributesHide child attributes
valuenumber
previousnumber

The same figure for the previous period of the same length.

average_order_valueobject
Show 2 child attributesHide child attributes
valuenumber
previousnumber

The same figure for the previous period of the same length.

shippedinteger

Orders marked shipped in the period.

conversionobject

Checkout sessions that ended paid.

Show 4 child attributesHide child attributes
sessionsinteger
paidinteger
rateobject

Paid sessions as a fraction of sessions, such as 0.25, rounded to four places.

Show 2 child attributesHide child attributes
valuenumber
previousnumber

The same figure for the previous period of the same length.

drop_offarray of objects

Sessions that didn't pay, each counted once at the furthest step it reached. All three steps are always listed. A one-page checkout counts as one step, payment.

Show 2 child attributesHide child attributes
stepstring

One of details, shipping or payment.

sessionsinteger
Show 7 more attributesShow fewer attributes
refundsobject
Show 2 child attributesHide child attributes
amountobject
Show 2 child attributesHide child attributes
valuenumber
previousnumber

The same figure for the previous period of the same length.

countinteger
disputesobject
Show 2 child attributesHide child attributes
openobject

The period's orders that are under dispute now.

Show 2 child attributesHide child attributes
valuenumber
previousnumber

The same figure for the previous period of the same length.

amountinteger
taxobject

Tax calculated at checkout on your sales.

Show 2 child attributesHide child attributes
amountobject
Show 2 child attributesHide child attributes
valuenumber
previousnumber

The same figure for the previous period of the same length.

by_countryarray of objects

The top 10 by value. Orders without a country are left out.

Show 4 child attributesHide child attributes
keystring

The product's ID, the country code or the payment method type.

labelstring
valueinteger
previousinteger
productsarray of objects

The top 10 by value.

Show 4 child attributesHide child attributes
keystring

The product's ID, the country code or the payment method type.

labelstring
valueinteger
previousinteger
countriesarray of objects

The top 10 by value. Orders without a country are left out.

Show 4 child attributesHide child attributes
keystring

The product's ID, the country code or the payment method type.

labelstring
valueinteger
previousinteger
payment_methodsarray of objects

The top 10 by value.

Show 4 child attributesHide child attributes
keystring

The product's ID, the country code or the payment method type.

labelstring
valueinteger
previousinteger
sales_over_timearray of objects
Show 2 child attributesHide child attributes
datestring
grossinteger

Errors

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