Subscribers
Manage subscribers.
Get Subscribers
GET /stores/{store_hash}/v3/customers/subscribers
Request
Returns a list of Subscribers. Optional filter parameters can be passed in.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Accept in header with default of application/json - string - required
The MIME type of the response body.
- email in query - string
Filter items by email.
- first_name in query - string
Filter items by first_name.
- last_name in query - string
Filter items by last_name.
- source in query - string
Filter items by source.
- order_id in query - integer
Filter items by order_id.
- date_created in query - string
Filter items by date_created.
- date_modified in query - string
Filter items by date_modified. For example
v3/catalog/products?date_last_imported:min=2018-06-15
- page in query - integer
Specifies the page number in a limited (paginated) list of products.
- limit in query - integer
Controls the number of items per page in a limited (paginated) list of products.
- id in query - integer
Filter items by id.
example
curl --request GET \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v3/customers/subscribers' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'
Response
Body
Response payload for the BigCommerce API.
dataarray[object]
metaobject
Data about the response, including pagination and collection totals.
example
{ "data": [ { "email": "string", "first_name": "string", "last_name": "string", "source": "string", "order_id": 1, "channel_id": 1, "id": 0, "date_modified": "2019-08-24T14:15:22Z", "date_created": "2019-08-24T14:15:22Z" } ], "meta": { "pagination": { "total": 36, "count": 36, "per_page": 50, "current_page": 1, "total_pages": 1, "links": { "previous": "string", "current": "?page=1&limit=50", "next": "string" } } } }
Create a Subscriber
POST /stores/{store_hash}/v3/customers/subscribers
Request
Creates a Subscriber.
Required Fields
Read Only Fields
- id
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Content-Type in header with default of application/json - string - required
The MIME type of the request body.
Body
The model for a POST to create a subscriber.
emailstring
The email of the subscriber. Must be unique.
first_namestring
>= 0 characters<= 255 charactersThe first name of the subscriber.
last_namestring
>= 0 characters<= 255 charactersThe last name of the subscriber.
sourcestring
>= 0 characters<= 255 charactersThe source of the subscriber. Values are:
storefront
,order
, orcustom
.order_idinteger
The ID of the source order, if source was an order.
channel_idinteger
The channel ID where the subscriber was created.
example
{ "email": "string", "first_name": "string", "last_name": "string", "source": "string", "order_id": 1, "channel_id": 1 }
Response
Body
data
Full subscriber object returned in responses.
metaobject
Response metadata.
example
{ "data": { "email": "string", "first_name": "string", "last_name": "string", "source": "string", "order_id": 1, "channel_id": 1, "id": 0, "date_modified": "2019-08-24T14:15:22Z", "date_created": "2019-08-24T14:15:22Z" }, "meta": {} }
Delete Subscribers
DELETE /stores/{store_hash}/v3/customers/subscribers
Request
By default, it deletes all Subscribers. A filter should be added to avoid deleting all subscribers in a store.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Accept in header with default of application/json - string - required
The MIME type of the response body.
- email in query - string
Filter items by email.
- first_name in query - string
Filter items by first_name.
- last_name in query - string
Filter items by last_name.
- source in query - string
Filter items by source.
- order_id in query - integer
Filter items by order_id.
- date_created in query - string
Filter items by date_created.
- date_modified in query - string
Filter items by date_modified. For example
v3/catalog/products?date_last_imported:min=2018-06-15
example
curl --request DELETE \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v3/customers/subscribers' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'
Response
Get a Subscriber
GET /stores/{store_hash}/v3/customers/subscribers/{subscriber_id}
Request
Returns a Subscriber.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Accept in header with default of application/json - string - required
The MIME type of the response body.
- subscriber_id in path - integer - required
The ID of the
Subscriber
requested.
example
curl --request GET \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v3/customers/subscribers/[subscriber_id]' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'
Response
Body
data
Full subscriber object returned in responses.
metaobject
Response metadata.
example
{ "data": { "email": "string", "first_name": "string", "last_name": "string", "source": "string", "order_id": 1, "channel_id": 1, "id": 0, "date_modified": "2019-08-24T14:15:22Z", "date_created": "2019-08-24T14:15:22Z" }, "meta": {} }
Update a Subscriber
PUT /stores/{store_hash}/v3/customers/subscribers/{subscriber_id}
Request
Updates a Subscriber.
Read Only Fields
- id
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- subscriber_id in path - integer - required
The ID of the
Subscriber
requested. - Content-Type in header with default of application/json - string - required
The MIME type of the request body.
Body
The model for a PUT to update a subscriber.
emailstring
The email of the subscriber. Must be unique.
first_namestring
>= 0 characters<= 255 charactersThe first name of the subscriber.
last_namestring
>= 0 characters<= 255 charactersThe last name of the subscriber.
sourcestring
>= 0 characters<= 255 charactersThe source of the subscriber. Values are:
storefront
,order
, orcustom
.order_idinteger
The ID of the source order, if source was an order.
channel_idinteger
The channel ID where the subscriber was created.
example
{ "email": "string", "first_name": "string", "last_name": "string", "source": "string", "order_id": 1, "channel_id": 1 }
Response
Body
data
Full subscriber object returned in responses.
metaobject
Response metadata.
example
{ "data": { "email": "string", "first_name": "string", "last_name": "string", "source": "string", "order_id": 1, "channel_id": 1, "id": 0, "date_modified": "2019-08-24T14:15:22Z", "date_created": "2019-08-24T14:15:22Z" }, "meta": {} }
Delete a Subscriber
DELETE /stores/{store_hash}/v3/customers/subscribers/{subscriber_id}
Request
Deletes a Subscriber.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Accept in header with default of application/json - string - required
The MIME type of the response body.
- subscriber_id in path - integer - required
The ID of the
Subscriber
requested.
example
curl --request DELETE \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v3/customers/subscribers/[subscriber_id]' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'