Get the Purchases By Product report
Changed onReturns one row per purchased product, aggregating every non-draft purchase whose date falls in the reported range. Each row carries the product's total quantity purchased and total purchased amount (each purchase item's quantity times its price, summed and rounded to 2 decimal places), alongside the product's current descriptive attributes (SKU, unit type, category, subcategory, group, vendor, owner, unit cost, sale price, and wholesale price). The attribute columns reflect the product as it stands now, not as it was at purchase time.
This is a read-only aggregate. It does not touch inventory, compliance (Metrc/BioTrack), or any purchase records — call it to analyze historical purchasing, not to reconcile a single purchase (use the purchases endpoints for that).
Date filtering, and the range echoed back under meta, are interpreted in the account's configured time zone. When no date filter is provided, the report defaults to the last 30 days. Draft purchases are always excluded; only official purchases are counted.
Every value is returned as it appears in the report's CSV export, with numeric cells returned as strings (currency and comma formatting stripped), matching the rest of the API. Any Product custom fields configured for the company are appended as extra columns (their keys vary per company). Report-level information (the resolved human-readable date range and the ordered column definitions) is returned under meta.
Each row also carries the IDs of the records it names — product_id and vendor_id, each right after its name column — so a row can be followed to the product or company endpoints without a name lookup. The CSV export leaves these ID columns out.
Required permission: reports_permissions_purchases_by_product.
Request
- Base URLhttps://app.distru.com
- AuthHTTP bearer
Query parameters
Restrict the report to purchases dated within this range. Comma-separated pair of ISO8601 timestamps, after,before, interpreted in the account's time zone. Either side may be left empty for an open-ended bound: 2026-01-01T00:00:00Z, includes everything on or after that instant, ,2026-02-01T00:00:00Z everything up to it. When omitted entirely, the report covers the last 30 days.
Keep only products whose name or SKU matches this text. Omit to include all products.
Restrict to purchases whose owner (the purchase's assigned sales rep) is one of these users. Repeat the key per id; values are Distru user ids. Multiple ids widen the match (a purchase owned by any listed user is included). Omit to include every owner. This filters the purchases that are aggregated and is unrelated to the product-level owner column in each response row.
Restrict to purchases received into these locations. Repeat the key per id; values are Distru location ids. Multiple ids widen the match. Omit to include every location on the account, archived locations included, so historical purchases against since-deleted locations still appear.
Response
The Purchases By Product report
Changes
- info
added the required property
//to the response with the status - info
added the required property
//to the response with the status
- info