Skip to main content

Get Product Aggregates

GET 

/api/v2/products/aggregates

Compute summary aggregations over the full filtered product catalog in a single request.

Required scope: products:read

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Accepts the same filter and search parameters as List Products, plus an aggregates map of column => calculation. Archived products are excluded by default, matching List Products.

Calculations: sum, avg, min, max, range (max - min), count_all (matching products), count_values / count_not_empty (products with a value), count_unique (distinct values), count_empty (products without a value).

Aggregatable columns: id, unit_cost, average_cost, min_stock_level, daily_average_consumption, daily_average_consumption_net_returns, weight, length, width, height, case_quantity, case_weight, case_length, case_width, case_height, proforma_shipping_cost, proforma_landed_cost_percentage, proforma_marketplace_cost_percentage, inventory_on_hand, inventory_available, inventory_available_to_sell, inventory_allocated, inventory_on_hold, inventory_non_sellable, inventory_in_transit, inventory_total, inventory_backorder, inventory_backorder_planned, inventory_backorder_awaiting_receipt, inventory_stock_value, inventory_incoming, total_quantity_sold, total_orders.

Unknown columns are silently ignored. A null value means no matching products carried a value for that column. An unsupported calculation returns a 422 validation error.

Authentication: Requires Bearer token. Supply ids[] to constrain the calculation to specific records; omit it to cover the whole filtered set.

Request

Responses

OK

Response Headers
    Content-Type