Import-Export
Get Redirect Import-Export Jobs
GET https://api.bigcommerce.com/stores/{store_hash}/v3/storefront/redirects/imex/jobsRequest
Returns a collection of the storeʼs 301 redirects across all sites.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
- 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]
example
Create Redirects Export Job
POST https://api.bigcommerce.com/stores/{store_hash}/v3/storefront/redirects/imex/exportRequest
Creates a new 301 Redirects export job.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
Body
Data necessary to create a new 301 Redirects export job.
site_idinteger or null
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 https://api.bigcommerce.com/stores/{store_hash}/v3/storefront/redirects/imex/importRequest
Creates a new 301 Redirects import job.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
Body
Data necessary to create a new 301 Redirects import job.
import_filestring
requiredA CSV file containing a list of Redirects to be imported.
The headers must be defined as follows:
Domain,Old Path,Manual URL/Path,Dynamic Target Type,Dynamic Target ID
Not every line will have a value for every column.
Example: Domain,Old Path,Manual URL/Path,Dynamic Target Type,Dynamic Target ID store.example.com,/old-path,/new-manual-path,, store.example.com,/old-product,,Product,12 store.example.com,/old-brand,,Brand,34 store.example.com,/old-category,,Category,56 store.example.com,/old-page,,Page,78 store.example.com,/old-post,,Post,90
Response
Created
Body
idstring
Example: ab1c2de3-f4gh-5678-i90j-klm12n345o67
example
Open Redirect Export Event Stream
GET https://api.bigcommerce.com/stores/{store_hash}/v3/storefront/redirects/imex/export/{uuid}/eventsRequest
Opens an event stream to receive live updates from an export job.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
example
Response
Stream of export events. The data
attribute is stringified JSON.
Body
Open Redirect Import Event Stream
GET https://api.bigcommerce.com/stores/{store_hash}/v3/storefront/redirects/imex/import/{uuid}/eventsRequest
Opens an event stream to receive live updates from an import job.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
example
Response
Stream of import events. The data
attribute is stringified JSON.
Body
Download Redirect Export
GET https://api.bigcommerce.com/stores/{store_hash}/v3/storefront/redirects/imex/export/{uuid}/downloadRequest
Downloads the CSV file containing the results of an export job.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
example
Response
The exported Redirects in CSV format