A store's sales, sales breakdowns and fulfillment for a period. Sales leave out cancelled, unpaid and test orders. Traffic sources, referrers, product views and carts aren't recorded. Needs a plan with analytics.
All paths are relative to the base URL https://api.store.link/v1. Every request needs your API key; see Overview.
Endpoints
| Endpoint | What it does |
|---|---|
GET /stores/{storeId}/analytics/sales | Get a sales summary |
GET /stores/{storeId}/analytics/sales/breakdown | Break down sales |
GET /stores/{storeId}/analytics/fulfillment | Get a fulfillment summary |
Periods
Every analytics endpoint takes the same period parameters:
| Name | Type | Description |
|---|---|---|
period | string | custom takes start_date and end_date. One of: today, last7days, lastweek, thismonth, last30days, lastmonth, last90days, custom. Default: last90days. |
start_date | string (date) | With period custom. Format: YYYY-MM-DD. |
end_date | string (date) | With period custom. Format: YYYY-MM-DD. |
timezone | string | The IANA timezone the period is in, e.g. America/New_York. Default: UTC. |
Responses echo period and timezone, and give the period's start_date and end_date (YYYY-MM-DD) in that timezone.
Get a sales summary
GET /stores/{storeId}/analytics/sales
Orders, sales, average order value, visitors, conversion rate and searches for a period, the 10 products sold most, and orders, sales and visitors over time. With compare, the same for the period before or the same period a year earlier.
Your role in the store needs to read analytics.
Path parameters
| Name | Type | Description |
|---|---|---|
storeId | string required | A store id from GET /stores. |
Query parameters
| Name | Type | Description |
|---|---|---|
period, start_date, end_date, timezone | See Periods above. | |
compare | string | Also return the period to compare with. One of: previous_period, previous_year. |
Example request
curl 'https://api.store.link/v1/stores/665f1c2ab4e8a90012ab34cd/analytics/sales?period=thismonth&timezone=America/New_York&compare=previous_period' \
-H 'Authorization: Bearer YOUR_API_KEY'Response
| Field | Type | Description |
|---|---|---|
period | string | The period asked for. |
timezone | string | The IANA timezone the period and its dates are in. |
currency | string, nullable | ISO 4217 code. |
current | object | |
current.start_date | string (date) | |
current.end_date | string (date) | |
current.orders | integer | |
current.sales | number | |
current.average_order_value | number | |
current.visitors | integer | |
current.conversion_rate | number, nullable | Orders per 100 visitors; null without visitors. |
current.searches | object | |
current.searches.total | integer | |
current.searches.top_terms | array of object | At most 10, most searched first. |
current.searches.top_terms[].term | string | |
current.searches.top_terms[].searches | integer | |
current.searches.top_terms[].without_results | integer | |
current.searches.terms_without_results | array of object | At most 10, most searched first. |
current.searches.terms_without_results[].term | string | |
current.searches.terms_without_results[].searches | integer | |
current.top_products | array of object | At most 10, by units sold. GET /analytics/sales/breakdown?by=product has more. |
current.top_products[].name | string | |
current.top_products[].quantity | number | |
current.over_time | object | |
current.over_time.interval | string | hour for periods of 2 days or less, month for periods over 3 months, else day. One of: hour, day, month. |
current.over_time.rows | array of object | Oldest first, leaving out intervals with no orders or visits. |
current.over_time.rows[].start | string | The start of the interval in the timezone: 2026-10-12T14:00, 2026-10-12 or 2026-10. |
current.over_time.rows[].orders | integer | |
current.over_time.rows[].sales | number | |
current.over_time.rows[].visitors | integer, nullable | null on hourly rows, as visits are counted per day. |
previous | object, nullable | The period compared with, when compare is set, with the same fields as current. |
Example response
{
"period": "thismonth",
"timezone": "America/New_York",
"currency": "USD",
"current": {
"start_date": "2026-11-01",
"end_date": "2026-11-23",
"orders": 48,
"sales": 1250,
"average_order_value": 26.04,
"visitors": 1600,
"conversion_rate": 3,
"searches": {
"total": 120,
"top_terms": [
{ "term": "tee", "searches": 34, "without_results": 0 }
],
"terms_without_results": [
{ "term": "hoodie", "searches": 9 }
]
},
"top_products": [
{ "name": "Classic Tee", "quantity": 31 }
],
"over_time": {
"interval": "day",
"rows": [
{ "start": "2026-11-01", "orders": 3, "sales": 75, "visitors": 82 }
]
}
},
"previous": {
"start_date": "2026-10-09",
"end_date": "2026-10-31",
"orders": 41,
"sales": 1080,
"average_order_value": 26.34,
"visitors": 1450,
"conversion_rate": 2.83,
"searches": { "total": 98, "top_terms": [], "terms_without_results": [] },
"top_products": [],
"over_time": { "interval": "day", "rows": [] }
}
}Errors
- 403
plan_upgrade_required: The store's plan doesn't include this. The message names the plan it needs.
Plus the common errors: 400 invalid_request, 401 unauthorized, 403 insufficient_permission, 404 store_not_found, 429 rate_limited, 500 internal_error. See Errors in the Overview.
Break down sales
GET /stores/{storeId}/analytics/sales/breakdown
A period's sales grouped by one dimension: orders, units, sales and share of the period's sales per row, best first.
product: units and item sales per productvariant: per product variant, e.g. a size or colourcategory: per product category; a product in two categories counts in both, so shares can add up past 100%product_pair: products bought together, among the 50 products in the most orders, ranked by the orders that had both; units and sales are those two products' lines, so shares can add up past 100%coupon: per coupon code, with the discount givenpayment_method: per payment methodshipping_method: per shipping or pickup methodcustomer_type: customers whose first order fell in the period (new) vs those who ordered before (returning), and orders without a customer account; customers counts accountscustomer: top customers by what they spent; needs permission to read ordersweekday: per day of the week, Monday to Sundayhour: per hour of the day, 00:00 to 23:00
weekday and hour return every row in calendar order, in the timezone, and ignore limit and sort_by.
Your role in the store needs to read analytics.
Path parameters
| Name | Type | Description |
|---|---|---|
storeId | string required | A store id from GET /stores. |
Query parameters
| Name | Type | Description |
|---|---|---|
by | string required | One of: product, variant, category, product_pair, coupon, payment_method, shipping_method, customer_type, customer, weekday, hour. |
period, start_date, end_date, timezone | See Periods above. | |
sort_by | string | Default sales, and orders for product_pair. One of: sales, units, orders. |
limit | integer | Rows to return. Default: 10. 1 to 50. |
Example request
curl 'https://api.store.link/v1/stores/665f1c2ab4e8a90012ab34cd/analytics/sales/breakdown?by=product&period=last30days' \
-H 'Authorization: Bearer YOUR_API_KEY'Response
| Field | Type | Description |
|---|---|---|
by | string | The dimension asked for. |
period | string | The period asked for. |
timezone | string | The IANA timezone the period and its dates are in. |
start_date | string (date) | |
end_date | string (date) | |
currency | string, nullable | ISO 4217 code. |
basis | string | item: sales are item sales, before shipping and after item discounts. order: sales are order totals. One of: item, order. |
sorted_by | string | One of: sales, units, orders, calendar. |
totals | object | |
totals.orders | integer | |
totals.units | number | |
totals.sales | number | |
total_groups | integer | Rows there are, before limit. |
rows | array of object | |
rows[].key | string or number or array of string, nullable | product: a product slug, or its name when the order has none. variant: a cart item id. category, coupon, payment_method and shipping_method: the name or code, null for none. product_pair: two product keys. customer_type: new, returning or no_account. customer: a customer id, null for orders without one. weekday: 1 (Monday) to 7. hour: 0 to 23. |
rows[].label | string, nullable | |
rows[].orders | integer | |
rows[].units | number | |
rows[].sales | number | |
rows[].share | number | Percent of the period's sales. category and product_pair shares can add up past 100. |
rows[].average_order_value | number, nullable | On the order basis; null on the item basis. |
rows[].discount | number, nullable | by coupon: the discount given. null otherwise. |
rows[].customers | integer, nullable | by customer_type: customer accounts. null otherwise. |
Example response
{
"by": "product",
"period": "last30days",
"timezone": "UTC",
"start_date": "2026-10-25",
"end_date": "2026-11-23",
"currency": "USD",
"basis": "item",
"sorted_by": "sales",
"totals": {
"orders": 48,
"units": 96,
"sales": 1250
},
"total_groups": 8,
"rows": [
{
"key": "classic-tee",
"label": "Classic Tee",
"orders": 22,
"units": 31,
"sales": 620,
"share": 49.6,
"average_order_value": null,
"discount": null,
"customers": null
}
]
}Errors
- 403
plan_upgrade_required: The store's plan doesn't include this. The message names the plan it needs.
Plus the common errors: 400 invalid_request, 401 unauthorized, 403 insufficient_permission, 404 store_not_found, 429 rate_limited, 500 internal_error. See Errors in the Overview.
Get a fulfillment summary
GET /stores/{storeId}/analytics/fulfillment
For orders placed in a period: how many were cancelled, the cancellation rate, and the median and average hours from an order being placed to its first shipped or completed status. Unpaid and test orders are not placed orders, and ship times leave out cancelled orders.
Your role in the store needs to read analytics.
Path parameters
| Name | Type | Description |
|---|---|---|
storeId | string required | A store id from GET /stores. |
Query parameters
| Name | Type | Description |
|---|---|---|
period, start_date, end_date, timezone | See Periods above. |
Example request
curl 'https://api.store.link/v1/stores/665f1c2ab4e8a90012ab34cd/analytics/fulfillment?period=custom&start_date=2026-11-01&end_date=2026-11-23' \
-H 'Authorization: Bearer YOUR_API_KEY'Response
| Field | Type | Description |
|---|---|---|
period | string | The period asked for. |
timezone | string | The IANA timezone the period and its dates are in. |
start_date | string (date) | |
end_date | string (date) | |
placed_orders | integer | |
cancelled_orders | integer | |
cancellation_rate | number, nullable | Percent of placed orders; null without any. |
shipped_orders | integer | Orders that reached shipped or completed, leaving out cancelled ones. |
median_hours_to_ship | number, nullable | |
average_hours_to_ship | number, nullable |
Example response
{
"period": "custom",
"timezone": "UTC",
"start_date": "2026-11-01",
"end_date": "2026-11-23",
"placed_orders": 50,
"cancelled_orders": 1,
"cancellation_rate": 2,
"shipped_orders": 45,
"median_hours_to_ship": 18,
"average_hours_to_ship": 22.5
}Errors
- 403
plan_upgrade_required: The store's plan doesn't include this. The message names the plan it needs.
Plus the common errors: 400 invalid_request, 401 unauthorized, 403 insufficient_permission, 404 store_not_found, 429 rate_limited, 500 internal_error. See Errors in the Overview.
