Import Shopify products

Preview: may change during v1

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.

POST/products/imports
Base URLhttps://api.meetorderpilot.com/connect/v1
Preview: may change during v1

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.
Idempotency-Key requiredRetry with the same key and body to get the original response without repeating the change. The response includes Idempotent-Replayed: true. Responses are saved for 24 hours.

Headers

AuthorizationheaderRequired

Bearer and your key, opk_….

Idempotency-KeyheaderRequired

Up to 100 characters (letters, digits, - _ : .). Kept for 24 hours.

Content-Typeheader

application/json. A body is at most 256 KB.

Body

JSON
itemsarray of objectRequired

1–100 products, each with a different key and handle.

category_idstringOptional

A Shopify product category (standard taxonomy) id, like aa-1-13, or its GID.

channelsarray of stringOptional

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.

description_htmlstringOptional

HTML, up to 64 KB.

handlestringOptional

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.

imagesarray of objectOptional

Up to 20, by public URL (Shopify downloads them). On an update only images not imported before are added; none is removed.

altstringOptional

Up to 512 characters.

source_urlstringRequired
keystringOptional

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.

optionsarray of objectOptional

Up to 3 (Shopify’s limit). Left out: the product has one variant and no options.

namestringRequired
valuesarray of stringOptional

The values in the order to show them, each used by a variant. Left out: the variants’ own, in their order.

product_typestringOptional
statusstringOptional

A new product without one is created draft; an update without one leaves it as it is.

One of active, draft, unlisted, archived.

tagsarray of stringOptional

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).

titlestringRequired

Up to 255 characters.

variantsarray of objectRequired

1–100. An update must list every variant the product has: an import never removes one.

barcodestringOptional
compare_at_pricenumberOptional

At most 2 decimals.

costnumberOptional

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.

inventory_policystringOptional

At 0 in stock: stop selling (deny, Shopify’s default) or keep selling.

One of deny, continue.

option_valuesarray of stringOptional

One value per option, in the options’ order. Left out when the product has no options.

pricenumberOptional

Selling price, at most 2 decimals.

quantitiesarray of objectOptional

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.

skustringOptional
trackedbooleanOptional

Whether Shopify counts its stock. Default true.

vendorstringOptional

Shopify’s vendor. A new vendor name becomes a vendor in OrderPilot once the import finishes.

Returns

202

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.

400

The request isn’t valid (see error.code), or the API version isn’t supported.

401

No valid access token or API key.

402

The store’s subscription isn’t active.

403

Not allowed: the API is off for this store, or the caller lacks the scope or permission.

404

Not found, or not visible to this caller.

405

Wrong method for this path; Allow lists every method the path takes.

408

The request body didn’t arrive in time.

409

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.

413

The request body is too large.

422

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.

426

The app is older than the oldest version still served (error.code CLIENT_TOO_OLD); see error.min_version and error.upgrade_url.

429

Over a rate limit; wait Retry-After seconds.

500

Something went wrong on our side. A write may have partly happened: check the record before retrying it.

503

Busy, switched off, or billing couldn’t be checked; wait Retry-After seconds.

Was this page useful?