NAV
Subscribe to developer updates

v3 API Reference

Customers API

getSubscribers

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

}

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

print r.json()

GET /customers/subscribers

Returns a paginated collection of Subscriber objects.

Parameters

Parameter In Type Required Description
email query string false Filter items by email.
first_name query string false Filter items by first_name.
last_name query string false Filter items by last_name.
source query string false Filter items by source.
order_id query integer false Filter items by order_id.
date_created query string false Filter items by date_created.
date_modified query string false Filter items by date_modified.
page query integer false Specifies the page number in a limited (paginated) list of products.
limit query integer false Controls the number of items per page in a limited (paginated) list of products.

Responses

Status Meaning Description
200 OK An array of Subscriber objects and metadata.
{
  "data": [
    {
      "id": 0,
      "email": "string",
      "first_name": "string",
      "last_name": "string",
      "source": "string",
      "order_id": 1,
      "date_modified": "2017-03-24T23:49:18Z",
      "date_created": "2017-03-24T23:49:18Z"
    }
  ],
  "meta": {
    "pagination": {
      "total": 0,
      "count": 0,
      "per_page": 0,
      "current_page": 0,
      "total_pages": 0,
      "links": {
        "previous": "string",
        "current": "string",
        "next": "string"
      }
    }
  }
}

createSubscriber

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

}

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

)

print r.json()

POST /customers/subscribers

Creates a Subscriber object.

Parameters

Parameter In Type Required Description
subscriber body SubscriberPost true A Subscriber object.
{
  "id": 0,
  "email": "string",
  "first_name": "string",
  "last_name": "string",
  "source": "string",
  "order_id": 1
}

Responses

Status Meaning Description
200 OK A Subscriber object.
409 Conflict The Subscriber was in conflict with another Subscriber. This is caused by duplicate unique values, such as email.
422 Unprocessable Entity The Subscriber was not valid. This is caused either by missing required fields, or by invalid data. See the response for more details.
{
  "data": {
    "id": 0,
    "email": "string",
    "first_name": "string",
    "last_name": "string",
    "source": "string",
    "order_id": 1,
    "date_modified": "2017-03-24T23:49:18Z",
    "date_created": "2017-03-24T23:49:18Z"
  },
  "meta": {}
}
{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string",
  "errors": {
    "property1": "string",
    "property2": "string"
  }
}
{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string",
  "errors": {
    "property1": "string",
    "property2": "string"
  }
}

deleteSubscribers

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

}

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

print r.json()

DELETE /customers/subscribers

Deletes one or more Subscriber objects from BigCommerce Customers.

Parameters

Parameter In Type Required Description
email query string false Filter items by email.
first_name query string false Filter items by first_name.
last_name query string false Filter items by last_name.
source query string false Filter items by source.
order_id query integer false Filter items by order_id.
date_created query string false Filter items by date_created.
date_modified query string false Filter items by date_modified.

Responses

Status Meaning Description
204 No Content An empty response.

getSubscriberById

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

}

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

print r.json()

GET /customers/subscribers/{subscriber_id}

Gets a Subscriber object.

Parameters

Parameter In Type Required Description
subscriber_id path number true The ID of the Subscriber requested.

Responses

Status Meaning Description
200 OK A Subscriber object.
404 Not Found The resource was not found.
{
  "data": {
    "id": 0,
    "email": "string",
    "first_name": "string",
    "last_name": "string",
    "source": "string",
    "order_id": 1,
    "date_modified": "2017-03-24T23:49:18Z",
    "date_created": "2017-03-24T23:49:18Z"
  },
  "meta": {}
}
{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string"
}

updateSubscriber

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

}

r = requests.put('https://api.bigcommerce.com/stores/{{store_id}}/v3/customers/subscribers/{subscriber_id}', params={
 # Coming Soon
 },
    headers=headers

)

print r.json()

PUT /customers/subscribers/{subscriber_id}

Updates a Subscriber object.

Parameters

Parameter In Type Required Description
subscriber_id path number true The ID of the Subscriber requested.
subscriber body SubscriberPut true Returns a Subscriber object.
{
  "id": 0,
  "email": "string",
  "first_name": "string",
  "last_name": "string",
  "source": "string",
  "order_id": 1
}

Responses

Status Meaning Description
200 OK A Subscriber object.
404 Not Found The resource was not found.
409 Conflict The Subscriber was in conflict with another subscriber. This is the result of duplicate unique values, such as email.
422 Unprocessable Entity The Subscriber was not valid. This is caused either by missing required fields, or by invalid data. See the response for more details.
{
  "data": {
    "id": 0,
    "email": "string",
    "first_name": "string",
    "last_name": "string",
    "source": "string",
    "order_id": 1,
    "date_modified": "2017-03-24T23:49:18Z",
    "date_created": "2017-03-24T23:49:18Z"
  },
  "meta": {}
}
{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string"
}
{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string",
  "errors": {
    "property1": "string",
    "property2": "string"
  }
}
{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string",
  "errors": {
    "property1": "string",
    "property2": "string"
  }
}

deleteSubscriberById

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

}

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

print r.json()

DELETE /customers/subscribers/{subscriber_id}

Deletes a Subscriber object.

Parameters

Parameter In Type Required Description
subscriber_id path number true The ID of the Subscriber requested.

Responses

Status Meaning Description
204 No Content An empty response.