Preview Wholesale Line Sheet
POST/api/v2/line-sheets/preview
What a wholesale line sheet would contain, without building it: style, variant and collection counts, the pricing tiers and currency the prices come from, warnings, and the cover page's default text. Requires the products.show permission and the products scope.
products:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
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).
Response data: style_count, variant_count, collection_count, currency, price_tier {id, name} or null, msrp_tier {id, name} or null, truncated, warnings (list of strings), defaults {title, contact, payment_terms}.
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.