BigCommerce
Management API
Import Export

Redirects

Get Redirect Import-Export Jobs

GET /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

object | application/json
  • data
    array[object]

  • meta
    object

example

Create Redirects Export Job

POST /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

object | application/json

Data necessary to create a new 301 Redirects export job.

  • site_id
    integer 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_ids
    array[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_urls
    boolean

    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

object | application/json
  • id
    string

    Example: ab1c2de3-f4gh-5678-i90j-klm12n345o67

example

Create Redirects Import Job

POST /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

object | application/json
  • id
    string

    Example: ab1c2de3-f4gh-5678-i90j-klm12n345o67

example

Open Redirect Export Event Stream

GET /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 /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 /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

Did you find what you were looking for?