Skip to main content

Create Lifecycle Shopify Redirects

POST 

/api/v2/product-lifecycle/shopify-redirects

Creates Shopify URL redirects now for archived or sold-out products, so each product's old /products/<handle> storefront URL forwards to its first live successor on that store, or to the fallback collection when there is none. Runs immediately for each Shopify listing of each product and reports a per-product outcome; up to 200 products per call.

Required scope: products:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Body:

  • product_ids (required, array of distinct integers, 1-200): the products to redirect

A product is skipped when it is not found, is not yet archived or sold out, or has no Shopify listing. A listing is skipped when redirect-to-successor is turned off in the lifecycle settings, the Shopify product no longer exists, there is no live successor and no fallback collection, or a redirect for that path already exists that was not created here (an existing redirect created here is updated). It fails when Shopify rejects the redirect or the store has not granted redirect permission (reconnect Shopify).

Response fields:

  • results: [{product_id, sku, outcome (applied, skipped, failed - failed if any listing failed, applied if any applied), message, successor_id, listings: [{product_listing_id, outcome, message, target (the redirect target path, e.g. /products/<successor handle> or /collections/<handle>)}]}]
  • counts: {applied, skipped, failed} product counts

Returns 422 when product_ids is missing, empty, has more than 200 entries, or has duplicates.

Requires a Bearer token with the products read/write scope and the products.manage_lifecycle permission.

Request​

Responses​

OK

Response Headers
    Content-Type