Use this API to upload user values for an individual taxonomy-entity {id} of type “ATTRIBUTE”. User values for an ATTRIBUTE can also be uploaded via the recommended POST /audience API detailed earlier. This is an alternative way of uploading a single attribute if you choose to do so. If you have special characters in your taxonomy ids, ensure that your HTTP client URL encodes the end point.

JSON Representation

A single record in the payload must be represented as the following JSON object

{ "urn" : "attribute-value" }

where the object key “urn” is the user identifier as per “urnType” specified in the metadata of the POST call, and object value “attribute-value” is this user’s value for attribute {id}. ResourceType for this representation is “datax-attribute”.

Representation Example – Upload YaScore attributes for users

A payload of three users with URNs 99ff2333, 07feb252 and f10d53af and attribute values 28, 32 and 44 respectively will look like the following prior to compression:

{ "99ff2333" : 28 }
{ "07feb252" : 32 }
{ "f10d53af" : 44 }

POST Call Example

Everything except the following is identical to the POST Call Example listed earlier for /audience:

  1. URI - POST /audience/attribute/YaScore

  2. Metadata response - “resourceType” : “datax-attribute”