Bulk Import (CSV/NDJSON)
Flow: Create job → Upload file(s) to S3 (presigned) → Complete job (validate & load) → (optional) download error report
1) Create an import job
POST https://api.omakase.ai/v1/imports/orders
Headers:
X-API-Key: <your-key>
Content-Type: application/jsonBody:
{
"format": "csv" | "ndjson",
"compression": "none" | "gzip",
"schemaVersion": "1.0",
"uploadMode": "single" | "multipart" | "auto",
"fileSizeBytes": 123456789 // optional hint for auto mode
}Response (CSV example):
{
"jobId": "uuid",
"csvModel": "split",
"uploadMode": "single",
"expiresInSec": 1800,
"files": {
"ordersUrl": "https://s3...",
"itemsUrl": "https://s3...",
"fulfillmentUrl": "https://s3..."
}
}Response (NDJSON example):
Response (NDJSON multipart example):
2) Upload to S3 (presigned URL)
Single-part upload:
Multipart (large files):
Get part URLs:
Response:
Upload each part with PUT (use returned URL).
Complete multipart:
3) Complete the job (validate & load)
POST https://api.omakase.ai/v1/imports/{jobId}/complete
Response:
Poll status:
Response:
4) File formats
CSV (split): three files with fixed headers
orders.csvorder_items.csvfulfillment_events.csv
NDJSON (single): one file where each line is a JSON record
Tip: Gzip large files. Set compression: "gzip" when creating the job.
Error handling
Validation errors do not stop the job unless all records are invalid.
An error report is uploaded when there are invalid rows; use
reportUrlto download and fix.Get error report URL:
GET https://api.omakase.ai/v1/imports/{jobId}/reportRun validation only:
POST https://api.omakase.ai/v1/imports/{jobId}/validate
Last updated