Skip to main content

Export Supplier Price List

GET 

/api/suppliers/:supplier/price-list/export

Downloads the supplier price list as a spreadsheet.

Authentication: Requires Bearer token (scope: suppliers)

Scope of the file:

  • Pass product_ids to export an explicit set of rows.
  • Otherwise the export mirrors whatever the filter and sort parameters resolve to, so sending the same parameters as the list endpoint produces exactly the rows that list returned.
  • Send no filters at all to export the supplier's whole price list.

Columns: columns accepts the key values from the metadata endpoint's column catalogue, and the file follows the order they are listed there. Omit it and the default column set is used.

Response: a file download, not JSON. format=xlsx returns application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; format=csv returns text/csv. The filename is <supplier-slug>-price-list-<YYYY-MM-DD>.<ext>.

Tiers: when sell_tier_id / cost_tier_id are omitted the account's default retail and default supplier tiers are used. Call the metadata endpoint for the selectable tiers, the supplier's brands, and the column catalogue.

Filtering

Filters are sent as filter[<name>] query parameters.

Quick filters:

  • filter[search] — partial match across SKU, product name, barcode, MPN and supplier SKU
  • filter[brand_id] — one or more brand ids, comma separated. Valid ids come from the metadata endpoint
  • filter[only_priced]1 keeps only products carrying both a retail price and a supplier cost on the selected tiers
  • filter[archived]active (default), only for archived products only, all for both

Column filters take the form filter[<column>.<operator>], for example filter[sku.starts_with]=CB-, filter[margin_pct.greater_than]=50, filter[cost_price.between]=10,50.

  • Text columns — sku, name, barcode, mpn, hts_code, brand_name, supplier_sku. Operators: contains, does_not_contain, is, is_not, is_one_of, is_not_one_of, starts_with, does_not_start_with, ends_with, does_not_end_with, is_empty, is_not_empty
  • Numeric columns — sell_price, cost_price, margin_amount, margin_pct, off_retail_pct, markup_pct, multiplier, minimum_order_quantity, leadtime, case_quantity, on_hand_quantity, weight. Operators: is, is_not, is_one_of, is_not_one_of, greater_than, greater_than_or_equal, less_than, less_than_or_equal, between, is_empty, is_not_empty
  • Boolean columns — is_default_supplier, archived. Operator: is (and is_not for archived)

For AND/OR logic and nested groups, send filter_groups instead: a base64-encoded JSON tree of the shape {"conjunction":"and","children":[{"type":"condition","condition":{"column":"margin_pct","operator":"greater_than","value":50}}]}. A children entry may also be {"type":"group","group":{...}} to nest a sub-group with its own conjunction. Conditions naming a column or operator that is not listed above are ignored.

Request

Responses

OK

Response Headers
    Content-Type
    Content-Disposition