PricingSales

Summarise sales

GET
/v1/sales/summary

Totals for the sales the filters cover: one customer, one product, one list, a stretch of time, or everything. With groupBy, the same totals split one way as well, each group summing to the ungrouped total. Always in US cents, whatever currency each sale was charged in, and net of credit notes issued against those sales.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from the Developers page. rhq_test_ keys reach the sandbox, rhq_live_ keys the live side.

Query Parameters

customerId?string
product?string
Value in"number""domain""domain_privacy""licence""mailbox"
priceListId?string

Only sales priced from this list

level?string

What set the price: the item's own price (override), the customer's contract, their price list, or none when you have no list and the customer pays wholesale

Value in"override""contract""list""none"
from?string

Only sales made at or after this moment

Formatdate-time
to?string

Only sales made before this moment

Formatdate-time
invoiced?string

false for sales not on an invoice yet, true for those that are

groupBy?string

Splits the totals. month is the calendar month in UTC, as 2026-10, and day the calendar day in UTC, as 2026-10-21

Value in"product""customer""priceList""level""month""day"

Response Body

Success

application/json
  1. response

Success

count*integer
cost*integer

What you were charged

price*integer

What your customers pay, in US cents at the rate of each sale, net of credit notes

credited*integer

What credit notes have taken off price, each line converted at its own sale's rate. A flat-amount credit note names no sale and so is not reflected here

Range0 <= value
profit*integer

price less cost. Falls with price when a sale is credited, and can go below zero for that sale

marginBps*integer

Profit as a share of price, in basis points

groups?array<>

One row for each value of groupBy. Absent without it

curl -X GET "https://example.com/v1/sales/summary?customerId=cus_01K6XJ4Q8ZT3M9R5V2B7WDHNCA&priceListId=prl_01K6XJ4Q8ZT3M9R5V2B7WDHNCA&from=2026-10-07T11%3A04%3A31.000Z&to=2026-11-01T00%3A00%3A00.000Z"
{  "count": 12,  "cost": 1440,  "price": 1440,  "credited": 0,  "profit": 2400,  "marginBps": 1667,  "groups": [    {      "key": "domain",      "count": 12,      "cost": 1440,      "price": 1440,      "credited": 0,      "profit": 2400,      "marginBps": 1667    }  ]}