Statistics

Sales orders statistics

Aggregated statistics for your sales orders.

Monetary amounts are always expressed in the order's own currency and are never converted. If you request a money metric without restricting or grouping by currency_code, the response is grouped by currency automatically and meta.currency_split is true.

get/statistics/sales_orders

Query parameters

date_fromstring date-time required

Start of the period, inclusive. A bare date such as 2026-07-01 is expanded to the beginning of that day in the requested time zone.

date_tostring date-time required

End of the period, inclusive. A bare date such as 2026-07-31 is expanded to the end of that day in the requested time zone.

date_field'ordered_at' | 'created_at' | 'updated_at' | 'closed_at'

Which timestamp the period applies to. Defaults to ordered_at.

time_zonestring

IANA time zone used to interpret bare dates and to place time series buckets. Defaults to Europe/Copenhagen.

interval'hour' | 'day' | 'week' | 'month'

Adds a time series to the response. Maximum period per interval: hour 7 days, day 366 days, week 732 days, month 732 days.

group_bystring

Comma separated list of at most 2 dimensions. The second dimension is nested inside the first.

metricsstring

Comma separated list of metrics. Defaults to count.

limitinteger

Number of buckets per group level. Some high cardinality dimensions cap this lower.

sortstring

Bucket ordering. Prefix with - for descending. Accepts key or any metric.

series_per_groupboolean

Place a time series inside every group as well as at the top level, answering questions like shipments per carrier per day in one request. Requires both interval and group_by, and is not available when the innermost dimension groups line level documents, which carry no timestamp of their own. Multiplies the number of buckets, so it counts heavily against the request limits.

include_empty_bucketsboolean

Zero fill the time series across the whole period. Off by default, so periods with no data are omitted.

customer_idstring

Restrict the period to matching records. Accepts a comma separated list.

currency_codestring

Restrict the period to matching records. Accepts a comma separated list.

ship_to_country_codestring

Restrict the period to matching records. Accepts a comma separated list.

bill_to_country_codestring

Restrict the period to matching records. Accepts a comma separated list.

shipment_method_namestring

Restrict the period to matching records. Accepts a comma separated list.

shipment_method_codestring

Restrict the period to matching records. Accepts a comma separated list.

payment_method_namestring

Restrict the period to matching records. Accepts a comma separated list.

payment_method_codestring

Restrict the period to matching records. Accepts a comma separated list.

source_namestring

Restrict the period to matching records. Accepts a comma separated list.

shop_integration_idstring

Restrict the period to matching records. Accepts a comma separated list.

source_type'point_of_sale' | 'subscription'

Restrict the period to matching records. Accepts a comma separated list.

tagsstring

Restrict the period to matching records. Accepts a comma separated list.

item_locationsstring

Restrict the period to matching records. Accepts a comma separated list.

order_status'open' | 'processing' | 'packed' | 'cancelled' | 'on_hold' | 'sent' | 'picked_up' | 'archived' | 'ready_for_pickup' | 'released'

Restrict the period to matching records. Accepts a comma separated list.

payment_status'authorized' | 'partially_paid' | 'paid' | 'voided' | 'authorize_pending' | 'authorize_error' | 'refunded' | 'marked_as_paid' | 'partially_refunded' | 'authorize_expired'

Restrict the period to matching records. Accepts a comma separated list.

fulfillment_status'unfulfilled' | 'partially_fulfilled' | 'fulfilled'

Restrict the period to matching records. Accepts a comma separated list.

return_status'in_progress' | 'partially_in_progress' | 'returned' | 'partially_returned'

Restrict the period to matching records. Accepts a comma separated list.

accounting_status'invoice_unprocessed' | 'invoice_processing' | 'invoice_drafted' | 'invoice_booked' | 'invoice_failed' | 'invoice_cancelled'

Restrict the period to matching records. Accepts a comma separated list.

invoice_status'order_invoice_created' | 'order_invoice_partly_booked' | 'order_invoice_booked' | 'order_invoice_failed'

Restrict the period to matching records. Accepts a comma separated list.

archivedstring

Restrict the period to matching records. Accepts a comma separated list.

returning_customerstring

Restrict the period to matching records. Accepts a comma separated list.

assigned_staff_account_idstring

Restrict the period to matching records. Accepts a comma separated list.

address_validation_state'danger' | 'warning' | 'success' | 'failed' | 'started' | 'defunct'

Restrict the period to matching records. Accepts a comma separated list.

ship_to_zipcodestring

Restrict the period to matching records. Accepts a comma separated list.

ship_to_citystring

Restrict the period to matching records. Accepts a comma separated list.

service_point_country_codestring

Restrict the period to matching records. Accepts a comma separated list.

Response

Successful.

totalsobject

The requested metrics across the whole period, before any grouping.

Example response

{
  "meta": {
    "resource": "shipments",
    "date_field": "created_at",
    "time_zone": "Europe/Copenhagen",
    "interval": "day",
    "limit": 25,
    "sort": "-count"
  },
  "series": [
    {
      "key": "2026-07-01"
    }
  ],
  "groups": [
    {
      "key": "gls",
      "label": "GLS",
      "series": [
        {
          "key": "2026-07-01"
        }
      ]
    }
  ]
}

Changes

Changed in 2 of the 9 revisions of this API.7

    • added the new optional query request parameter address_validation_state

      new-optional-request-parameter

    • added the new optional query request parameter assigned_staff_account_id

      new-optional-request-parameter

    • added the new optional query request parameter returning_customer

      new-optional-request-parameter

    • added the new optional query request parameter service_point_country_code

      new-optional-request-parameter

    • added the new optional query request parameter ship_to_city

      new-optional-request-parameter

    • added the new optional query request parameter ship_to_zipcode

      new-optional-request-parameter

    • endpoint added

      endpoint-added