Site

Get a Channel Site

GET /channels/{channel_id}/site

Request

Alias of GET /sites?channel_id=channel_id

Returns site data for the specified channel.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.
  • channel_id in path - integer
    required
    The ID of a channel.

example

curl --request GET \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v3/channels/[channel_id]/site' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'

Response

Body

object | application/json
  • data
    object

  • meta
    object

    Response metadata.

Update a Channel Site

PUT /channels/{channel_id}/site

Request

Updates a site for provided channel.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.
  • channel_id in path - integer
    required
    The ID of a channel.
  • Content-Type in header with default of application/json - string
    required
    The MIME type of the request body.

Body

object | application/json
  • url
    string

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

example

{
"url": "string"
}

Response

Body

object | application/json
  • data
    object

  • meta
    object

    Response metadata.

Create a Channel Site

POST /channels/{channel_id}/site

Request

Alias of POST /sites. Creates a site for provided channel.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.
  • channel_id in path - integer
    required
    The ID of a channel.
  • Content-Type in header with default of application/json - string
    required
    The MIME type of the request body.

Body

object | application/json
  • url
    string

    The Fully Qualified URL (including host and scheme) where this site is hosted. All URLs generated for this site will be appended to this.
    Example: https://kittens.mybigcommerce.com/
  • channel_id
    integer

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

example

{
"url": "https://kittens.mybigcommerce.com/",
"channel_id": 0
}

Response

Body

object | application/json
  • data
    object

  • meta
    object

    Response metadata.

Delete a Channel Site

DELETE /channels/{channel_id}/site

Request

Deletes the Channelʼs site.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.
  • channel_id in path - integer
    required
    The ID of a channel.

example

curl --request DELETE \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v3/channels/[channel_id]/site' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'

Response

Body

object | application/json

    example

    {}
    Did you find what you were looking for?