Skip to main content
The Analytics API gives you programmatic, read-only access to your store’s analytics: raw data tables (orders, claims) and pre-computed metrics (attach rate, claim rate, and more). Use it to feed OrderProtection data into your own dashboards, BI tools, or reports.

Authentication

Every request needs a Bearer token carrying the analytics:read scope. Two token types work:
A token without the analytics:read scope receives 403 Forbidden. Requesting a store outside your token’s authorized set receives 403 with code STORE_OUT_OF_SCOPE.

Store scoping

Results are always limited to your account and the stores your token is authorized for. By default an endpoint returns data for all of the token’s authorized stores. Pass store_ids to narrow to specific stores:
The store_ids you receive back in the response meta reflect the exact scope that was applied.

Data freshness

Analytics tables are rebuilt on a batch schedule (roughly every 8 hours), so data is not real-time and can be up to ~8 hours behind your live store data. Every response includes a data_freshness_at timestamp in its meta block — the time the underlying table was last rebuilt by the batch job (not a per-row timestamp):

Tables

Tables return raw, row-level records.
No PII is exposed. Each table has a fixed allowlist of safe columns; personally identifiable fields (customer name, email, etc.) are never included and cannot be requested. The fields parameter can only ever narrow to columns within that allowlist — asking for a field outside it is dropped, and a request for only disallowed fields returns 400 INVALID_FIELDS.

List tables

Returns the available tables, each with its selectable columns.

Get rows

To page through results, resend the request with cursor set to meta.next_cursor until has_more is false.

Available tables

addresses is geo-only. Customer identity fields — name, email, phone, and street lines (address1/address2) — are excluded and cannot be requested. Coordinates are rounded to ~1.1 km (2 decimal places), so latitude/longitude support regional mapping but never pinpoint an individual address. Its time column is order_date.

Metrics

Metrics are pre-defined aggregations computed at query time over the batch-refreshed tables. Query them as a time series or fetch the latest single value.

List metrics

Time series

When group_by=store_id, each data point also includes a store_id field.

Latest value

Returns the single most recent value for the metric.

Available metrics

Limits

For pulls larger than these limits, page through tables with the cursor parameter, or narrow your from/to window and combine the results.