Attributes
Get All Customer Attributes
GET https://api.bigcommerce.com/stores/{store_hash}/v3/customers/attributesRequest
Returns a list of Customer Attributes. You can pass in optional filter parameters.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
- page in query - integer
Page number.
page=1
- limit in query - number
Items count per page.
limit=50
- name in query - string
Filter items by customer attribute name.
name=Date+Joined
- name:like in query - string
Filter items by substring in customer attribute name.
name:like=join
- type in query - string
The type of the customer attribute.
- date_created in query - string
Filter items by
date_created
, for example,2024-05-14T09:34:00
,2024-05-14T09:34:00
or2024-05-14
. - date_created:max in query - string
Filter items by maximum
date_created
, for example,2024-05-14T09:34:00
,2024-05-14T09:34:00
or2024-05-14
. ISO 8601 full-date is required, ISO 8601 full-time is not required. UNIX timestamp also accepted. Returns metafields created before this date. - date_created:min in query - string
Filter items by minimum
date_created
, for example,2024-05-14T09:34:00
,2024-05-14T09:34:00
or2024-05-14
. ISO 8601 full-date is required, ISO 8601 full-time is not required. UNIX timestamp also accepted. Returns metafields created after this date. - date_modified in query - string
Filter items by
date_modified
, for example,2024-05-14T09:34:00
or2024-05-14
. - date_modified:max in query - string
Filter items by maximum
date_modified
, for example,2024-05-14T09:34:00
or2024-05-14
. ISO 8601 full-date is required, ISO 8601 full-time is not required. UNIX timestamp also accepted. Returns metafields modified before this date. - date_modified:min in query - string
Filter items by minimum
date_modified
, for example,2024-05-14T09:34:00
or2024-05-14
. ISO 8601 full-date is required, ISO 8601 full-time is not required. UNIX timestamp also accepted. Returns metafields modified after this date. - Accept in header with default of application/json - string
- Content-Type in header with default of application/json - string
example
Response
Body
Response payload for the BigCommerce API.
dataarray[object]
response
Create a Customer Attribute
POST https://api.bigcommerce.com/stores/{store_hash}/v3/customers/attributesRequest
Creates a Customer Attribute. Multiple customer attributes can be created in one call.
Required Fields
- name
- type
Limits
- Limit of 3 concurrent requests.
Notes
Once the data type is set, it cannot be changed. The attribute will need to be deleted then created again with the new data type. This will also delete it from the customer.
Customer attributes are created separately from the customer. After the name and type are created, then the attributes can be added to the customer.
A store cannot have more than 50 customer attributes.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
- Accept in header with default of application/json - string
- Content-Type in header with default of application/json - string
Body
namestring
required>= 1 characters<= 255 charactersAttribute name.
typestring
requiredAttribute type should match one of: string, number, date.
Allowed: string | number | date
Example: string
example
Response
Body
Response payload for the BigCommerce API.
dataarray[object]
response
Update a Customer Attribute
PUT https://api.bigcommerce.com/stores/{store_hash}/v3/customers/attributesRequest
Updates a Customer Attribute. Multiple customer attributes can be updated in one call.
Required Fields
- id -- ID of the Customer Attribute
Once the data type is set, it can not be changed. The attribute will need to be deleted then created again with the new data type. This will also delete it from the customer.
Limits
- Limit of 3 concurrent requests.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
- Accept in header with default of application/json - string
- Content-Type in header with default of application/json - string
Body
namestring
required>= 1 characters<= 255 charactersAttribute name.
idinteger
requiredAttribute ID.
example
Response
Body
Response payload for the BigCommerce API.
dataarray[object]
response
Delete Customer Attributes
DELETE https://api.bigcommerce.com/stores/{store_hash}/v3/customers/attributesRequest
Deletes Customer Attributes from the store.
Required Query
- id:in -- ID of the Customer Attribute
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
- id:in in query - arrayrequired
Filter items by ID.
Type: array[integer] - Accept in header with default of application/json - string
- Content-Type in header with default of application/json - string