Customer Groups
Get All Customer Groups
GET https://api.bigcommerce.com/stores/{store_hash}/v2/customer_groupsRequest
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 headerrequired
Parameters
- store_hash in path - string
- 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
ordate_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
ordate_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
idinteger
ID of the customer group.
Example: 1namestring
Name of the group.
Example: Wholesaleis_defaultboolean
Determines whether new customers are assigned to this group by default.
category_accessobject
discount_rulesarray[object]
A collection of discount rules that are automatically applied to customers who are members of the group.
date_createdstring
Date on which the customer group was created.
Example: 2023-07-17 06:30:41date_modifiedstring
Date on which the customer group was last modified.
Example: 2023-07-25 01:15:19is_group_for_guestsboolean
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 https://api.bigcommerce.com/stores/{store_hash}/v2/customer_groupsRequest
Creates a Customer Group.
Required Fields
- name
Note: The default rate limit for this endpoint is 40 concurrent requests.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
Body
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.
namestring
Name of the group.
Example: Wholesaleis_defaultboolean
Determines whether new customers are assigned to this group by default.
category_accessobject
discount_rulesarray[object]
A collection of discount rules that are automatically applied to customers who are members of the group.
date_createdstring
Date on which the customer group was created.
Example: 2023-07-17 06:30:41date_modifiedstring
Date on which the customer group was last modified.
Example: 2023-07-25 01:15:19is_group_for_guestsboolean
Describes whether the group is for guests. There can only be one customer group for guests at a time.
example
Response
Body
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.
idinteger
ID of the customer group.
Example: 1namestring
Name of the group.
Example: Wholesaleis_defaultboolean
Determines whether new customers are assigned to this group by default.
category_accessobject
discount_rulesarray[object]
A collection of discount rules that are automatically applied to customers who are members of the group.
date_createdstring
Date on which the customer group was created.
Example: 2023-07-17 06:30:41date_modifiedstring
Date on which the customer group was last modified.
Example: 2023-07-25 01:15:19is_group_for_guestsboolean
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 https://api.bigcommerce.com/stores/{store_hash}/v2/customer_groups/{customer_group_id}Request
Returns a Customer Group.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
- 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
ordate_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
ordate_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
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.
idinteger
ID of the customer group.
Example: 1namestring
Name of the group.
Example: Wholesaleis_defaultboolean
Determines whether new customers are assigned to this group by default.
category_accessobject
discount_rulesarray[object]
A collection of discount rules that are automatically applied to customers who are members of the group.
date_createdstring
Date on which the customer group was created.
Example: 2023-07-17 06:30:41date_modifiedstring
Date on which the customer group was last modified.
Example: 2023-07-25 01:15:19is_group_for_guestsboolean
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 https://api.bigcommerce.com/stores/{store_hash}/v2/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 headerrequired
Parameters
- store_hash in path - string
Body
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.
idinteger
ID of the customer group.
Example: 1namestring
Name of the group.
Example: Wholesaleis_defaultboolean
Determines whether new customers are assigned to this group by default.
category_accessobject
discount_rulesarray[object]
A collection of discount rules that are automatically applied to customers who are members of the group.
date_createdstring
Date on which the customer group was created.
Example: 2023-07-17 06:30:41date_modifiedstring
Date on which the customer group was last modified.
Example: 2023-07-25 01:15:19is_group_for_guestsboolean
Describes whether the group is for guests. There can only be one customer group for guests at a time.
example
Response
Body
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.
idinteger
ID of the customer group.
Example: 1namestring
Name of the group.
Example: Wholesaleis_defaultboolean
Determines whether new customers are assigned to this group by default.
category_accessobject
discount_rulesarray[object]
A collection of discount rules that are automatically applied to customers who are members of the group.
date_createdstring
Date on which the customer group was created.
Example: 2023-07-17 06:30:41date_modifiedstring
Date on which the customer group was last modified.
Example: 2023-07-25 01:15:19is_group_for_guestsboolean
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 https://api.bigcommerce.com/stores/{store_hash}/v2/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 headerrequired
Parameters
- store_hash in path - string
example
Response
No content. Request was successful but produced no response.
Get a Count of Customer Groups
GET https://api.bigcommerce.com/stores/{store_hash}/v2/customer_groups/countRequest
Returns a count of all Customer Groups.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
example
Response
Body
countnumber
Example: 27