Skip to main content

Export Wholesale Line Sheet

POST 

/api/v2/line-sheets/export

Queue a wholesale line sheet as a background export and return its tracked job id. Requires the products.export permission and the products scope. 422 with an error on source when the sheet would hold no products.

Required scope: products:write

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

When the job completes, its result holds download_url (GET /api/export/download?file=line-sheet-...pdf or .xlsx, only for the user who started it) plus styles_processed, variants_processed, truncated and warnings. Poll the job with the tracked job endpoints.

Body fields:

  • source (required): where the products come from. One of selection, filters, saved_view, catalog.
  • product_ids (array of integers, max 5000; required when source is selection): products to include. A matrix parent id brings in all of its variants; a variant id appears under its parent style on its own.
  • filter (object, source filters): the same filter[...] keys the List Products endpoint takes, e.g. {"brand_id": "3"}.
  • filter_groups (string, source filters): the List Products advanced filter tree, JSON-encoded.
  • saved_view_id (integer; required when source is saved_view): a saved view of the products list that the token's user can see. Its filters are applied.
  • channel_catalog_id (integer; required when source is catalog): a product catalog. Its category include rules become the sheet's collections, in rule order.
  • format: pdf (default) or xlsx (an order form with one row per variant, an empty Qty column and a line-total formula).
  • layout: list (default, one style per row) or grid (three compact cards per row). PDF only.
  • paper_size: letter (default) or a4. PDF only.
  • customer_id (integer): prints "Prepared for", prices from the customer's pricing tier when price_tier_id is omitted, and defaults the payment terms to the customer's.
  • price_tier_id (integer, unarchived pricing tier): wholesale prices. Default: the customer's tier, else the tier named "Wholesale", else the default tier. A variant without a price on the tier uses its parent's.
  • msrp_tier_id (integer, unarchived pricing tier): suggested retail prices. Default: the default tier.
  • show_msrp (boolean, default true), show_available (boolean, default false): extra price/stock columns.
  • currency (3-letter code of a configured currency): prices are converted from each tier's currency with the configured exchange rates. Default: the wholesale tier's currency. With no exchange rate, prices are left blank and a warning is returned.
  • include_out_of_stock (boolean, default true): false drops variants with no available units, and styles left with none.
  • group_by: category (default; primary category), brand or none. Styles in none go last under "Other".
  • title, season, payment_terms, order_minimum, availability_note (strings, max 255), contact (max 500), terms (max 2000): cover page text. Empty title and contact default to the store's name and contact details.

A sheet holds at most 1,000 styles and 5,000 variants; larger sources are truncated (truncated: true).

Request​

Responses​

OK

Response Headers
    Content-Type