Can a BigCommerce redirect export be limited to selected rules or one site?

The Citead team, updated

In short. Use site_id for one site and redirect_ids for selected redirect records in a BigCommerce export job.

Definition: Yes. BigCommerce's redirect export job accepts an optional site_id filter and an optional list of redirect_ids, so a request can target one site, selected redirect rules, or both.

Key facts

  • BigCommerce exposes the operation as POST /v3/storefront/redirects/imex/export, which creates a new 301 Redirects export job in the Create Redirects Export Job reference.
  • site_id is an optional, nullable integer. When it is omitted, the request exports redirects for all sites.
  • redirect_ids is an optional list of integers with a default of []. When it is omitted, the request exports all redirects for the selected site scope.
  • include_dynamic_target_urls is optional and defaults to false; setting it to true adds a read-only target URL column for dynamic redirects.
  • A 409 response means no redirects meet the request criteria. A 429 response means an active Redirects import or export job is already running.

How do the export filters work?

The request body is a JSON object. Use site_id to choose the site scope and redirect_ids to name the redirect records to export within that scope. The documentation describes the ID list as applying to the given site selection, so leaving the list empty selects all redirects for that selection.

POST https://api.bigcommerce.com/stores/{store_hash}/v3/storefront/redirects/imex/export
Accept: application/json
Content-Type: application/json
X-Auth-Token: <apiKey>
{
  "site_id": 1,
  "redirect_ids": [1, 2]
}

The request also requires the store_hash path parameter, which BigCommerce defines as the permanent ID of the store. The X-Auth-Token header is required, and the reference lists store_v2_content for Content modify permission and store_v2_content_read_only for Content read-only permission.

What does one site mean in this API?

The export reference defines site_id as the site for which redirects are exported. BigCommerce's separate Upsert Redirects reference shows the same field on the redirect object and requires it when creating or updating redirect data. That reference describes the endpoint as writing redirect data across all storefronts, while each 301RedirectUpsert object carries its own site_id.

The upsert request lists required from_path and site_id fields and an optional to object. Its response lists data and meta fields. The export reference does not state how it handles an ID outside the selected site.

What does the export job return?

On success, the endpoint returns 201 Created with an optional string id. The ID identifies the export job created by the request. A 409 is returned when no redirects meet the criteria, and a 429 is returned when the store already has an active Redirects import or export job running. The optional include_dynamic_target_urls switch changes the CSV columns by adding the full target URL as a read-only field for dynamic redirects.

FAQ

Can I export redirects for every site?

Yes. Leave site_id out of the request. BigCommerce documents that this exports all redirects for all sites.

Can I export only named redirect rules?

Yes. Supply their integer IDs in redirect_ids. If the field is omitted, the export includes all redirects for the selected site scope.

What happens when no rule matches?

The export reference documents a 409 Conflict Error with the message, “No Redirects in your store meet the criteria in your request.”

Sources

  1. BigCommerce, "Create Redirects Export Job", undated
  2. BigCommerce, "Upsert Redirects", undated

Check how a page reads to answer engines. Open the GEO score analyzer

Test a page and see what to fix first

The analysis usually takes less than 10 seconds and needs no account.

400,000+ pages scored in the public benchmark