Skip to content

Object tags

Tag attributes allow you to match Treezor objects with objects stored in your own databases. These attributes are:

  • Strings (max 250 characters)
  • Always in the API's responses
  • Named as a concatenation of the object's class and the word "Tag" (camelCase)

Here are a few examples of tag attributes: userTag, cardTag, payinTag, walletTag.

Thumbs icon

Best practice – Tags must:

  • Be unique. Tagging convention must avoid tag collisions.
  • Use alphanumeric characters plus / ! - _ . * ' ( ). Using other characters can have unexpected consequences.

Tag examples

User Tag

When creating a User object, the associated tag is the userTag. Let's take the following request to create a user:

bash
curl -X POST {baseUrl}/users \
	--header 'Authorization: Bearer {accessToken}' \
	--header 'Content-Type: application/json' \
	-d '{payload}'

You can insert the corresponding userTag in the {payload}:

json
{
    "userTypeId": 1,
	"userTag": "6050c342b8e240.82964",
    "specifiedUSPerson": 0,
    "firstname": "Alex",
    "lastname": "Oak",
    "birthday": "1982-05-31",
    "placeOfBirth": "Edgewood",
    "birthCountry": "FR",
    "nationality": "FR",
    "email": "alex.oak@example.com"
}

The userTag is then included in the returned User object.

Wallet Tag

When creating a Wallet object, the associated tag is the walletTag. Let's take the following request to create a wallet:

bash
curl -X POST {baseUrl}/wallets \
	--header 'Authorization: Bearer {accessToken}' \
	--header 'Content-Type: application/json' \
	-d '{payload}'

You can insert the corresponding walletTag in the {payload}:

json
{
    "walletTypeId":10,
	"walletTag": "6050c342b8e240.82964",
	"tariffId": 1234,
	"userId": 123456,
	"currency": "EUR",
	"eventName": "My Wallet Name"
}

The walletTag is then included in the returned Wallet object.