For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • About Our APIs
  • REST
    • Overview
      • Overview
        • Abandoned Carts
        • Carts
        • Channels
        • Checkouts
        • Currencies
          • V3
              • GETList Customers
              • POSTCreate Customers
              • PUTUpdate Customers
              • DELDelete Customers
                • GETList Customer Attribute Values
                • PUTUpsert Customer Attribute Values
                • DELDelete Customer Attribute Values
          • V2
        • Customer Segmentation
        • Geography
        • Infrastructure Hosting
        • Inventory
        • Orders
        • Order Operations
        • Pickup
        • Pickup Methods
        • Pickup Options
        • Pricing
        • Price Lists
        • Promotions
        • Promotion Settings
        • Redirects
        • Scripts
        • Settings
        • Shipping
        • Sites
        • Subscribers
        • System Logs
        • Tax
        • Wishlists
      • Payments
  • GraphQL
    • Overview
  • MCP
    • Overview
Dev Portal
LogoLogo
RESTAdminManagementCustomersV3Attribute Values

Upsert Customer Attribute Values

PUT
https://api.bigcommerce.com/stores/:store_hash/v3/customers/attribute-values
PUT
/stores/:store_hash/v3/customers/attribute-values
$curl -X PUT https://api.bigcommerce.com/stores/store_hash/v3/customers/attribute-values \
> -H "X-Auth-Token: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '[
> {
> "attribute_id": 101,
> "value": "Yes",
> "customer_id": 2048
> },
> {
> "attribute_id": 102,
> "value": "Blue",
> "customer_id": 2048
> },
> {
> "attribute_id": 103,
> "value": "Premium Member",
> "customer_id": 2048
> }
>]'
1{
2 "data": [
3 {
4 "attribute_id": 101,
5 "attribute_value": "Yes",
6 "customer_id": 2048,
7 "id": 5001,
8 "date_modified": "2024-06-10T14:22:00Z",
9 "date_created": "2024-06-10T14:22:00Z"
10 },
11 {
12 "attribute_id": 102,
13 "attribute_value": "Blue",
14 "customer_id": 2048,
15 "id": 5002,
16 "date_modified": "2024-06-10T14:22:00Z",
17 "date_created": "2024-06-10T14:22:00Z"
18 },
19 {
20 "attribute_id": 103,
21 "attribute_value": "Premium Member",
22 "customer_id": 2048,
23 "id": 5003,
24 "date_modified": "2024-06-10T14:22:00Z",
25 "date_created": "2024-06-10T14:22:00Z"
26 }
27 ],
28 "meta": {
29 "pagination": {
30 "total": 3,
31 "count": 3,
32 "per_page": 10,
33 "current_page": 1,
34 "total_pages": 1,
35 "links": {
36 "previous": "",
37 "current": "https://api.bigcommerce.com/stores/store_hash/v3/customers/attribute-values?page=1",
38 "next": ""
39 }
40 }
41 }
42}
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.
Was this page helpful?
Previous

List Customer Attribute Values

Next

Delete Customer Attribute Values

Built with

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-Tokenstring
### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| | Customers | modify | `store_v2_customers` | | Customers | read-only | `store_v2_customers_read_only` | | Stored Payment Instruments | modify | `store_stored_payment_instruments` | | Stored Payment Instruments | read-only | `store_stored_payment_instruments_read_only` | ### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). | ### Further reading For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes). For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).

Path parameters

store_hashstringRequired
Permanent ID of the BigCommerce store.

Headers

AcceptstringOptionalDefaults to application/json

Request

attribute_idintegerRequired
Attribute ID.
valuestringRequired0-255 characters

Attribute value. This will always be a string, regardless of the attributeʼs type.

Corresponds to attribute_value used in customer attribute values GET requests.

customer_idintegerRequired
Customer ID.
idintegerOptional
Attribute value ID.

Response

datalist of objects
metaobject
Data about the response, including pagination and collection totals.

Errors

422
Unprocessable Entity Error

OAuth scopes

UI NamePermissionParameter
Customersmodifystore_v2_customers
Customersread-onlystore_v2_customers_read_only
Stored Payment Instrumentsmodifystore_stored_payment_instruments
Stored Payment Instrumentsread-onlystore_stored_payment_instruments_read_only

Authentication header

HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see our Guide to API Accounts.

Further reading

For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.

For more about BigCommerce OAuth scopes, see our Guide to API Accounts.

For a list of API status codes, see API Status Codes.