Get Sales Rep Target Performance
GET/api/reporting/sales-rep-commissions/targets-performance
Actual sales against target for one month, quarter or calendar year, per sales rep, optionally broken down by customer (retailer), by brand or product category, or by customer and either one.
reports:readGrant this scope to your token under Settings → Developer → Personal Access Tokens.
What counts as actual sales: exactly the Sales Rep Commissions report's total sales. That is the product-line subtotal (quantity × unit price, converted to your account currency), excluding shipping and tax, on orders assigned to the rep. Your commission settings decide which orders count and which date places them in the period: on the fulfillment basis (the default), fulfilled orders by fulfillment date; on the sale basis, orders by order date. Cancelled orders are excluded unless the settings include them. Returns are not netted off. basis echoes the settings in effect.
Targets count only at their own level: rep rows compare with overall targets (no customer, no brand), customer rows with customer targets that have no brand, brand rows with brand targets that have no customer, customer_brand rows with targets set on both, category rows with category targets that have no customer, and customer_category rows with targets set on a customer and a category. A month report uses month targets only, a quarter report quarter targets only, a year report year targets only.
Pace: while the period is running, expected_to_date is the target spread evenly over the period's days up to and including today (in the account's timezone), pace_variance is actual minus that, and percent_of_pace is actual ÷ expected. Half-way through the year a 1,000,000 target expects 500,000. period.elapsed_percent is the share of the period gone and period.in_progress says whether it is still running. A finished period expects the whole target; a future one expects 0. All three are null on rows with no target, and totals carries them for the rows that have one.
Categories: a sale belongs to its product's primary category (a variant without one uses its parent product's). A category target also counts its subcategories' sales; each sale is credited to the most specific category that has a target for that rep (and customer), so no sale is counted under two categories. Lines whose product has no category appear as No category.
totals.actual is every sale in the report; totals.percent_of_target and totals.variance compare the targets with totals.targeted_actual, the sales of the rows that have a target, so rows without a target never inflate attainment.
A row is returned when it has a target or any sales in the period. target, variance and percent_of_target are null when there is no target. Lines whose product has no brand appear as No brand, and orders without a customer as No customer. orders counts distinct orders in that row, so per-row counts can add up to more than totals.orders when one order spans several brands.
Users who only see their own customers (linked to a sales rep or managing sales rep groups, without the View all customers permission) get rows for their own sales reps only, plus their team's reps when they can view their team. sales_rep_ids is narrowed to those reps; naming only other reps returns the user's own reps instead.
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 Content
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.