Skip to navigation

Update Site’s Routes

Upsert routes for site with ID {site_id}.

Usage Notes

  • id is required when updating an existing route.

Authentication

X-Auth-Tokenstring

OAuth scopes

UI NamePermissionParameter
Channel Listingsmodifystore_channel_listings
Channel Listingsread-onlystore_channel_listings_read_only
Channel Settingsmodifystore_channel_settings
Channel Settingsread-onlystore_channel_settings_read_only
Sites & Routesmodifystore_sites
Sites & Routesread-onlystore_sites_read_only

Authentication header

HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see our Guide to API Accounts.

Further reading

For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.

For more about BigCommerce OAuth scopes, see our Guide to API Accounts.

For a list of API status codes, see API Status Codes.

Path parameters

site_idintegerRequired
The ID of the site.
store_hashstringRequired
Permanent ID of the BigCommerce store.

Headers

AcceptstringRequiredDefaults to application/json

The MIME type of the response body.

Request

This endpoint expects a list of objects.
idintegerOptional
Unique ID for this route. Required when updating an existing route.
matchingstringOptional

Depending on the resource type, this can be an ID (matching a specific item), or a ”*” wildcard (matching all items of that type).

For example, a route with a type: “product” and matching: “5” will be used for the product with the ID of 5.

routestringOptional

The route template that will be used to generate the URL for the requested resource.

Supports several tokens:

  • {id} The ID of the requested item.
  • {slug} The slug for the requested item (if available). Note: the slug value may contain / slash.
  • {language} The language string that the client is using.
typeenumOptional

The type of resource being routed to; supported types.

Response

OK
datalist of objectsOptional
metaobjectOptional
Meta data relating to pagination.

Errors

422
Unprocessable Entity Error