---
search:
  tags:
    - commerce
    - POST
seo:
  description: >-
    Runs one paid commerce collection: the selected commerce queries on the…
    Reference for the POST /commerce/collections endpoint in the Zaraftis Public
    API.
sidebar:
  label: Run a commerce collection
  badge: POST
title: Run a commerce collection
type: openapi-operation
---
Runs one paid commerce collection: the selected commerce queries on the resolved platforms in one country, collected through the collection partner. Every (query, platform) pair is one billable unit. Returns 202 with the collection, task, and billing references. A missing shopping module is evidence, never a failure.

`POST /commerce/collections`

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

- `brand_id` (string<uuid>, required)
- `queries` (string[], required)
- `platform_ids` (string[], required)
- `country` (string)

Request body example:

```json
{
  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",
  "queries": [
    "string"
  ],
  "platform_ids": [
    "string"
  ],
  "country": "st"
}
```

**Responses**

- `202` — Accepted collection
- `400` — bad\_request or validation\_failed
- `402` — wallet\_not\_activated, insufficient\_credits, or payment\_action\_required
- `404` — not\_found: unknown id, or an id this key cannot see

Response example, 202:

```json
{
  "success": true,
  "data": {
    "collection_id": "4bdef85c-3f50-4006-a713-2350da665f80",
    "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",
    "status": "queued",
    "task_id": "736fde4d-9029-4915-8189-01353d6982cb",
    "task_url": "string",
    "collection_url": "string",
    "platform_ids": [
      "string"
    ],
    "country": "st",
    "requested_query_count": 1,
    "billing": {
      "operation": "ai_platform_query",
      "credit_catalog_version": "string",
      "quantity_requested": 0,
      "unit_credits": 0,
      "maximum_credits": 0,
      "reserved_credits": 0,
      "billing_status": "reserved",
      "credits_deducted": 0,
      "credits_released": 0,
      "wallet_history_id": "string"
    }
  },
  "request_id": "string"
}
```
