Generate Closeout Linesheet PDF
POST/api/v2/closeout/linesheet
Render the closeout rows as a PDF linesheet (closeout-linesheet-<Y-m-d>.pdf, returned inline) using the tenant's Closeout linesheet PDF template. Returns 422 when no such template is set up.
products:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Body: the selection fields below, plus:
- valid_until (optional, date such as "2026-12-31"): printed on the linesheet as the offer's last day. A value that is not a date returns 422 "Enter the offer's last day as a date.".
Selection fields (all optional):
- product_ids (array of integers, max 2000): explicit products. A matrix parent id brings in all its variants. When sent, the lifecycle_states, season_ids, brand_ids and search filters are ignored.
- sell_through_query (object, optional): the query of a List Lifecycle Sell-through request - its filter[...], filter_groups and sort keys, flat (
{"filter[lifecycle_status.is_one_of]": "stalled", "sort": "-stock_value"}) or nested. Used when product_ids is omitted: the selection becomes the rows that query returns, in its order, up to 2,000. When sent, the lifecycle_states, season_ids, brand_ids and search filters are ignored; in_stock_only and the price tiers still apply. - lifecycle_states (array of lifecycle state keys, each max 40 chars): used when product_ids and sell_through_query are omitted. Default: ["discontinued"].
- season_ids (array of integers): only products in any of these seasons.
- brand_ids (array of integers): only products of these brands.
- search (string, max 255): partial match on SKU or name.
- in_stock_only (boolean, default true): only products with available units across all warehouses.
- wholesale_tier_id (integer, existing pricing tier id): the tier for the wholesale price column. Default: the unarchived tier named exactly "Wholesale" (any case), else the oldest unarchived tier whose name contains "wholesale" (e.g. "Wholesale EU").
- msrp_tier_id (integer, existing pricing tier id): the tier for the MSRP column. Default: the default pricing tier.
Archived products, matrix parents and bundles are never included (they hold no stock). At most 2,000 products, ordered by SKU.
Requires a Bearer token with the products read/write scope and the products.export permission.
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 Entity
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.