PUT
/
partner
/
tags
curl https://api.thanxsandbox.com/partner/tags \
  -X PUT \
  $AUTH_HEADERS
  -d '{
    "merchant_id": "weroifs",
    "user_ids": [
      "wroeiu2304hfwf",
      "73bf1f46769dwr"
    ],
    "key": "allergens",
    "values": [
      "gluten",
      "soy",
      "dairy",
      "honey"
    ]
  }'
{}
Scope required: tags.write
This endpoint allows for bulk upserting of tag values for specified users. If a tag with the specified key does not exist for the user / merchant pair, a new tag record is created with the specified values. If a tag with the specified key already exists, the tag values are updated. A maximum of 500 user_ids can be specified per API request. Currently, tags are merchant/user-scoped. This means that they are accessible to be managed by all integration partners a given merchant enables. Given this, for tags that are integration-specific and not general purpose user profile attributes, we recommend integration partners prefix tag keys with the name of your organization to avoid key usage conflicts between integrations enabled for a given merchant. eg:
  • thanx-custom-tag, rather than custom-tag, would be preferred for tags that are integration specific
  • allergens should still be used, if it’s expected that the tag be leveraged as a general-purpose user profile attribute

Parameters

merchant_id
string
Merchant ID
user_ids
string
User IDs (500 max per request)
key
string
Tag key
values
array(string)
Array of tag values (50 max)

Response

curl https://api.thanxsandbox.com/partner/tags \
  -X PUT \
  $AUTH_HEADERS
  -d '{
    "merchant_id": "weroifs",
    "user_ids": [
      "wroeiu2304hfwf",
      "73bf1f46769dwr"
    ],
    "key": "allergens",
    "values": [
      "gluten",
      "soy",
      "dairy",
      "honey"
    ]
  }'
{}