Working with the API
Bulk jobs and exports
Send thousands of orders, product changes or stock changes in one job, and export orders as one file.
A bulk job runs up to 10,000 lines of one kind in the background. Each line is the body of the single call it stands for, and runs exactly as that call would, with your key: same validation, same errors, same webhooks.
kind | Each line | Scope |
|---|---|---|
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 |
Sending a job
For a few hundred lines, send them inline:
{ "kind": "inventory.adjust", "lines": [ { "variant_id": "var_…", "set": 40, "reason": "correction" } ] }For more, write one JSON object per line (NDJSON), then:
POST /v1/bulk_uploadswith the file'ssizegives a slot;- PUT the file to its
upload_urlwith theheadersit gives; POST /v1/bulk_jobswithkindandupload_id.
The answer is the job, queued. A store runs 3 jobs at a time.
Following it
GET /v1/bulk_jobs/{id} shows processed, succeeded and failed; the bulk_job.completed webhook says when the last line is done. Then GET /v1/bulk_jobs/{id}/results?failed=true lists the lines that failed, each with the HTTP status and the error body the single call would have returned (a line that isn't JSON is invalid_json). Without failed, every line is listed with the id of what it created or changed. Jobs and results are kept 7 days.
Orders and products are created several at a time; updates and stock changes run in line order, so "+10" then "set to 40" ends at 40. Use external_id on orders: if a job is sent twice, the second copy of each order is refused as a duplicate.
POST /v1/bulk_jobs/{id}/cancel skips the lines not run yet.
Exporting orders
GET /v1/orders/export streams every matching order as NDJSON (one Order per line, up to 100,000), with the same filters as GET /v1/orders: created_since, updated_since, status, archived.
curl "https://api.ordexs.com/v1/orders/export?created_since=2026-10-01T00:00:00Z" \
-H "Authorization: Bearer $ORDEXS_KEY" -o orders.ndjson