Bulk
Queue a bulk job
Up to 10,000 lines of one kind, each the body of the single call it stands for, run in the background by Ordexs with this key as the actor:
| kind | Each line is | Needs |
|---|---|---|
| orders.create | a POST /v1/orders body | orders:write |
| orders.update | a PATCH /v1/orders/{id} body plus order_id | orders:write |
| products.create | a POST /v1/products body | products:write |
| products.update | a PATCH /v1/products/{id} body plus product_id | products:write |
| inventory.adjust | { variant_id, delta or set, reason?, note? } | inventory:write |
Send the lines as a file (upload_id, from POST /v1/bulk_uploads) or, for a few hundred, inline in lines. Each line is validated and run exactly as the single endpoint would; one failing line never stops the others. Follow progress with GET /v1/bulk_jobs/{id} or the bulk_job.completed webhook, then read each line's outcome from /results. A store runs 3 jobs at a time.
Body
- kindstringRequired
One of
orders.create,orders.update,products.create,products.update,inventory.adjust - upload_idstring
starts with upl_
- linesarray of objects
up to 1000 items · at least 1 item
Returns
202 Accepted · The job, queued. BulkJob
- idstring
starts with blk_
- objectstring
always "bulk_job"
- kindstring
One of
orders.create,orders.update,products.create,products.update,inventory.adjust - statusstring
One of
queued,running,completed,cancelled - totalinteger
- processedinteger
- succeededinteger
- failedinteger
- created_atstring
ISO 8601 date-time, UTC
- started_atstring or null
ISO 8601 date-time, UTC
- finished_atstring or null
ISO 8601 date-time, UTC
- expires_atstring or null
When the job and its results are deleted.
ISO 8601 date-time, UTC
- livemodeboolean
Errors
Every error has the same shape. This endpoint can answer with:
