Attribute Values
Get All Customer Attribute Values
GET https://api.bigcommerce.com/stores/{store_hash}/v3/customers/attribute-valuesRequest
Returns a list of Customer Attribute Values. 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
- Content-Type in header with default of application/json - string
- page in query - integerPage number.
page=1
- limit in query - numberItems count per page.
limit=50
- customer_id:in in query - arrayFilter items by the customer ID.
customer_id:in=23,24,55
Type: array[integer] - attribute_id:in in query - arrayFilter items by the attribute ID.
attribute_id:in=1,2
Type: array[integer] - name in query - stringFilter items by the attribute name.
name=age
- date_created in query - stringFilter items by
date_created
, for example,2024-05-14T09:34:00
,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
,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 - stringFilter 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 - stringFilter items by
date_modified
, for example,2024-05-14T09:34:00
or2024-05-14
. - date_modified:max in query - stringFilter 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 - stringFilter 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.
example
curl --request GET \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v3/customers/attribute-values' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'
Response
Body
object | application/json
Response payload for the BigCommerce API.
dataarray[object]
example
{
"data": [
{
"attribute_id": 0,
"attribute_value": "string",
"id": 0,
"customer_id": 0,
"date_modified": "2019-08-24T14:15:22Z",
"date_created": "2019-08-24T14:15:22Z"
}
],
"meta": {
"pagination": {
"total": 0,
"count": 0,
"per_page": 0,
"current_page": 0,
"total_pages": 0,
"links": {
"previous": "string",
"current": "string",
"next": "string"
}
}
}
}
Upsert Customer Attribute Values
PUT https://api.bigcommerce.com/stores/{store_hash}/v3/customers/attribute-valuesRequest
Upserts Customer Attribute Values. Updates the attribute values on the Customer. Multiple customer attribute values can be updated in one call.
Upsert checks for an existing record. If there is none, it creates the record, if there is a matching record, it updates that record.
Limits
- Limit of 10 customers per call.
- Limit of 3 concurrent requests.
Authentication
- X-Auth-Token in header
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
array | application/json
idinteger
Attribute value ID.attribute_idinteger
requiredAttribute ID.valuestring
required>= 0 characters<= 255 charactersAttribute value. This will always be a string, regardless of the attributeʼs type.
Corresponds to
attribute_value
used in customer attribute valuesGET
requests.Example: stringcustomer_idinteger
requiredCustomer ID.Example: 8504
Example
[
{
"attribute_id": 1,
"value": "No",
"customer_id": 2
}
]
Response
Body
object | application/json
Response payload for the BigCommerce API.
dataarray[object]
example
{
"data": [
{
"attribute_id": 0,
"attribute_value": "string",
"id": 0,
"customer_id": 0,
"date_modified": "2019-08-24T14:15:22Z",
"date_created": "2019-08-24T14:15:22Z"
}
],
"meta": {
"pagination": {
"total": 0,
"count": 0,
"per_page": 0,
"current_page": 0,
"total_pages": 0,
"links": {
"previous": "string",
"current": "string",
"next": "string"
}
}
}
}
Delete Customer Attribute Values
DELETE https://api.bigcommerce.com/stores/{store_hash}/v3/customers/attribute-valuesRequest
Deletes Customer Attribute Values. Deletes the attribute value from the customer.
Required Query
- id:in - ID of the Customer Attribute Value
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] - Accept in header with default of application/json - string
- Content-Type in header with default of application/json - string
example
curl --request DELETE \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v3/customers/attribute-values' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'
Response
Did you find what you were looking for?