Customers V3
Get All Customers
GET https://api.bigcommerce.com/stores/{store_hash}/v3/customersRequest
Returns a list of Customers. Optional filter parameters can be passed in.
Notes
Attribute names are not available on the customer object.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- page in query - integerPage number (
page
will be ignored if you providebefore
orafter
in the request). For examplepage=1
. - limit in query - numberItems count per page.
limit=50
- id:in in query - array
Filter items by ID.
id:in=4,5,6
Type: array[integer] - company:in in query - arrayFilter items by company.
company:in=bigcommerce,commongood
Type: array[string] - customer_group_id:in in query - arrayFilter items by customer_group_id.
customer_group_id:in=5,6
Type: array[string] - date_created in query - stringFilter items by date created, for example,
2024-05-14T09:34:00
or2024-05-14
. - date_created:max in query - stringFilter items by maximum date created, for example,
2024-05-14T09:34:00
or2024-05-14
. Returns customers created before this date. - date_created:min in query - stringFilter items by date created for example,
2024-05-14T09:34:00
or2024-05-14
. Returns customers created after this date. - date_modified in query - stringFilter items by date modified, for example,
2024-05-14T09:34:00
or2024-05-14
. - date_modified:min in query - stringFilter items by minimum date modified, for example,
2024-05-14T09:34:00
or2024-05-14
. Returns customers modified after this date. - date_modified:max in query - stringFilter items by maximum date modified, for example,
2024-05-14T09:34:00
or2024-05-14
. Returns customers modified before this date. - email:in in query - arrayFilter items by email.
email:in=janedoe@example.com
Type: array[string] - name:in in query - arrayFilter items by first_name and last_name.
name=james moriarty
Type: array[string] - name:like in query - array
Filter items by substring in first_name and last_name.
name:like=moriarty,sherlock
Concatenates the first_name and last_name fields.Type: array[string] - phone:in in query - stringFilter items by phone number.
phone:in=555-55-5555
- registration_ip_address:in in query - array
Filter items by registration_ip_address. If the customer was created using the API, then registration address is blank.
registration_ip_address:in=12.345.6.789
Type: array[integer] - include in query - array
Indicates whether to include customer sub-resources:
addresses
- customer addresses
storecredit
- store credit
attributes
- customer attributes and address attributes
formfields
- customer and address form fields
shopper_profile_id
- the ID of the shopper profile associated with the customer (Beta)
segment_ids
- segments the customer belongs to (Beta)include=addresses,storecredit,attributes,formfields,shopper_profile_id,segment_ids
Type: array[string]Allowed: addresses | storecredit | attributes | formfields | shopper_profile_id | segment_ids
- sort in query - stringSort items by date_created, date_modified, or last_name:
date_created:asc
- date created, ascendingdate_created:desc
- date created, descendinglast_name:asc
- last name, ascendinglast_name:desc
- last name, descendingdate_modified:asc
- date modified, ascendingdate_modified:desc
- date modified, descending Example:sort=last_name:asc
Allowed: date_created:asc | date_created:desc | last_name:asc | last_name:desc | date_modified:asc | date_modified:desc
- after in query - stringThe cursor reference of the last entry for the previous page. Use the
end_cursor
value from the last response to get the next page (end_cursor
is only returned on the first page or when the request contains query parameterbefore
orafter
). For exampleafter=eyJpZCI6MjA0fQ
. - before in query - stringThe cursor reference of the first entry for the next page. Use the
start_cursor
value from the last response to get the previous page (start_cursor
is only returned on the first page or when the request contains query parameterbefore
orafter
). For examplebefore=eyJpZCI6MjA1fQ
.
example
Response
Body
dataarray[object]
example-1
Create Customers
POST https://api.bigcommerce.com/stores/{store_hash}/v3/customersRequest
Creates Customers. Create up to 10 customers in one call.
Required Fields
- last_name
- first_name
Required Fields Customer Address
- first_name
- city
- country_code
- last_name
- address1
Required Fields Attributes
- Attributes must be created BEFORE creating a customer.
- attribute_id
- attribute_value -- This is input as a string, regardless of the Type.
Notes
A customer can be created with global access or channel-specific access.
- Global access:
- Make sure the channel has
allow_global_logins
enabled. This is on by default only for the default storefront. Find more info at Customer Settings > Channel. - Omit
channel_ids
field, or providechannel_ids: null
.
- Make sure the channel has
- Channel-specific access:
- Provide a
channel_ids
array containing the channels accessible by the customer. This array cannot be empty.
- Provide a
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
Body
emailstring
requiredThe email of the customer. Must be unique.>= 3 characters<= 250 charactersfirst_namestring
requiredThe first name of the customer.>= 1 characters<= 100 characterslast_namestring
requiredThe last name of the customer.>= 1 characters<= 100 characterscompanystring
The company of the customer.>= 0 characters<= 255 charactersphonestring
The phone number of the customer.>= 0 characters<= 50 charactersnotesstring
The customer notes.tax_exempt_categorystring
The tax exempt category code for the customer.>= 0 characters<= 255 characterscustomer_group_idinteger
ID of the group which this customer belongs to.addressesarray[object]
Array of customer addresses. Limited to 10.attributesarray[object]
Array of customer attributes. Limited to 10.authenticationobject
accepts_product_review_abandoned_cart_emailsboolean
It determines if the customer is signed up to receive either product review or abandoned cart emails or receive both emails.store_credit_amountsarray[object]
Store credit.origin_channel_idinteger
Channel ID of the customer that has created the form.channel_idsarray[integer]
Array of channels the customer can access.Type: array[integer]Example: [1,2]form_fieldsarray[object]
Array of form fields. Controlled by formfields parameter.
trigger_account_created_notificationboolean
Indicates whether to send a customer registered welcome email.
example-1
Response
Body
dataarray[object]
example-1
Update Customers
PUT https://api.bigcommerce.com/stores/{store_hash}/v3/customersRequest
Updates Customers. Subresource updates are not supported.
Required Fields
- id -- ID of the Customer This must be included in the request body
Read Only Fields
- id
- registration_ip_address
- date_created
- date_modified
- origin_channel_id
Limits
- Limit of 10 customers per call.
- Limit of 3 concurrent requests
Notes
- Attributes Values can not be updated using Update a Customer. Use the Update customer attribute values endpoint.
- channel_ids -- Updating the list of channels a customer can access may create some side effects in a multi-storefront situation. This list determines which customer account we will use to authenticate a shopper given a channel.
- origin_channel_id -- This is an immutable value set as a reference to the channel of origin when a customer is created.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
Body
emailstring
The email of the customer. Must be unique.>= 3 characters<= 255 charactersfirst_namestring
The first name of the customer.>= 1 characters<= 100 characterslast_namestring
The last name of the customer.>= 1 characters<= 100 characterscompanystring
The company of the customer.>= 0 characters<= 255 charactersphonestring
The phone number of the customer.>= 0 characters<= 50 charactersregistration_ip_addressstring
The IP address from which this customer was registered.>= 0 characters<= 30 charactersnotesstring
The customer notes.tax_exempt_categorystring
The tax exempt category code for the customer.>= 0 characters<= 255 characterscustomer_group_idinteger
ID of the group which this customer belongs to.idinteger
requiredThe unique numeric ID of the customer.authenticationobject
accepts_product_review_abandoned_cart_emailsboolean
It determines if the customer is signed up to receive either product review or abandoned cart emails or receive both emails.store_credit_amountsarray[object]
Store credit.origin_channel_idinteger
Channel ID of the customer that has created the form.channel_idsarray[integer]
Arrays of channels the customer can access.form_fieldsarray[object]
Array of form fields. Controlled by formfields parameter.
example-1
example-2-form-fields
Response
Body
dataarray[object]
example-1
Delete Customers
DELETE https://api.bigcommerce.com/stores/{store_hash}/v3/customersRequest
Deletes Customers.
Required Query
- id:in -- ID of the customer
Notes
A query is required to delete customers. If not provided, a 204 is returned, with no changes to the data.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- id:in in query - arrayrequired
Filter items by ID.
id:in=4,5,6
Type: array[integer]
example
Response
See something you can improve? Edit this file on GitHub