Players

Upsert Player

Register the player or update them, and set the pricing context of their store.

country and platform are the only inputs the personalized store and the order are priced with, so call this endpoint before reading the store for the first time and whenever the player changes their country or their device.

put/v1/players/{player_id}

Path parameters

player_idstring required

Request body

custom_attributesobject

The player's custom attributes.

namestring

The player's name.

avatar_urlstring

The player's avatar URL.

countrystring required

The two-letter country code (ISO 3166-1 alpha-2) of the player. It determines the price and the currency of the player's store.

platform'any' | 'ios' | 'android' | 'other'
emailstring email

The player's email address.

user_agentstring

The User-Agent string of the player's browser. It is only used to derive the device type promotions are targeted by.

Response

Successful Response

custom_attributesobject

The player's custom attributes.

idstring required

The unique identifier of the user.

player_idstring required

The unique player ID of the user.

loyalty_pointsinteger

The amount of loyalty points the player has.

Changes

Changed in 1 of the 28 revisions of this API.1