---
search:
  tags:
    - commerce
    - POST
seo:
  description: >-
    Imports the customer's product catalog from inline CSV text. The shape…
    Reference for the POST /commerce/catalog-imports endpoint in the Zaraftis
    Public API.
sidebar:
  label: Import a catalog from CSV
  badge: POST
title: Import a catalog from CSV
type: openapi-operation
---
Imports the customer's product catalog from inline CSV text. The shape is validated at ingress and one invalid row refuses the whole import with the exact row errors. A small import completes inline and returns the snapshot; a large one returns 202 with a task whose completion carries catalog_snapshot_id. The customer's catalog only; observed products never enter this path.

`POST /commerce/catalog-imports`

**Request body** (`application/json`, required)

- `brand_id` (string<uuid>, required)
- `csv` (string, required)

Request body example:

```json
{
  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",
  "csv": "string"
}
```

**Responses**

- `200` — The import completed inline (small file, or an identical re-import)
- `202` — The import was accepted as a durable task (large file)
- `400` — bad\_request or validation\_failed
- `404` — not\_found: unknown id, or an id this key cannot see

Response example, 200:

```json
{
  "success": true,
  "data": {
    "mode": "accepted",
    "task_id": "736fde4d-9029-4915-8189-01353d6982cb",
    "task_url": "string",
    "detail": "string"
  },
  "request_id": "string"
}
```
