PATCH /contacts/v1/attributeSets/{id}

Updates a collection of attribute value containers or the data rows of a specified attribute set by ID or name.

URL Parameters 

NameTypeDescription
idstringRequired. The ID of the attribute set expressed in the form of a GUID (UUID). Required if not using key or name.
namestringRequired. The name of the attribute set. Prefix the value with name:. Required if not using ID.

JSON Parameters 

NameTypeDescription
itemsarrayRequired. An array of values to insert into the attribute set.
items.valuesarrayRequired. Name and value pairs of attributes to insert into the attribute set.

Usage 

The call requires at least the ID, Key, or Name value in the request. If you provide more than one of these values, the call processes the first matching value in this order.

  1. ID
  2. Key
  3. Name
1Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
2PATCH /contacts/v1/attributeSets/abe05aca-2c17-e311-bb14-00237d5401ce
3Content-Type: application/json
4Authorization: Bearer YOUR_ACCESS_TOKEN
5
6{
7    "items": [{
8        "values": [
9            {
10                "name": "Customer Key",
11                "value": "sgest@example.com",
12            },
13            {
14                "name": "Order Number",
15                "value": "123456"
16            },
17            {
18                "name": "Order Total",
19                "value": "177.99"
20            }]
21        }
22    ]
23}

The response contains information about the updated data.

1200 (OK)
2Content-Type: application/json
3{
4    "operationStatus": "OK",
5    "rowsAffetcted": 1,
6    "rowResults": [
7        {
8        "dataOperationResult": "updated",
9        "itemIndex": 0,
10        "values": [{
11            "id": "abe05acb-2c17-e311-bb14-00237d5401ce",
12            "key": "Customer Key",
13            "name": "Customer Key",
14            "value": "sgest@example.com",
15
16        },
17        {
18            "id": "abe05acd-2c17-e311-bb14-00237d5401ce",
19            "key": "Order Number",
20            "name": "Order Number",
21            "value": "123456"
22        },
23        {
24            "id": "abe05ace-2c17-e311-bb14-00237d5401ce",
25            "key": "Order Total",
26            "name": "Order Total",
27            "value": "177.99"
28        }],
29        "resultMessages": []
30        }],
31    "Id": "abe05aca-2c17-e311-bb14-00237d5401ce",
32    "Key": "Retail Orders",
33    "Name:""Retail Orders",
34    "SchemaId": "36E001F0-6B8F-E311-A274-08EDB9DDEBF0",
35    "links": {"attributeSet": {"href": "/attributeSets/{id}"}},
36    "resultMessages": [],
37    "requestServiceMessageID": "8b51b524-28c1-46fc-9a44-02fca5b0a08c",
38    "serviceMessageID": "80676c59-ceb9-48aa-ad35-81e150094a17"
39}

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!