Get a site's revenue and the assistant's share
Returns the net revenue and orders of the whole site over a period, the revenue and orders attributed to the assistant, the average order value of each, the assistant's conversion rate, and the same figures over time. The period is two UTC calendar days, both included, up to 366 days. Amounts are integers in the minor units of `currency` (cents for EUR), net of refunds and cancellations, after discounts and before shipping, and are never added across currencies: the response holds one currency, and `currencies` lists the ones the period has orders in. The assistant's revenue is attributed, never incremental: an order counts when a conversation touched it within `windowHours` before the order (last touch). An assistant figure is `null` when it is not measured (the site has minted no join key yet), never zero. Pass `compare=true` to get the previous period of the same length in `previous`. The series is per UTC hour on a period of two days or fewer and per UTC day beyond, every bucket present. Read-only.
Authorization
ApiKeyAuth A WorkOS org-scoped API key, created from the dashboard's organization settings page. Identifies the tenant every read and write is scoped to. Missing, malformed, unknown, revoked, expired, or non-organization-owned keys all return 401 (no distinction, so the response can't be used to probe which keys or org ids exist).
In: header
Path Parameters
The site id (prefixed site_). A site id that isn't yours is a 404, same as any other cross-tenant id.
Query Parameters
First UTC day of the period, included (YYYY-MM-DD).
^\d{4}-\d{2}-\d{2}$Last UTC day of the period, included (YYYY-MM-DD). On or after from.
^\d{4}-\d{2}-\d{2}$true to also return the previous period of the same length in previous. Defaults to false.
"false"Value in
- "true"
- "false"
The ISO 4217 code of the currency to read, three uppercase letters. Defaults to the currency with the most orders in the period. A currency with no order in the period is ignored in favor of that default.
^[A-Z]{3}$Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X GET "https://example.com/api/v1/sites/string/sales?from=string&to=string"{ "data": { "from": "2026-10-01", "to": "2026-10-03", "windowHours": 24, "currency": "EUR", "currencies": [ "EUR", "GBP" ], "site": { "orders": 212, "revenue": 1843250, "aov": 8695 }, "assistant": { "orders": 31, "revenue": 312400, "aov": 10077 }, "conversionRate": { "status": "measured", "rate": 0.042, "numerator": 31, "denominator": 738 }, "previous": { "site": { "orders": 190, "revenue": 1602000, "aov": 8432 }, "assistant": { "orders": 24, "revenue": 233500, "aov": 9729 }, "conversionRate": { "status": "measured", "rate": 0.035, "numerator": 24, "denominator": 686 } }, "granularity": "day", "series": [ { "date": "2026-10-01", "siteRevenue": 640100, "assistantRevenue": 101200, "conversionRate": 0.04 }, { "date": "2026-10-02", "siteRevenue": 702300, "assistantRevenue": 120800, "conversionRate": 0.045 }, { "date": "2026-10-03", "siteRevenue": 500850, "assistantRevenue": 90400, "conversionRate": null } ] }}Get a site's add-to-cart counts
Returns how many add-to-carts the site had in a period, how many belong to a session that had a conversation with the assistant, and how many were made in the panel versus on the merchant's own pages, then the amounts of the add-to-carts that carry one, one row per currency and never summed across currencies, and the same counts over time. The period is two UTC calendar days, both included, up to 366 days. The series is per UTC hour on a period of two days or fewer and per UTC day beyond, every bucket present. A count is `null`, never zero, while it could not have been recorded: an origin is measured from its first recorded event, and the totals are `null` unless both origins are measured. An amount is in the currency's minor unit (2 decimals for EUR, 0 for JPY). An add-to-cart with no amount is counted and not valued, and an amount reported by a merchant's pixel is declared by that pixel and not verified. No event, session or cart id is returned. Shopify stores only. Read-only.
Get a site's add-to-cart insights
Returns what the add-to-cart counts do not give. First, the sessions that added to the cart: of the sessions that had a conversation, and of the sessions where the assistant was shown and no conversation started, how many there were and how many added to the cart (counts only; divide to get a rate). A session with a conversation counts as having added when it made an add in the panel, or an add on the merchant's pages that the server received after its first conversation started. Second, the median cart value per currency, for the carts with a conversation and for the others: a cart is the set of add-to-carts that carry the same cart token, valued by the sum of its lines' amounts in the currency, and with a conversation when one of its lines is. Medians are in the currency's minor unit, never summed across currencies. Third, the add-to-carts by device (highest first), by hour of the day in the time zone asked (24 counts, zero-filled) and by unit price per currency (the amount divided by the quantity added, in five bands: under 25, 25 to 49, 50 to 99, 100 to 199 and 200 and over, in major units of the currency). Fourth, the dates from which amounts and cart tokens are recorded. The groups are of sessions and carts that had a conversation, not of what the assistant added: shoppers who start a conversation are not a random sample. A figure is `null`, never zero, while it could not have been recorded. No event, session or cart id is returned. Shopify stores only. Read-only.