Skip to content

Import redirects

POST/admin/v1/stores/{store_id}/redirects/import
  • content:write
  • Idempotency-Key supported

Import redirects from CSV (Redirect from,Redirect to, the format Shopify exports; ; separators work too). Valid lines are created together; lines whose path already redirects are skipped; the rest are reported by line.

Path parameters

  • store_idstringrequired

    The store's ID, like store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.

Headers

  • Idempotency-Keystring

    Send the same key to retry safely: the first answer is replayed for 24 hours.

  • shop-api-versionYYYY-MM

    The version to answer in. Without it, your app’s pinned version, else the newest.

Body

  • csvstringrequired

Returns

200 What was created, skipped and left out.

Errors

  • 403forbiddenMissing permission.
  • 409The import would pass 100,000 redirects (redirect_limit).
  • 422validation_failedNot CSV, empty, or more than 20,000 lines.