Statistics

Shipments statistics

Aggregated statistics for your captured shipments.

Counts shipments that were captured and have not been refunded or cancelled. Return portal shipments are included; pass return_portal=false to match the scope of GET /shipments exactly.

Note that this differs from the shipment figures in the web app's analytics view, which also counts cancelled shipments.

get/statistics/shipments

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'created_at'

Which timestamp the period applies to. Defaults to created_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.

carrier_codestring

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

product_codestring

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

shipping_product_idstring

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

receiver_countrystring

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

sender_countrystring

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

receiver_zipcodestring

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

carrier_customer_numberstring

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

source_type'manual' | 'imported' | 'fulfillment' | 'return' | 'repurchase' | 'api' | 'address_book'

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

monitor_state'NEUTRAL' | 'PROGRESSING' | 'WARNING' | 'DANGER' | 'SUCCESS'

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

tastring

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

return_portalstring

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

created_by_user_idstring

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

receiver_citystring

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

sender_zipcodestring

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

sender_namestring

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.5

    • added the new optional query request parameter created_by_user_id

      new-optional-request-parameter

    • added the new optional query request parameter receiver_city

      new-optional-request-parameter

    • added the new optional query request parameter sender_name

      new-optional-request-parameter

    • added the new optional query request parameter sender_zipcode

      new-optional-request-parameter

    • endpoint added

      endpoint-added