For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • About Our APIs
  • REST
    • Overview
      • Overview
        • Abandoned Carts
        • Carts
        • Channels
            • GETList Channels
            • POSTCreate Channel
            • GETGet Channel
            • PUTUpdate Channel
              • PUTUpsert Siteʼs Checkout URL
              • DELDelete Siteʼs Checkout URL
        • Checkouts
        • Currencies
        • Customer Segmentation
        • Geography
        • Infrastructure Hosting
        • Inventory
        • Orders
        • Order Operations
        • Pickup
        • Pickup Methods
        • Pickup Options
        • Pricing
        • Price Lists
        • Promotions
        • Promotion Settings
        • Redirects
        • Scripts
        • Settings
        • Shipping
        • Sites
        • Subscribers
        • System Logs
        • Tax
        • Wishlists
      • Payments
  • GraphQL
    • Overview
  • MCP
    • Overview
Dev Portal
LogoLogo
RESTAdminManagementChannelsSite Checkout URL

Upsert Siteʼs Checkout URL

PUT
https://api.bigcommerce.com/stores/:store_hash/v3/channels/:channel_id/site/checkout-url
PUT
/stores/:store_hash/v3/channels/:channel_id/site/checkout-url
$curl -X PUT https://api.bigcommerce.com/stores/store_hash/v3/channels/1/site/checkout-url \
> -H "Accept: application/json" \
> -H "X-Auth-Token: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "id": 1,
3 "url": "https://kittens.mybigcommerce.com/",
4 "channel_id": 1,
5 "created_at": "2018-01-04T04:15:50.000Z",
6 "updated_at": "2018-01-04T04:15:50.000Z",
7 "ssl_status": "dedicated",
8 "urls": [
9 {
10 "url": "https://kittens.mybigcommerce.com/",
11 "type": "checkout",
12 "created_at": "2018-01-04T04:15:50.000Z",
13 "updated_at": "2018-01-04T04:15:50.000Z"
14 }
15 ],
16 "is_checkout_url_customized": true
17}
Creates or updates (upserts) a siteʼs checkout URL <Callout type="info"> 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`. </Callout>
Was this page helpful?
Previous

Delete Channel Site

Next

Delete Siteʼs Checkout URL

Built with

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 Name | Permission | Parameter | |:--------|:-----------|:----------| | Channel Listings | modify | `store_channel_listings` | | Channel Listings | read-only | `store_channel_listings_read_only` | | Channel Settings | modify | `store_channel_settings` | | Channel Settings | read-only | `store_channel_settings_read_only` | | Sites & Routes | modify | `store_sites` | | Sites & Routes | read-only | `store_sites_read_only` | ### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). | ### Further reading For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes). For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-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](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.

Request

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
idinteger
The ID of the site.
urlstring

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_idinteger
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_atdatetime

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

updated_atdatetime

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

ssl_statusenum

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

Allowed values:
urlslist of objects

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

is_checkout_url_customizedboolean

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

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.

The MIME type of the response body.