Get Buying Matrix
GET/api/crm/buying-matrix
Customers (rows) against product categories or brands (columns) over a period: which each customer bought, quoted, used to buy or never bought, with each column's coverage.
customers:readGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Authentication: Requires Bearer token with the customers scope and the customers.index permission.
The CRM activities feature must be switched on for the account; otherwise every CRM endpoint returns 404.
Customers covered: the active (not archived) customers you can see who have ordered at least once. Without permission to view all customers, that is only the customers whose default sales rep is your own sales rep (plus the reps in the sales rep groups you manage, with team access).
Cell statuses, per customer and column: bought (at least one product line of a non-draft, non-cancelled sales order in the period), else quoted (a product line on a sent quote created in the period; draft, template, revised, archived and deleted quotes do not count), else lapsed (bought before the period), else never. Lines map to a column through the product: its brand, or each of its categories rolled up the category tree to the column on its path (a product in two categories counts in both). Column 0 holds products without a category (top level only) or without a brand; drilled into a category, a column with that category's id holds products filed on it directly rather than in a subcategory. These catch-all columns are shown only when someone bought from them. Revenue is line revenue less discounts and credits, in the base currency, excluding tax and shipping.
Period: period_start and period_end (Y-m-d, account timezone, inclusive; default the last 12 months, at most five years, ending no later than today).
Columns: by default the 30 with the most revenue in scope and period (plus column 0 when it has revenue); columns picks them (comma-separated ids, at most 100, in that order). available_columns lists every column with its revenue; hidden_columns counts the ones not shown. Each shown column has customers who bought it, coverage (share of customers_in_scope) and revenue.
Rows: filter[sales_rep_id] (comma-separated ids, none = no rep), filter[segment] (comma-separated segment keys), filter[search] (name, company or email), only_gaps=1 (only customers missing at least one shown column), sort (revenue, customer or bought; prefix with - for descending; default -revenue), page, per_page (1-100, default 25). Each row has totals (columns bought of those shown, revenue in the period) and cells keyed by column id; a bought cell has revenue, orders, last_ordered_at and shade (1-4: how many of the column's revenue quartiles across every customer in scope this customer's revenue reaches).
Request
Responses
- 200
- 401
- 403
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.