Add properties to respondent

POST - Set or update

The Custom Data API is a feature included in

Premier and Enterprise plans.

The Custom Data API allows you to send custom data on specific custom user IDs and improve your campaign targetings.

Request structure

The users data endpoint allows you to set user data either for one user, or for multiple users.

Important Note:Any data changed by calling this API willnotbe available in real time: Processing time can be required.

Route

The custom data API exposes two POST endpoints:

  • /api/data/user for a single update

NOTE:YOUR_USER_IDis a custom id as described here

Single update:

curl -H 
"Content-Type: application/json"
 -H 
"Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6IjU5ZDczNTNiNjU0YzE5MDAxMWI1NDRmZSJ9.v1Q9KT8vtvPSJvWcXKKET2Bh7quxowauNL_iA61tGqo"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6IjU5ZDczNTNiNjU0YzE5MDAxMWI1NDRmZSJ9.v1Q9KT8vtvPSJvWcXKKET2Bh7quxowauNL_iA61tGqo"
 -X POST -d 
"@payload.json"
"https://vizirnotificationapi.herokuapp.com.api/data/user"

Headers

In order to authenticate with the API, you need to provide your company REST API Key as the value of theAuthorization Header.

"Authorization":"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6IjU5ZDczNTNiNjU0YzE5MDAxMWI1NDRmZSJ9.v1Q9KT8vtvPSJvWcXKKET2Bh7quxowauNL_iA61tGqo"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6IjU5ZDczNTNiNjU0YzE5MDAxMWI1NDRmZSJ9.v1Q9KT8vtvPSJvWcXKKET2Bh7quxowauNL_iA61tGqo

Post data

The body of the request must contain a valid JSON describing the update operations to execute for the user's custom data.

Here is a how a complete JSON payload looks like:

{
    "appID":"699115713490740",
    "respondentID":"1276358755731356",
    "attribute": {
        "first_name":"John",
        "last_name":"Doe"
    },
    "tag":{
        "favorite_brands": {
            "$add":["Nike"],
            "$remove":["Adidas"]
        }
    },
    "event":{
        "dollar_spent":{
            "$inc": 98
        },
        "buy_product":Date.now()
    }
}

Add properties to the application

/api/filter/application

with data, the same as for the previous one.

results matching ""

    No results matching ""