BigCommerce
Management API
Customer Groups

Customers V2

Get All Customer Groups

GET /customer_groups

Request

Returns a list of Customer Groups. Default sorting is by customer-group ID, from lowest to highest.

Note: The default rate limit for this endpoint is 40 concurrent requests.

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.

  • page in query - number

    Number of pages.

  • limit in query - number

    Count per page.

  • name in query - string

    Filter customer groups by exact name match.

  • name:like in query - string

    Filter customer groups by name, using a fuzzy matching method.

  • is_default in query - boolean

    Filter by customers who sign up are added to this group by default.

  • date_created in query - string

    Filter customer groups by date_created. date_created=2018-09-05T13:43:54

  • date_created:max in query - string

    Filter customer groups by maximum date_created. date_created:max=2018-09-10

  • date_created:min in query - string

    Filter customer groups by date_created. date_created:min=2018-09-05

  • date_modified in query - string

    Filter customer groups by date_modified. date_modified=2018-09-05T13:45:03

  • `date_modified:min` in query - string

    Filter customer groups by minimum date_modified. date_modified:min=2019-09-04T:00:00:00 or date_modified:min=2019-09-04

  • `date_modified:max` in query - string

    Filter customer groups by maximum date_modified. date_modified:max=2018-09-05T13:45:03 or date_modified:max=2019-09-04

  • is_group_for_guests in query - boolean

    Filter whether the group is for guests. There can only be one customer group for guests at a time.

example

Response

Body

array | application/json
  • id
    integer

    ID of the customer group.

    Example: 1

  • name
    string

    Name of the group.

    Example: Wholesale

  • is_default
    boolean

    Determines whether new customers are assigned to this group by default.

    Example: false

  • category_access
    object

  • discount_rules
    array[object]

    A collection of discount rules that are automatically applied to customers who are members of the group.

  • date_created
    string

    Date on which the customer group was created.

    Example: 2023-07-17 06:30:41

  • date_modified
    string

    Date on which the customer group was last modified.

    Example: 2023-07-25 01:15:19

  • is_group_for_guests
    boolean

    Describes whether the group is for guests. There can only be one customer group for guests at a time.

example

Create a Customer Group

POST /customer_groups

Request

Creates a Customer Group.

Required Fields

  • name

Note: The default rate limit for this endpoint is 40 concurrent requests.

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

object | application/json

When creating a customer group category discount using the API it defaults to "products in this category and its subcategories". In the store control panel, this can be changed to either "products in this category only" or "products in this category and its subcategories". There are currently no settings to change this behavior with the API.

  • name
    string

    Name of the group.

    Example: Wholesale

  • is_default
    boolean

    Determines whether new customers are assigned to this group by default.

    Example: false

  • category_access
    object

  • discount_rules
    array[object]

    A collection of discount rules that are automatically applied to customers who are members of the group.

  • date_created
    string

    Date on which the customer group was created.

    Example: 2023-07-17 06:30:41

  • date_modified
    string

    Date on which the customer group was last modified.

    Example: 2023-07-25 01:15:19

  • is_group_for_guests
    boolean

    Describes whether the group is for guests. There can only be one customer group for guests at a time.

example

Response

Body

object | application/json

When creating a customer group category discount using the API it defaults to "products in this category and its subcategories". In the store control panel, this can be changed to either "products in this category only" or "products in this category and its subcategories". There are currently no settings to change this behavior with the API.

  • id
    integer

    ID of the customer group.

    Example: 1

  • name
    string

    Name of the group.

    Example: Wholesale

  • is_default
    boolean

    Determines whether new customers are assigned to this group by default.

    Example: false

  • category_access
    object

  • discount_rules
    array[object]

    A collection of discount rules that are automatically applied to customers who are members of the group.

  • date_created
    string

    Date on which the customer group was created.

    Example: 2023-07-17 06:30:41

  • date_modified
    string

    Date on which the customer group was last modified.

    Example: 2023-07-25 01:15:19

  • is_group_for_guests
    boolean

    Describes whether the group is for guests. There can only be one customer group for guests at a time.

example

Get a Customer Group

GET /customer_groups/{customer_group_id}

Request

