Import Shopify products
Starts importing up to 100 Shopify products and returns 202 with the import; read GET /products/imports/{id} for each product’s result. Creates products or updates those created by an earlier import, refusing handles that belong to products OrderPilot did not create. Repeating the same Idempotency-Key and body returns the same import. Returns 403 IMPORT_NEEDS_REVIEW if direct importing is unavailable; costs can be set through OrderPilot’s data-migration connection.
Required access
- API key
- Change the catalogpermission
- Request limit
- Counts as 5 requests. Each key has a capacity of 15, restored at 0.6 a second.
Idempotent-Replayed: true. Responses are saved for 24 hours.Headers
Bearer and your key, opk_….
Up to 100 characters (letters, digits, - _ : .). Kept for 24 hours.
application/json. A body is at most 256 KB.
Body
JSON1–100 products, each with a different key and handle.
A Shopify product category (standard taxonomy) id, like aa-1-13, or its GID.
Where it is published. Left out: none, as a stock purchase order’s new products (a new product is kept off every channel that adds new products by itself). An update only adds channels.
HTML, up to 64 KB.
The Shopify handle it is created under and found by on a re-run (lowercase letters, digits and hyphens; other characters become hyphens). Defaults to one made from key, never from the title.
Up to 20, by public URL (Shopify downloads them). On an update only images not imported before are added; none is removed.
Up to 512 characters.
The product’s stable id in the system it comes from; a re-run sends the same. Defaults to the handle. key or handle is required.
Up to 3 (Shopify’s limit). Left out: the product has one variant and no options.
The values in the order to show them, each used by a variant. Left out: the variants’ own, in their order.
A new product without one is created draft; an update without one leaves it as it is.
One of active, draft, unlisted, archived.
Up to 250. Left out: an updated product keeps its tags. A tag with “OrderPilot” or “Order Pilot” in it is refused (OrderPilot hides its own products by them).
Up to 255 characters.
1–100. An update must list every variant the product has: an import never removes one.
At most 2 decimals.
Shopify’s unit cost, at most 2 decimals. Needs Enter costs and charges (a key: Enter and correct costs), or OrderPilot’s data migration connection; another caller’s item with a cost is refused.
At 0 in stock: stop selling (deny, Shopify’s default) or keep selling.
One of deny, continue.
One value per option, in the options’ order. Left out when the product has no options.
Selling price, at most 2 decimals.
Stock available at each location (up to 20; an item sets at most 250 in all). Set, never added: a re-run leaves the same numbers.
Whether Shopify counts its stock. Default true.
Shopify’s vendor. A new vendor name becomes a vendor in OrderPilot once the import finishes.
Returns
Accepted: counts, created_at, created_by, finished_at, id, items, started_at, status, total
Errors
Errors use { "error": { "code", "message" } }. Use code to handle the error. View all error codes.
The request isn’t valid (see error.code), or the API version isn’t supported.
No valid access token or API key.
The store’s subscription isn’t active.
Not allowed: the API is off for this store, or the caller lacks the scope or permission.
Not found, or not visible to this caller.
Wrong method for this path; Allow lists every method the path takes.
The request body didn’t arrive in time.
The same Idempotency-Key is still being processed (REQUEST_IN_PROGRESS), its outcome is unknown (OUTCOME_UNKNOWN: check the record), or the record changed since it was read.
The request body is too large.
The request is valid JSON but can’t be done (a rule of the store refuses it), or the Idempotency-Key was used with a different body.
The app is older than the oldest version still served (error.code CLIENT_TOO_OLD); see error.min_version and error.upgrade_url.
Over a rate limit; wait Retry-After seconds.
Something went wrong on our side. A write may have partly happened: check the record before retrying it.
Busy, switched off, or billing couldn’t be checked; wait Retry-After seconds.