Skip to main content
GET
Each customer comes with its customer tags and, when date_from is given, its figures over the period as the AI Margin dashboard computes them. To route some customers apart, put their names in an override rule of a routing strategy (customer_selection’s included_customers, or any rule’s excluded_customers) and push it with Set routing strategy.

Parameters

boolean
default:"true"
Include each customer’s tags.
string
Start of the period, inclusive. YYYY-MM-DD. Send it to get each customer’s figures over the period: only the customers the AI Margin dashboard lists over the period are then returned. Omit it for every known customer, without figures.
string
End of the period, inclusive. YYYY-MM-DD. Defaults to today. Needs date_from.
Keep the customers whose name has this text.
string[]
Keep the customers with a tag, as "key:value", e.g. "plan:enterprise".
string[]
Keep the customers with one of these profitability statuses: "healthy", "watch", "at_risk", "unprofitable", "unknown". Another value returns a 422. Needs date_from.
string
The figure to sort by. Needs date_from. Defaults to the name with date_from, else to the order the customers were created in. One of customer, revenue_or_key_metric, cost, margin, margin_pct, in_tok, out_tok, mom or profitability_status.
string
Sort ascending or descending. Needs sort. Defaults to ascending. One of ascending or descending.
string
The route is paginated: pass the previous page’s next_cursor, as is, to get the next page. has_more says whether another page exists.
integer
default:"100"
Number of customers per page. Max 1000.