Purchases
Update Purchase Tags
Purchases
Update Purchase Tags
This endpoint updates an attribute tag for the given purchase. The tag associated with the key in the request will be created or updated with the values passed in.
PUT
/purchases/:id/tags
Bearer*
curl --request PUT \
--url https://api.thanx.com/purchases/:id/tags \
--header 'Authorization: Bearer <token>' \
--data '{
"key": "<key>",
"values": "<values>"
}'
Parameters
purchase_idrequired
string
The id of the purchase
keyrequired
string
Tag key
valuesrequired
array(string)
Array of attributes tags
Response
id
string
The ID of the tier status record
purchase_id
string
Purchase ID
key
string
Tag key
values
array(string)
Array of attribute tags
curl https://api.thanxsandbox.com/purchases/wourhfiwer/tags \
-X PUT \
$STANDARD_HEADERS
-d '{
"tag": {
"key": "server_satisfaction",
"values": [
"10"
]
}
}'
{
"tag": {
"id": "werwerr",
"purchase_id": "wourhfiwer",
"key": "server_satisfaction",
"values": [
"10"
]
}
}
curl https://api.thanxsandbox.com/purchases/wourhfiwer/tags \
-X PUT \
$STANDARD_HEADERS
-d '{
"tag": {
"key": "server_satisfaction",
"values": [
"10"
]
}
}'
{
"tag": {
"id": "werwerr",
"purchase_id": "wourhfiwer",
"key": "server_satisfaction",
"values": [
"10"
]
}
}