NAV
Subscribe to developer updates

v3 API Reference

Themes API

API for uploading and managing BigCommerce storefront themes.

getStoreThemes

import requests
headers = {
    'X-Auth-Client': 'SampleClientID',
    'X-Auth-Token': 'SampleTokenHere',
    'Accept':'application/json'

}

r = requests.get('https://api.bigcommerce.com/stores/{store_id}/v3/themes', headers=headers)

print r.json()

GET /themes

Gets all store themes.

Responses

Status Meaning Description
200 OK Returns all themes associated with the BigCommerce store.
default Default Error message.

Example response – success >>>

{
  "data": [
    {
      "variations": [
        {
          "description": "string",
          "external_id": "string",
          "name": "string",
          "uuid": "string"
        }
      ],
      "uuid": "string",
      "name": "string",
      "is_private": true
    }
  ],
  "meta": {
    "pagination": {
      "total": 0,
      "count": 0,
      "per_page": 0,
      "current_page": 0,
      "total_pages": 0,
      "links": {
        "previous": "string",
        "current": "string",
        "next": "string"
      }
    }
  }
}

Example response – error >>>

{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string",
  "errors": {
    "property1": "string",
    "property2": "string"
  }
}

getStoreTheme

import requests
headers = {
    'X-Auth-Client': 'SampleClientID',
    'X-Auth-Token': 'SampleTokenHere',
    'Accept':'application/json'

}

r = requests.get('https://api.bigcommerce.com/stores/{store_id}/v3/themes/{theme_id}', headers=headers)

print r.json()

GET /themes/{theme_id}

Gets a specified store theme.

Parameters

Parameter In Type Required Description
theme_id path string true The theme identifier.

Responses

Status Meaning Description
200 OK The theme.
default Default Error message.

Example response – success >>>

{
  "data": {
    "variations": [
      {
        "description": "string",
        "external_id": "string",
        "name": "string",
        "uuid": "string"
      }
    ],
    "uuid": "string",
    "name": "string",
    "is_private": true
  },
  "meta": {}
}

Example response – error >>>

{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string",
  "errors": {
    "property1": "string",
    "property2": "string"
  }
}

uploadTheme

import requests
headers = {
    'X-Auth-Client': 'SampleClientID',
    'X-Auth-Token': 'SampleTokenHere',
    'Content-Type':'application/octet-stream',
    'Accept':'application/json'

}

r = requests.post('https://api.bigcommerce.com/stores/{store_id}/v3/themes', params={
 # Coming Soon
 },
    headers=headers

)

print r.json()

POST /themes

Uploads a new theme to a BigCommerce store.

Parameters

Parameter In Type Required Description
file formData file true The file.

Responses

Status Meaning Description
201 Created Job ID for the background job processing the theme upload.
default Default Error message.

Example response – success >>>

{
  "job_id": "string"
}

Example response – error >>>

{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string",
  "errors": {
    "property1": "string",
    "property2": "string"
  }
}

deleteStoreTheme

import requests
headers = {
    'X-Auth-Client': 'SampleClientID',
    'X-Auth-Token': 'SampleTokenHere',
    'Accept':'application/json'

}

r = requests.delete('https://api.bigcommerce.com/stores/{store_id}/v3/themes/{theme_id}', headers=headers)

print r.json()

DELETE /themes/{theme_id}

Deletes a specified store theme.

Parameters

Parameter In Type Required Description
theme_id path string true The theme identifier.

Responses

Status Meaning Description
204 No Content No content found to fulfill the request.
default Default Error message.

Example response – error >>>

{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string",
  "errors": {
    "property1": "string",
    "property2": "string"
  }
}

downloadTheme

import requests
headers = {
    'X-Auth-Client': 'SampleClientID',
    'X-Auth-Token': 'SampleTokenHere',
    'Content-Type':'application/json',
    'Accept':'application/json'

}

r = requests.post('https://api.bigcommerce.com/stores/{store_id}/v3/themes/{theme_id}/actions/download', params={
 # Coming Soon
 },
    headers=headers

)

print r.json()

POST /themes/{theme_id}/actions/download

Downloads a specified store theme.

Parameters

Parameter In Type Required Description
theme_id path string true The theme identifier.
which body string false A BigCommerce object specifying which theme to download. One of:
original: the original Marketplace or uploaded custom theme;
last_activated: the theme version most recently applied to the store;
last_created: the theme version most recently created.

If which is missing or invalid in the request, its value will default to last_activated.
{
  "which": "original"
}

Responses

Status Meaning Description
200 OK Job ID for the background job processing the download.
default Default Error message.

Example response – success >>>

{
  "job_id": "string"
}

Example response – error >>>

{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string",
  "errors": {
    "property1": "string",
    "property2": "string"
  }
}

activateStoreTheme

import requests
headers = {
    'X-Auth-Client': 'SampleClientID',
    'X-Auth-Token': 'SampleTokenHere',
    'Content-Type':'application/json',
    'Accept':'application/json'

}

r = requests.post('https://api.bigcommerce.com/stores/{store_id}/v3/themes/actions/activate', params={
 # Coming Soon
 },
    headers=headers

)

print r.json()

POST /themes/actions/activate

Activates a store theme.

Parameters

Parameter In Type Required Description
variation_id body string true The identifier for the variation to activate.
which body string false A BigCommerce object specifying which theme to activate. One of:
original: the original Marketplace or uploaded custom theme;
last_activated: the theme version most recently applied to the store;
last_created: the theme version most recently created.

If which is missing or invalid in the request, its value will default to last_activated.
{
  "variation_id": "string",
  "which": "original"
}

Responses

Status Meaning Description
204 No Content No content found to fulfill the request.
default Default Error message.

Example response – error >>>

{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string",
  "errors": {
    "property1": "string",
    "property2": "string"
  }
}

getJob

import requests
headers = {
    'X-Auth-Client': 'SampleClientID',
    'X-Auth-Token': 'SampleTokenHere',
    'Accept':'application/json'

}

r = requests.get('https://api.bigcommerce.com/stores/{store_id}/v3/themes/jobs/{job_id}', headers=headers)

print r.json()

GET /themes/jobs/{job_id}

Gets a specified job.

Parameters

Parameter In Type Required Description
job_id path string true The job identifier.

Responses

Status Meaning Description
200 OK The job.
default Default Error message.

Example response – success >>>

{
  "data": {
    "errors": [
      {
        "error": "string",
        "message": "string"
      }
    ],
    "id": "string",
    "percent_complete": 0,
    "result": {
      "property1": "string",
      "property2": "string"
    },
    "status": "string",
    "time": "string",
    "warnings": [
      {
        "message": "string",
        "warning": "string"
      }
    ]
  },
  "meta": {}
}

Example response – error >>>

{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string",
  "errors": {
    "property1": "string",
    "property2": "string"
  }
}