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_idfilter and an optional list ofredirect_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_idis an optional, nullable integer. When it is omitted, the request exports redirects for all sites.redirect_idsis 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_urlsis optional and defaults tofalse; setting it totrueadds a read-only target URL column for dynamic redirects.- A
409response means no redirects meet the request criteria. A429response 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.
Related terms
- How can BigCommerce redirects be written for a specific storefront site?
- How can a BigCommerce redirect export include resolved dynamic target URLs?
- How do BigCommerce manual and dynamic redirect targets differ?
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
Check how a page reads to answer engines. Open the GEO score analyzer