Redirects
Get All Redirects
GET https://api.bigcommerce.com/stores/{store_hash}/v2/redirects⚠️
This endpoint is deprecated.
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
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- page in query - integerFilter param.
- limit in query - integerFilter 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: {{token}}'
Response
Body
array | application/json
idinteger
Numeric ID of the redirect.Example: 1pathstring
requiredThe path from which to redirect.Example: /smith-journal-13/forwardobject
requiredurlstring
read-onlyURL of the redirect. READ-ONLY.Example: http://store-store_hash.mybigcommerce.com/towels/bath-towels/hand-towels/
example
[
{
"id": 1,
"path": "/smith-journal-13/",
"forward": {
"type": "product",
"ref": 111
},
"url": "http://store-store_hash.mybigcommerce.com/towels/bath-towels/hand-towels/"
}
]
Create a Redirect
POST https://api.bigcommerce.com/stores/{store_hash}/v2/redirectsRequest
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
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
object | application/json
idinteger
Numeric ID of the redirect.Example: 1pathstring
requiredThe path from which to redirect.Example: /smith-journal-13/forwardobject
requiredurlstring
read-onlyURL of the redirect. READ-ONLY.Example: http://store-store_hash.mybigcommerce.com/towels/bath-towels/hand-towels/
example
{
"id": 1,
"path": "/smith-journal-13/",
"forward": {
"type": "product",
"ref": 111
},
"url": "http://store-store_hash.mybigcommerce.com/towels/bath-towels/hand-towels/"
}
Response
Body
object | application/json
idinteger
Numeric ID of the redirect.Example: 1pathstring
requiredThe path from which to redirect.Example: /smith-journal-13/forwardobject
requiredurlstring
read-onlyURL of the redirect. READ-ONLY.Example: http://store-store_hash.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 https://api.bigcommerce.com/stores/{store_hash}/v2/redirects⚠️
This endpoint is deprecated.
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
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe 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: {{token}}'
Response
Get a Redirect
GET https://api.bigcommerce.com/stores/{store_hash}/v2/redirects/{id}⚠️
This endpoint is deprecated.
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
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- id in path - integerrequiredID 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: {{token}}'
Response
Body
object | application/json
idinteger
Numeric ID of the redirect.Example: 1pathstring
requiredThe path from which to redirect.Example: /smith-journal-13/forwardobject
requiredurlstring
read-onlyURL of the redirect. READ-ONLY.Example: http://store-store_hash.mybigcommerce.com/towels/bath-towels/hand-towels/
example
{
"id": 1,
"path": "/smith-journal-13/",
"forward": {
"type": "product",
"ref": 111
},
"url": "http://store-store_hash.mybigcommerce.com/towels/bath-towels/hand-towels/"
}
Update a Redirect
PUT https://api.bigcommerce.com/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
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- id in path - integerrequiredID of the redirect URL.
- Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
object | application/json
idinteger
Numeric ID of the redirect.Example: 1pathstring
requiredThe path from which to redirect.Example: /smith-journal-13/forwardobject
requiredurlstring
read-onlyURL of the redirect. READ-ONLY.Example: http://store-store_hash.mybigcommerce.com/towels/bath-towels/hand-towels/
example
{
"id": 1,
"path": "/smith-journal-13/",
"forward": {
"type": "product",
"ref": "111"
},
"url": "http://store-store_hash.mybigcommerce.com/towels/bath-towels/hand-towels/"
}
Response
Body
object | application/json
idinteger
Numeric ID of the redirect.Example: 1pathstring
requiredThe path from which to redirect.Example: /smith-journal-13/forwardobject
requiredurlstring
read-onlyURL of the redirect. READ-ONLY.Example: http://store-store_hash.mybigcommerce.com/towels/bath-towels/hand-towels/
example
{
"id": 1,
"path": "/smith-journal-13/",
"forward": {
"type": "product",
"ref": 111
},
"url": "http://store-store_hash.mybigcommerce.com/towels/bath-towels/hand-towels/"
}
Delete a Redirect
DELETE https://api.bigcommerce.com/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
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- id in path - integerrequiredID 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: {{token}}'
Response
Get a Count of Redirects
GET https://api.bigcommerce.com/stores/{store_hash}/v2/redirects/count⚠️
This endpoint is deprecated.
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
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe 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: {{token}}'
Response
Body
object | application/json
countnumber
Example: 27
example
{
"count": 27
}
Did you find what you were looking for?