Subscribers

Manage subscribers.

Get Subscribers

GET /customers/subscribers

Request

Returns a list of Subscribers. Optional filter parameters can be passed in.

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.
  • 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_created:min in query - string
    Filter items by minimum date created, for example, 2024-05-14T09:34:00 or 2024-05-14. Returns metafields created after this date.
  • date_created:max in query - string
    Filter items by maximum date created, for example, 2024-05-14T09:34:00 or 2024-05-14. Returns metafields created before this date.
  • date_modified in query - string
    Filter items by date_modified. For example v3/catalog/products?date_last_imported:min=2018-06-15
  • date_modified:min in query - string
    Filter items by minimum date modified, for example, 2024-05-14T09:34:00 or 2024-05-14. Returns metafields modified after this date.
  • date_modified:max in query - string
    Filter items by maximum date modified, for example, 2024-05-14T09:34:00 or 2024-05-14. Returns metafields modified before this date.
  • 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
    required

    Filter items by ID.

  • id:in in query - array

    Filter items by ID. id:in=4,5,6

    Type: array[integer]

example

Response

Body

object | application/json

Response payload for the BigCommerce API.

  • data
    array[object]

  • meta
    object

    Data about the response, including pagination and collection totals.

example

Create a Subscriber

POST /customers/subscribers

Request

Creates a Subscriber.

Required Fields

  • email

Read Only Fields

  • id

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.
  • Content-Type in header with default of application/json - string
    required
    The MIME type of the request body.

Body

object | application/json

The model for a POST to create a subscriber.

  • first_name
    string

    The first name of the subscriber.

    >= 0 characters<= 255 characters
  • last_name
    string

    The last name of the subscriber.

    >= 0 characters<= 255 characters
  • source
    string

    The source of the subscriber. Values are: storefront, order, or custom.

    >= 0 characters<= 255 characters
  • order_id
    integer or null

    The ID of the source order, if source was an order.

    Min: 1
    Max: 2147483647
  • channel_id
    integer

    The channel ID where the subscriber was created.
    Min: 1
    Max: 2147483647
  • consents
    array[string]

    Shows the active subscriptions a shopper may have. If the consents array is empty, the user has unsubscribed or didn’t enable the newsletter subscription checkbox during checkout. The array will contain consent types like 'marketing_newsletter' and 'abandoned_cart'.

    Allowed: marketing_newsletter | abandoned_cart

    Type: array[string]
    Example: ["abandoned_cart"]

example

Response

Body

object | application/json
  • data
    object

    Full subscriber object returned in responses.
  • meta
    object

    Response metadata.

example

Delete Subscribers

DELETE /customers/subscribers

Request

By default, it deletes all subscribers. Use a filter to avoid deleting all subscribers in a store.

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.
  • 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

Response

Get a Subscriber

GET /customers/subscribers/{subscriber_id}

Request

Returns a Subscriber.

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.
  • subscriber_id in path - integer
    required

    The ID of the Subscriber requested.

example

Response

Body

object | application/json
  • data
    object

    Full subscriber object returned in responses.
  • meta
    object

    Response metadata.

example

Update a Subscriber

PUT /customers/subscribers/{subscriber_id}

Request

Updates a Subscriber.

Read Only Fields

  • id

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.
  • 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

object | application/json

The model for a PUT to update a subscriber.

  • first_name
    string

    The first name of the subscriber.

    >= 0 characters<= 255 characters
  • last_name
    string

    The last name of the subscriber.

    >= 0 characters<= 255 characters
  • source
    string

    The source of the subscriber. Values are: storefront, order, or custom.

    >= 0 characters<= 255 characters
  • order_id
    integer or null

    The ID of the source order, if source was an order.

    Min: 1
    Max: 2147483647
  • channel_id
    integer

    The channel ID where the subscriber was created.
    Min: 1
    Max: 2147483647
  • consents
    array[string]

    Shows the active subscriptions a shopper may have. If the consents array is empty, the user has unsubscribed or didn’t enable the newsletter subscription checkbox during checkout. The array will contain consent types like 'marketing_newsletter' and 'abandoned_cart'.

    Allowed: marketing_newsletter | abandoned_cart

    Type: array[string]
    Example: ["abandoned_cart"]

example

Response

Body

object | application/json
  • data
    object

    Full subscriber object returned in responses.
  • meta
    object

    Response metadata.

example

Delete a Subscriber

DELETE /customers/subscribers/{subscriber_id}

Request

Deletes a Subscriber.

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.
  • subscriber_id in path - integer
    required

    The ID of the Subscriber requested.

example

Response

See something you can improve? Edit this file on GitHub

Did you find what you were looking for?