Import products from a feed
Starts a product feed import for the site and answers at once with the import. The server downloads the https feed address in the background (a Google Merchant style CSV or TSV, optionally gzipped, up to 10,000 products), stores its products and marks absent the ones a complete import no longer finds. A site holds one feed: a new address replaces the set at the next complete import. Follow the import at `GET .../products/imports/{importId}`. The address is judged before anything is queued or fetched; each refusal has its own code. A second import while one runs is refused with `product_import_already_running`. The answer is `202` when the import was handed to the background, and `200` with the import closed as `failed` when it could not be started. Recorded in the audit log, attributed to the API key; the audit entry does not hold the feed address, which the import keeps and returns as `sourceUrl`.
ApiKeyAuthAuthorizationBearer <token>A WorkOS org-scoped API key, created from the dashboard's organization settings page. Identifies the tenant every read and write is scoped to. Missing, malformed, unknown, revoked, expired, or non-organization-owned keys all return 401 (no distinction, so the response can't be used to probe which keys or org ids exist).
siteId*stringThe site id (prefixed site_). A site id that isn't yours is a 404, same as any other cross-tenant id.
application/json- body
feedAddress*stringThe https address of the product feed: a Google Merchant style CSV or TSV, optionally gzipped, on a public host. It is never returned by the API or stored in clear.
1 <= length <= 2048currency?|An ISO 4217 code such as EUR, used when the feed carries no currency. Refused with product_feed_currency_invalid when it is not a code.
length <= 10The import could not be started and was closed as failed.
application/json- response
data*curl -X POST 'https://example.com/api/v1/sites/string/products/imports' \ -H 'Content-Type: application/json' \ -d '{ "feedAddress": "https://shop.example/feeds/products.csv", "currency": "EUR"}'{ "data": { "id": "string", "state": "queued", "outcome": "completed", "counts": { "found": 0, "created": 0, "updated": 0, "refused": { "property1": 0, "property2": 0 }, "parseErrors": 0, "markedAbsent": 0, "purged": 0 }, "boundsReached": [ "string" ], "refusedExamples": [ { "reason": "string", "itemId": "string", "groupId": "string", "title": "string", "url": "string", "imageUrl": "string", "price": "string", "brand": "string" } ], "sourceUrl": "string", "startedBy": "member", "startedAt": "2019-08-24T14:15:22Z", "endedAt": "2019-08-24T14:15:22Z" }}List a site's product imports
Returns the product feed imports of the site, newest first, each with its state, outcome, counts and the bounds it reached. `limit` is 1 to 50 (20 by default). Each import carries the feed address it read as `sourceUrl`.
Get a product import
Returns one import with its state, outcome, counts and the bounds it reached; while it runs, the counts are those so far. An import with no progress for 30 minutes reads `failed`. An import of another site or another organization answers `404`. The import carries the feed address it read as `sourceUrl`.