Imports
An import is a batch of up to 1000 products, processed in the background. Send more products as several imports. What a product can carry is on Products.
We fetch every image from its URL, so it must be reachable over public HTTPS. The API takes no file uploads.
Create an import
Section titled “Create an import”POST the products with the collection_id to deliver them into. The request
body lists them under products, plus an optional external_id (see
idempotency); this one sends a single product with only the
required fields:
curl -sS -X POST "$BASE/imports" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "collection_id": "'"$COLLECTION_ID"'", "external_id": "import-2026-07-27-01", "products": [ { "sku": "1234567-891", "front_image_url": "https://cdn.partner.example/assets/1234567-891/front.jpg" } ] }' | jqThe response is the import, 202 when new:
{ "id": "7d90...", "collection_id": "c47b...", "external_id": "import-2026-07-27-01", "status": "pending", "total": 1, "created_count": 0, "updated_count": 0, "failed_count": 0, "errors": [], "created_at": "2026-07-27T09:20:11.972Z", "finished_at": null}export IMPORT_ID="7d90..."Idempotency
Section titled “Idempotency”Idempotent means that sending the same request twice has the same effect as sending it once, so you can retry after a timeout without creating duplicates. Two keys make an import idempotent:
| Key | Sending it again |
|---|---|
A product’s sku within the collection |
Updates that product; never creates a second one. |
The import’s external_id, if you send one |
Returns the first import with 200 and ignores the new body. |
external_id is your own name for the import, such as your job or run id. It
is optional and unique within the collection.
| Situation | What to do |
|---|---|
| The request timed out and you do not know whether it arrived | Send the same body with the same external_id: 200 returns the import that arrived, 202 means this one is new. |
| You send changed or further products | Use a new external_id. The old one returns the old import and ignores your body. |
The import failed, or some products were rejected |
Fix them and send again under a new external_id. |
You send no external_id |
Every POST is a new import that runs again and sends its own webhooks. Products are still matched by sku. |
Look an import up by your own id:
curl -sS -H "Authorization: Bearer $TOKEN" \ "$BASE/imports?collection_id=$COLLECTION_ID&external_id=import-2026-07-27-01" | jq '.data[0]'Follow it
Section titled “Follow it”status |
Meaning |
|---|---|
pending |
Accepted. |
processing |
Products are being written and their images fetched. |
completed |
Every product is written or rejected, every image fetched or failed. |
failed |
Stopped on our side. Post the batch again under a new external_id. |
Use the import.completed webhook, or poll with backoff:
delay=5for _ in $(seq 1 60); do status=$(curl -sS -H "Authorization: Bearer $TOKEN" "$BASE/imports/$IMPORT_ID" | jq -r '.status') echo "import status: $status" case "$status" in completed|failed) break ;; esac sleep "$delay" delay=$(( delay < 60 ? delay * 2 : 60 ))doneRead the result
Section titled “Read the result”{ "status": "completed", "total": 2, "created_count": 1, "failed_count": 1, "errors": [ { "sku": "1234567-891", "code": "inclusion", "field": "material", "message": "material must be one of cotton, wool, …" } ]}Fix the product and send it again under a new external_id. How each image
was fetched is on the product: see image status.