Skip to navigation

Upsert Siteʼs Checkout URL

Creates or updates (upserts) a siteʼs checkout URL

For the “urls” object, we no longer modify the www prefix of the primary URL. The API returns URLs exactly as the customer enters them, similar to the “url” field.

  • If the customer saves a URL with www, the API returns it with www.
  • If the customer saves a URL without www, the API returns it without www.

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

channel_idlongRequired
The ID of a channel.
store_hashstringRequired
Permanent ID of the BigCommerce store.

Headers

AcceptstringRequiredDefaults to application/json

The MIME type of the response body.

Request

This endpoint expects an object.
urlstringOptionalformat: "uri"

Unique site checkout URL. It must be valid and a sub-domain of the primary channel URL. Note: The API will change all URLs using the HTTP protocol to HTTPS.

Response

OK
idintegerOptional
The ID of the site.
urlstringOptional

The fully qualified URL (including host and scheme) where this site is hosted. All URLs generated for this site will be appended to this.

channel_idintegerOptional
The channel to which this site is attached. Each site belongs to a single channel, and each channel can have either zero or more sites.
created_atdatetimeOptional

The date-time that this site was created, formatted as an RFC-3339 string.

updated_atdatetimeOptional

The date-time that this site was last updated, formatted as an RFC-3339 string.

ssl_statusenumOptional

Indicates if a private/dedicated SSL is installed on this site, or if itʼs using shared SSL.

Allowed values:
urlslist of objectsOptional

All URLs that belong to the site, including primary, canonical, and checkout URLs.

is_checkout_url_customizedbooleanOptional

Indicates whether the channel uses a custom checkout domain. When false, the checkout domain falls back to the default channel’s primary URL.

Errors

422
Unprocessable Entity Error