Tag/Attribute syncing methods

The Tag/Attribute  syncing API methods are used to update user tag or attribute data that can change outside the App. This is useful for keeping attributes like a users Balance, that may be used in campaign logic or campaign personalisation in sync when it changes out side the App  Available methods are:

  • Tag: Used to update a single tag or attribute when it changes
  • Tags: Used to update a batch of tags or attributes periodically

 

Tag

Used to to add a tag or update attribute when an event occurs or an attribute it changes outside your App for example "balance.updated", "user.balance", etc.

URL

api/external/hit/tag

Parameters

ParameterDescription
apptoken Your App token
ID Type 

An id used to identify the user here is the list of available id types:

  • device_id
  • device_external_id
  • device_token
  • device_idfa
  • device_adid

Used as follows; "device_external_id": "12345" 

tag The tag being hit for example "tag":"user.first_name", this is a required param.
value The value associated with this tag  example "value":"Sam", this is an optional param.
timestamp Timestamp in millis to associate with the occurrence of the event or attribute change , this is an optional param.
metric Used to set any associated metric.

Example

Set a users first name attribute:

curl -X POST -d '{ "apptoken": "YOUR_APPTOKEN","device_id":"20","tag":"user.first_name","value":"Sam"}' https://external-api.xtremepush.com//api/external/hit/tag

Tags

Used to to add a batch of tags or update a batch of attributes periodically after events have occurred or attributes have changed outside your App.

URL

api/external/hit/tags

Parameters

ParameterDescription
apptoken Your App token
tags

The array of tags/attributes to add/update, params for individual tag elements in array below 

ID Type 

An id used to identify the user here is the list of available id types:

  • device_id
  • device_external_id
  • device_token
  • device_idfa
  • device_adid

Used as follows; "device_external_id": "12345" 

tag The tag being hit for example "tag":"user.first_name", this is a required param.
value The value associated with this tag  example "value":"Sam", this is an optional param.
timestamp Timestamp in millis to associate with the occurrence of the event or attribute change , this is an optional param.
metric Used to set any associated metric.

Example

Update the balance attribute of a number of users:


curl -X POST -d '{ "apptoken": "YOUR_APPTOKEN","tags":[{"device_id":"20","tag":"user.balance","value":"500.0"},{"device_id":"21","tag":"user.balance","value":"550.0"}]}' https://external-api.xtremepush.com//api/external/hit/tags
Have more questions? Submit a request

0 Comments

Article is closed for comments.