---
title: "Export selected products and variants as CSV"
method: POST
path: "/products/exportCSV"
tags: ["Products", "PCS-11321"]
---

# Export selected products and variants as CSV

`POST /products/exportCSV`

## Request

- Base URL: `https://api.pics.io`
- URL: `https://api.pics.io/products/exportCSV`
- Auth: HTTP bearer

Exports the given Master Product / Master Variant ids as a CSV. Reads product documents, custom-attribute schema, and linked assets from the database. Scope is recordIds only — there is no search-query export. Media cells use preview URLs joined by `;`. Toriut Record ID and SKU are always included. Parent SKU, Toriut Parent Record ID, and Product Option columns are included only when the selection contains at least one Master Variant. A non-empty `fields` array is validated against the export-time schema; unrecognized keys return 400 and no CSV.

## Request body

- object
  - `recordIds` string[], required
  - `fields` string[]

## Response `200`

Ok

## Other responses

- `400`: Over-limit recordIds (subcode: ProductsExportCsvLimitExceededApiError), missing/invalid recordIds, or fields contains keys that are not in the export-time CSV schema
- `409`: Can not export products CSV

---

[API](https://skmtc.dev/pics/apis/pics-io-rest-api.md) - [All operations](https://skmtc.dev/pics/apis/pics-io-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pics/apis/pics-io-rest-api/revisions/ea41cba5ac37?raw)
