Redirects
Get Redirect Import-Export Jobs
GET /stores/{store_hash}/v3/storefront/redirects/imex/jobs
Request
Returns a collection of the storeʼs 301 redirects across all sites.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Accept in header with default of application/json - string - required
The MIME type of the response body.
- id in query - string
Filters results by Redirect Import-Export job ID.
- type in query
Filters results by the type of the Redirect Import-Export job.
- status in query
Filters results by the status of the Redirect Import-Export job.
- limit in query with default of 10 - integer
Determines the number of items returned per page. The default is 10 items per page.
- page in query - integer
Specifies the page number to return when the number of items returned exceeds the page limit. Used to paginate large collections.
example
Response
Body
dataarray[object]
metaobject
example
Create Redirects Export Job
POST /stores/{store_hash}/v3/storefront/redirects/imex/export
Request
Creates a new 301 Redirects export job.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Content-Type in header with default of application/json - string - required
The MIME type of the request body.
Body
Data necessary to create a new 301 Redirects export job.
site_idinteger
The site ID for which you wish to export redirects. If no site ID is provided, the request exports all redirects for all sites.
Default: null
redirect_idsarray[integer]
A list of the redirect IDs you wish to export. If no redirect IDs are provided, the request exports all redirects for the given site selection.
Default: []
include_dynamic_target_urlsboolean
If true, the exported CSV will contain an additional read-only column containing the target URL for dynamic redirects.
Default: false
example
Response
Created
Body
idstring
Example: ab1c2de3-f4gh-5678-i90j-klm12n345o67
example
Create Redirects Import Job
POST /stores/{store_hash}/v3/storefront/redirects/imex/import
Request
Creates a new 301 Redirects import job.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Content-Type in header with default of multipart/form-data - string - required
The MIME type of the request body.
Response
Created
Body
idstring
Example: ab1c2de3-f4gh-5678-i90j-klm12n345o67
example
Open Redirect Export Event Stream
GET /stores/{store_hash}/v3/storefront/redirects/imex/export/{uuid}/events
Request
Opens an event stream to receive live updates from an export job.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Accept in header with default of text/event-stream - string - required
The MIME type of the response body.
- uuid in path - string - required
The import-export job identifier.
example
Response
Stream of export events. The data
attribute is stringified JSON.
Open Redirect Import Event Stream
GET /stores/{store_hash}/v3/storefront/redirects/imex/import/{uuid}/events
Request
Opens an event stream to receive live updates from an import job.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Accept in header with default of text/event-stream - string - required
The MIME type of the response body.
- uuid in path - string - required
The import-export job identifier.
example
Response
Stream of import events. The data
attribute is stringified JSON.
Download Redirect Export
GET /stores/{store_hash}/v3/storefront/redirects/imex/export/{uuid}/download
Request
Downloads the CSV file containing the results of an export job.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Content-Type in header with default of text/csv - string - required
The MIME type of the request body.
- uuid in path - string - required
The import-export job identifier.
example
Response
The exported Redirects in CSV format