Get All Redirects
GET /stores/{store_hash}/v2/redirects
Request
Returns a list all Redirect URLs.
Warning
Deprecated
- This API operation is deprecated. Avoid using this API operation if possible. It will be removed in a future version.
- To get redirect URLs, use Redirects V3ʼs Get redirects endpoint.
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.
- page in query - integer
Filter param.
- limit in query - integer
Filter param.
example
curl --request GET \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v2/redirects' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'
Response
Body
idinteger
Numeric ID of the redirect.
Example: 1
pathstring
The path from which to redirect.
Example: /smith-journal-13/
forwardobject
urlstring
URL of the redirect. READ-ONLY
Example: http://store-url.mybigcommerce.com/towels/bath-towels/hand-towels/
example
{ "id": 1, "path": "/smith-journal-13/", "forward": { "type": "product", "ref": 111 }, "url": "http://store-url.mybigcommerce.com/towels/bath-towels/hand-towels/" }
Create a Redirect
POST /stores/{store_hash}/v2/redirects
Request
Creates a Redirect URL.
Required Fields
- path
- forward
Read Only
- url
Warning
Deprecated
- This API operation is deprecated. Avoid using this API operation if possible. It will be removed in a future version.
- To upsert new redirect data, use Redirects V3ʼs Upsert redirects endpoint.
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
idinteger
Numeric ID of the redirect.
Example: 1
pathstring
requiredThe path from which to redirect.
Example: /smith-journal-13/
forwardobject
requiredurlstring
URL of the redirect. READ-ONLY
Example: http://store-url.mybigcommerce.com/towels/bath-towels/hand-towels/
example
{ "id": 1, "path": "/smith-journal-13/", "forward": { "type": "product", "ref": 111 }, "url": "http://store-url.mybigcommerce.com/towels/bath-towels/hand-towels/" }
Response
Body
idinteger
Numeric ID of the redirect.
Example: 1
pathstring
requiredThe path from which to redirect.
Example: /smith-journal-13/
forwardobject
requiredurlstring
URL of the redirect. READ-ONLY
Example: http://store-url.mybigcommerce.com/towels/bath-towels/hand-towels/
example
{ "id": 3, "path": "/mens_clothing", "forward": { "type": "category", "ref": 3 }, "url": "http://store.example.com/mens" }
Delete All Redirects
DELETE /stores/{store_hash}/v2/redirects
Request
By default, it deletes all Redirect URLs in a store.
Warning
Deprecated
- This API operation is deprecated. Avoid using this API operation if possible. It will be removed in a future version.
- To delete redirect URLs, use Redirects V3ʼs Delete redirects endpoint.
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.
example
curl --request DELETE \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v2/redirects' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'
Response
Get a Redirect
GET /stores/{store_hash}/v2/redirects/{id}
Request
Returns a single Redirect URL.
Warning
Deprecated
- This API operation is deprecated. Avoid using this API operation if possible. It will be removed in a future version.
- To get a redirect URL, use Redirects V3ʼs Get redirects endpoint.
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 path - integer - required
ID of the redirect URL.
example
curl --request GET \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v2/redirects/[id]' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'
Response
Body
idinteger
Numeric ID of the redirect.
Example: 1
pathstring
requiredThe path from which to redirect.
Example: /smith-journal-13/
forwardobject
requiredurlstring
URL of the redirect. READ-ONLY
Example: http://store-url.mybigcommerce.com/towels/bath-towels/hand-towels/
example
{ "id": 1, "path": "/smith-journal-13/", "forward": { "type": "product", "ref": 111 }, "url": "http://store-url.mybigcommerce.com/towels/bath-towels/hand-towels/" }
Update a Redirect
PUT /stores/{store_hash}/v2/redirects/{id}
Request
Updates a Redirect URL.
Required Fields
- path
- forward
Read Only Fields
- url
Warning
Deprecated
- This API operation is deprecated. Avoid using this API operation if possible. It will be removed in a future version.
- To update redirect data, use Redirects V3ʼs Upsert redirects endpoint.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- id in path - integer - required
ID of the redirect URL.
- Content-Type in header with default of application/json - string - required
The MIME type of the request body.
Body
idinteger
Numeric ID of the redirect.
Example: 1
pathstring
requiredThe path from which to redirect.
Example: /smith-journal-13/
forwardobject
requiredurlstring
URL of the redirect. READ-ONLY
Example: http://store-url.mybigcommerce.com/towels/bath-towels/hand-towels/
example
{ "id": 1, "path": "/smith-journal-13/", "forward": { "type": "product", "ref": "111" }, "url": "http://store-url.mybigcommerce.com/towels/bath-towels/hand-towels/" }
Response
Body
idinteger
Numeric ID of the redirect.
Example: 1
pathstring
requiredThe path from which to redirect.
Example: /smith-journal-13/
forwardobject
requiredurlstring
URL of the redirect. READ-ONLY
Example: http://store-url.mybigcommerce.com/towels/bath-towels/hand-towels/
example
{ "id": 1, "path": "/smith-journal-13/", "forward": { "type": "product", "ref": 111 }, "url": "http://store-url.mybigcommerce.com/towels/bath-towels/hand-towels/" }
Delete a Redirect
DELETE /stores/{store_hash}/v2/redirects/{id}
Request
Deletes a Redirect URL.
Warning
Deprecated
- This API operation is deprecated. Avoid using this API operation if possible. It will be removed in a future version.
- To delete a redirect URL, use Redirects V3ʼs Delete redirects endpoint.
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 path - integer - required
ID of the redirect URL.
example
curl --request DELETE \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v2/redirects/[id]' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'
Response
Get a Count of Redirects
GET /stores/{store_hash}/v2/redirects/count
Request
Gets a count of Redirect URLs in a store.
Warning
Deprecated
- This API operation is deprecated. Avoid using this API operation if possible. It will be removed in a future version.
- To get a count of redirects, use the
meta
object data returned with the Redirects V3ʼs Get redirects endpoint.
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.
example
curl --request GET \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v2/redirects/count' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'
Response
Body
countnumber
Example: 27
example
{ "count": 27 }