Returns a Customer Group.

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.

  • customer_group_id in path - integer - required

    The ID of the customer group.

  • page in query - number

    Number of pages.

  • limit in query - number

    Count per page.

  • name in query - string

    Name of the customer groups.

  • date_created in query - string

    Filter items by date_created. date_created=2018-09-05T13:43:54

  • date_created:max in query - string

    Filter items by maximum date_created. date_created:max=2018-09-10

  • date_created:min in query - string

    Filter items by date_created. date_created:min=2018-09-05

  • date_modified in query - string

    Filter items by date_modified. date_modified=2018-09-05T13:45:03

  • date_modified:min in query - string

    Filter items by minimum date_modified. date_modified:min=2019-09-04T:00:00:00 or date_modified:min=2019-09-04

  • date_modified:max in query - string

    Filter items by maximum date_modified. date_modified:max=2018-09-05T13:45:03 or date_modified:max=2019-09-04

  • is_default in query - boolean

    Whether customers who sign up are added to this group by default.

example

Response

The request was successful.

Body

object | application/json

When creating a customer group category discount using the API it defaults to "products in this category and its subcategories". In the store control panel, this can be changed to either "products in this category only" or "products in this category and its subcategories". There are currently no settings to change this behavior with the API.

  • id
    integer

    ID of the customer group.

    Example: 1

  • name
    string

    Name of the group.

    Example: Wholesale

  • is_default
    boolean

    Determines whether new customers are assigned to this group by default.

    Example: false

  • category_access
    object

  • discount_rules
    array[object]

    A collection of discount rules that are automatically applied to customers who are members of the group.

  • date_created
    string

    Date on which the customer group was created.

    Example: 2023-07-17 06:30:41

  • date_modified
    string

    Date on which the customer group was last modified.

    Example: 2023-07-25 01:15:19

  • is_group_for_guests
    boolean

    Describes whether the group is for guests. There can only be one customer group for guests at a time.

example

Update a Customer Group

PUT /customer_groups/{customer_group_id}

Request

Updates a Customer Group.

Notes

Any combination of fields can be updated at once. Discount rules are treated in bulk. The entire set of rules is overwritten when a request is sent.

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

object | application/json

When creating a customer group category discount using the API it defaults to "products in this category and its subcategories". In the store control panel, this can be changed to either "products in this category only" or "products in this category and its subcategories". There are currently no settings to change this behavior with the API.

  • id
    integer

    ID of the customer group.

    Example: 1

  • name
    string

    Name of the group.

    Example: Wholesale

  • is_default
    boolean

    Determines whether new customers are assigned to this group by default.

    Example: false

  • category_access
    object

  • discount_rules
    array[object]

    A collection of discount rules that are automatically applied to customers who are members of the group.

  • date_created
    string

    Date on which the customer group was created.

    Example: 2023-07-17 06:30:41

  • date_modified
    string

    Date on which the customer group was last modified.

    Example: 2023-07-25 01:15:19

  • is_group_for_guests
    boolean

    Describes whether the group is for guests. There can only be one customer group for guests at a time.

example

Response

Body

object | application/json

When creating a customer group category discount using the API it defaults to "products in this category and its subcategories". In the store control panel, this can be changed to either "products in this category only" or "products in this category and its subcategories". There are currently no settings to change this behavior with the API.

  • id
    integer

    ID of the customer group.

    Example: 1

  • name
    string

    Name of the group.

    Example: Wholesale

  • is_default
    boolean

    Determines whether new customers are assigned to this group by default.

    Example: false

  • category_access
    object

  • discount_rules
    array[object]

    A collection of discount rules that are automatically applied to customers who are members of the group.

  • date_created
    string

    Date on which the customer group was created.

    Example: 2023-07-17 06:30:41

  • date_modified
    string

    Date on which the customer group was last modified.

    Example: 2023-07-25 01:15:19

  • is_group_for_guests
    boolean

    Describes whether the group is for guests. There can only be one customer group for guests at a time.

example

Delete a Customer Group

DELETE /customer_groups/{customer_group_id}

Request

Deletes a Customer Group.

Notes

  • All existing customers are unassigned from the group when it is deleted.
  • The default rate limit for this endpoint is 40 concurrent requests.

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.

  • customer_group_id in path - integer - required

    The ID of the customer group.

example

Response

No content. Request was successful but produced no response.

Get a Count of Customer Groups

GET /customer_groups/count

Request

Returns a count of all Customer Groups.

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.

example

Response

Body

object | application/json
  • count
    number

    Example: 27

example

Did you find what you were looking for?