Models
On this page
- ChallengeUpdateMonitor
- UserBattlePassUpdateMonitor
- Configuration
- UserInfo
- Leaderboard
- LeaderboardInfo
- LeaderboardMemberRanking
- LeaderboardRanking
- LeaderboardScore
- LeaderboardUpdatePayload
- LeaderboardV2Results
- LeaderboardV2Info
- LeaderboardV2Changed
- LeaderboardV2MemberRanking
- LeaderboardV2MemberTypeRanking
- LeaderboardV2Member
- LeaderboardV2MemberMetadata
- LeaderboardV2UpdatePayload
- ActionResponse
- Challenge
- ChallengeCategory
- BattlePass
- BattlePassTranslation
- BattlePassLevel
- BattlePassLevelChallenge
- BattlePassLevelId
- EventPayload
- EventProperty
- EventDescription
- EventMetaData
- Error
- UnknownChallengeError
- SocketToken
- NotificationTopic
- AccessToken
- ForeignUserIdentifier
- ChallengeWebhookPayload
- BattlePassUnlockPayload
- BattlePassUnlockInfo
- BattlePassChallengeChangedPayload
- BattlePassChallengeState
- BattlePassLevelReward
- BattlePassLevelClaimedPayload
- BattlePassState
- LeaderboardV2Results_leaderboard_results_by_member_type
ChallengeUpdateMonitor
This object can be initialized using the SCILL
API entrypoint with startMonitorChallengeUpdates
. You also create
an instance of that class directly. It will immediately connect to our MQTT server and will call the callback function
whenever the state of users challenges change in the backend.
constructor
Please use the startMonitorChallengeUpdates
function of SCILL
. However, you may also use the class directly, however
while the SCILL
class is stable, this class might change.
new ChallengeUpdateMonitor(accessToken, handler);
Parameters
accessToken string
You need to provide an access token that you previously generated with the EventsApi. Please check out the documentation about access tokens for more info.
handler function
The callback function that is called whenever something changes in the backend for a user challenge. The callback function receives one parameter of type ChallengeWebhookPayload.
stop
Use this function to stop getting updates from the backend. Please make sure that you stop connections to the backend.
stop();
UserBattlePassUpdateMonitor
This object can be initialized using the SCILL
API entrypoint with startMonitorBattlePassUpdates
. You also create
an instance of that class directly. It will immediately connect to our MQTT server and will call the callback function
whenever the state of users challenges change in the backend.
constructor
Please use the startMonitorBattlePassUpdates
function of SCILL
. However, you may also use the class directly, however
while the SCILL
class is stable, this class might change.
new UserBattlePassUpdateMonitor(accessToken, battlePassId, handler);
Parameters
accessToken string
You need to provide an access token that you previously generated with the EventsApi. Please check out the documentation about access tokens for more info.
battlePassId function
The id of the battle pass that you want to listen for changes.
handler function
The callback function that is called whenever something changes in the backend for a users battle pass. The callback function receives one parameter of type BattlePassChallengeChangedPayload.
stop
Use this function to stop getting updates from the backend. Please make sure that you stop connections to the backend.
stop();
Configuration
The configuration object is being used to initiate an instance of an API class.
Parameters
accessToken string
The API key or access token to be used as authentication. More Info on this topic can be found in the Authentication documentation.
basePath string
The base path of the API service in the SCILL backend. You find the base paths in the API Reference. It’s not recommended to initiate API classes yourself. Use SCILLClient class to do that.
UserInfo
Can be any object that is attached to the user. You can set these values in the user service. For example you can provide a user name and an avatar image url.
Parameters
username string
The user name of the user
avatarImage string
The name or URL of an avatar image for a user.
Leaderboard
The Leaderboard object contains information about the leaderboard itself like the name and the id, but also contains actual rankings for users and teams.
Parameters
leaderboard_id string
The id of the leaderboard
name string
The name of the leaderboard
grouped_by_users LeaderboardRanking[]
An array of LeaderboardRanking Items for individual users
grouped_by_teams LeaderboardRanking[]
An array of LeaderboardRanking Items for teams. Provide a team_id in the event payload to also create leaderboards for teams
num_teams number
The total number of team rankings available in the leaderboard
num_users number
The total number of user rankings available in the leaderboard
LeaderboardInfo
The Leaderboard object contains information about the leaderboard itself like the name and the id
Parameters
app_id string
The id of the app
leaderboard_id string
The id of the leaderboard
name string
The name of the leaderboard
event_type string
The event type that triggers this leaderboard
sort_order_ascending boolean
True if this leaderboard sorts the score ascending or false if the ranking is defined by a descending score.
LeaderboardMemberRanking
You get these object if you query the leaderboard ranking for a specific user. Only the requested user will be returned.
Parameters
leaderboard_id string
The id of the leaderboard
name string
The name of the leaderboard
member LeaderboardRanking
LeaderboardRanking
The ranking for the user or team in the leaderboard
Parameters
member_id string
The id of the user - its the same user id you used to create the access token and the same user id you used to send the events
member_type string
Indicates what type this entry is, it’s either user or team
score number
The score achieved as an integer value. If you want to store floats, for example laptimes you need to convert them into an int before (i.e. multiply by 100 to get hundreds of seconds and format back to float in UI)
rank number
The position within the leaderboard
additional_info UserInfo
LeaderboardScore
Contains info about rank and score
Parameters
score number
The score achieved as an integer value. If you want to store floats, for example laptimes you need to convert them into an int before (i.e. multiply by 100 to get hundreds of seconds and format back to float in UI)
rank number
The position within the leaderboard
LeaderboardUpdatePayload
The payload used for realtime updates and webhooks if a leaderboard is updated.
Parameters
webhook_type string
The type of the webhook, in this case it is leaderboard-ranking-changed
leaderboard_data LeaderboardInfo
member_data LeaderboardRanking
old_leaderboard_ranking LeaderboardScore
new_leaderboard_ranking LeaderboardScore
LeaderboardV2Results
The Leaderboard object contains information about the leaderboard itself like the name and the id, but also contains actual rankings for users and teams.
Parameters
leaderboard_id string
The id of the leaderboard
leaderboard_name string
The name of the leaderboard
leaderboard_sort_order_ascending boolean
Determines the results sort order. If true, the order is ascending, otherwise, it’s descending.
leaderboard_results_by_member_type LeaderboardV2Results_leaderboard_results_by_member_type
LeaderboardV2Info
The Leaderboard object contains information about the leaderboard itself like the name and the id
Parameters
app_id string
The id of the app
leaderboard_id string
The id of the leaderboard
leaderboard_name string
The name of the leaderboard
event_type string
The event type that triggers this leaderboard
sort_order_ascending boolean
True if this leaderboard sorts the score ascending or false if the ranking is defined by a descending score.
LeaderboardV2Changed
This object is sent via Webhook or notifications of type leaderboard-changed.
Parameters
webhook_type string
The type of the notification. If you receive this payload, it’s most likely leaderboard-changed.
old_leaderboard LeaderboardV2Info
new_leaderboard LeaderboardV2Info
LeaderboardV2MemberRanking
The Leaderboard object contains information about the leaderboard itself like the name and the id
Parameters
leaderboard_id string
The id of the leaderboard
leaderboard_name string
The name of the leaderboard
leaderboard_sort_order_ascending boolean
Determines the results sort order. If true, the order is ascending, otherwise, it’s descending.
leaderboard_member LeaderboardV2Member[]
Returns the LeaderboardMember object containing user ranking information
LeaderboardV2MemberTypeRanking
You get this object if you query the leaderboard ranking for a specific user. Only the requested user will be returned.
Parameters
count number
The total number of members included in the results
members LeaderboardV2Member[]
An array of LeaderboardMember objects
LeaderboardV2Member
The ranking for the user or team in the leaderboard
Parameters
member_id string
The id of the user - its the same user id you used to create the access token and the same user id you used to send the events
member_type string
Indicates what type this entry is, it’s either user or team
score number
The score achieved as an integer value. If you want to store floats, for example laptimes you need to convert them into an int before (i.e. multiply by 100 to get hundreds of seconds and format back to float in UI)
rank number
The position within the leaderboard
metadata_results LeaderboardV2MemberMetadata[]
Returns an array of the LeaderboardMemberMetadata objects containing user ranking metadata information
additional_info UserInfo
LeaderboardV2MemberMetadata
The object containing secondary metadata ranking information, useful for tied scores on the main tracking parameter
Parameters
key string
The event type key used for ranking
ranked boolean
Determines if the user is ranked for that event type key. If false, no score and rank will be provided
score number
The score achieved as an integer value. If you want to store floats, for example laptimes you need to convert them into an int before (i.e. multiply by 100 to get hundreds of seconds and format back to float in UI)
rank number
The position within the leaderboard
LeaderboardV2UpdatePayload
The payload used for realtime updates and webhooks if a leaderboard is updated.
Parameters
webhook_type string
The type of the webhook, in this case it is leaderboard-ranking-changed
leaderboard_data LeaderboardV2Info
member_data LeaderboardV2Member
old_leaderboard_ranking LeaderboardScore
new_leaderboard_ranking LeaderboardScore
ActionResponse
Standard response for actions like update or delete. If anything went fine, you’ll receive a HTTP code of 200 and a OK message.
Parameters
status number
HTTP status code
message string
challenge Challenge
Challenge
The challenge object holds all information about a users challenge. It contains information like the duration, the type, progress states like counter and the goal and various other info.
Parameters
challenge_id string
The unique id of this challenge. Every challenge is linked to a product.
challenge_name string
The name of the challenge in the language set by the language parameter.
challenge_description string
An optional multi-language description that can be set in the Admin Panel. Used to describe exactly what the user has to do.
challenge_duration_time number
The duration of the challenge in seconds. Challenges auto lock after time-out and need to be unlocked again.
live_date string
The date this challenge should start. Use that field to create challenges that start in the future.
challenge_goal number
Indicates how many “tasks” must be completed or done to complete this challenge.
user_challenge_current_score number
Indicates how many tasks the user already has completed. Use this in combination with challenge_goal to render a nice progress bar.
challenge_icon string
In the admin panel you can set a string representing an image. This can be a URL, but it can also be an image or texture that you have in your games asset database.
challenge_icon_hd string
This is the HD variant of the challenge icon image. If you have a game, that runs on multiple platforms that could come in handy. Otherwise just leave blank.
challenge_price number
If you purchase the challenge, you can set a price.
challenge_reward string
Set a reward for this challenge. This is a string value that you can map to anything in your code. Use in combination with challenge_reward_type.
challenge_reward_type string
The reward type can be set to various different settings. Use it to implement different reward types on your side and use challenge_reward to set the value or amount of this reward.
challenge_goal_condition number
With this you can set the way how the SCILL system approaches the challenges state. 0 means, that the counter of the challenge must be brought above the goal. If this is 1, then the counter must be kept below the goal. This is often useful for challenges that include times, like: Manage the level in under 50 seconds.
challenge_xp number
If you have experience, player rankings whatever, you can use this field to set the gain in that when this challenge is rewarded.
repeatable boolean
If this challenge can be only activated once per user this will be false. Otherwise this challenge will always be added to list of available challenges (see personal or alliance challenges).
type string
Indicates the status of the challenge. This can be one of the following unlock: Challenge does not track anything. in-progress: Challenge is active and tracking. overtime: User did not manage to finish the challenge in time. unclaimed: The challenge has been completed but the reward has not yet been claimed. finished: The challenge has been successfully be completed and the reward has been claimed
challenge_auto_activated boolean
Indicates if the challenges lifecycle is handled automatically by the SCILL backend. Use this flag to decide when to show action buttons for unlocking, activating, claiming or canceling challenges. Hide the buttons if this flag is true, and let the user manage challenges manually if this flag is false.
is_claimed boolean
If the challenge reward has been claimed this is true otherwise its false.
user_challenge_unlocked_at string
This is the timestamp the challenge has been unlocked.
user_challenge_activated_at string
This is the timestamp the challenge has been activated.
user_challenge_is_claimed boolean
Indicates if this challenge has been claimed.
user_challenge_status number
Gives indication in what state the challenge is.
ChallengeCategory
Challenges are grouped into categories. You can exclude or include categories in queries. Per default all categories will be returned.
Parameters
is_daily_category boolean
Indicates if this is the daily category, bringing up new challenges every day for the user to tackle.
category_position number
In the admin panel you set the order of the categories. This is the position index and indicates the position within the categories array.
category_slug string
A short name without special chars to make it easier to refer to a specific category (in code) that is language and id agnostic.
category_name string
The name of the category in the local language set as the query parameter.
category_id string
Indicates how many “tasks” must be completed or done to complete this challenge.
challenges Challenge[]
An array of Challenge objects.
BattlePass
A Battle Pass is a structured layer above challenges and handles the lifecycle of challenges based on a level system. Users need to fullfil challenges to unlock the next level. Each level can have a reward that you can specify in the BattlePassLevel structure. Battle Passes need to be unlocked before they start tracking progress.
Parameters
battle_pass_id string
The unique id of this battle pass.
app_id string
The unique id of the app
battle_pass_name string
The name of the battle bass. You can set that in the Admin Panel. The language is set with the query parameter language. See documentation for more info on that.
battle_pass_description string
The description of the battle bass. You can set that in the Admin Panel and it can also be HTML. The language is set with the query parameter language. See documentation for more info on that.
battle_pass_short_description string
A short description of the battle bass. You can set that in the Admin Panel and it can also be HTML. The language is set with the query parameter language. See documentation for more info on that.
battle_pass_disclaimer string
Use this to provide some terms and conditions following along this battle passes purchase.
battle_pass_priority number
The priority of the battle pass. I.e. if multiple are available you can use this field to sort them.
package_sku_ios string
If you want to sell Battle Passes you can use this field to trigger in-app purchase products within your mobile app. You can set this value in the Admin Panel. This one is for iOS.
package_sku_android string
If you want to sell Battle Passes you can use this field to trigger in-app purchase products within your mobile app. You can set this value in the Admin Panel. Use this to set the package string for Android.
image_xs string
The xs sized image name or url. You can determine the best size distribution yourself and depends on your application or UI
image_s string
The s sized image name or url. You can determine the best size distribution yourself and depends on your application or UI
image_m string
The m sized image name or url. You can determine the best size distribution yourself and depends on your application or UI
image_l string
The l sized image name or url. You can determine the best size distribution yourself and depends on your application or UI
image_xl string
The xl sized image name or url. You can determine the best size distribution yourself and depends on your application or UI
start_date string
The date (in iso format) when the Battle Pass starts. Tracking begins once this date is passed.
end_date string
The date (in iso format) when the Battle Pass ends. Tracking stops once the end is reached and users will not be able to progress further than what they have achieved up to that point.
read_more_link string
If the Battle Pass costs “money” you may want to route the user to a web site/page, where they can learn more about this battle pass. You can also use this field to route the user inside your application by providing a path or whatever works for you.
is_unlocked_incrementally boolean
Indicates if one level after the other must be activated or if users can activate whichever level they want. Typically battle passes are unlocked level by level, but if battle passes are used for other applications (like user referal programs) it can be useful to set this to false.
is_active boolean
Indicated if this battle pass is active.
unlocked_at string
The date in iso format when the user unlocked this Battle Pass.
can_purchase_with_money boolean
Indicates that this Battle Pass can be purchased via in-app purchase. This can be set in the Admin Panel.
can_purchase_with_coins boolean
Indicates that this Battle Pass can be purchased with SCILL Coins. This can be set in the Admin Panel.
BattlePassTranslation
Parameters
language_id string
The id of the language
name string
The name of the Battle Pass in the local language set in the request (see Setting Language). In the admin panel you can either create HTML content or plain text.
description string
The description of the Battle Pass in the local language set in the request (see Setting Language). In the admin panel you can either create HTML content or plain text.
short_description string
A short description in the local language you can use to teaser battle passes or implement “expand for more” functionality.
disclaimer string
Use this to provide some terms and conditions following along this battle passes purchase.
BattlePassLevel
Battle Passes are grouped into levels that contain challenges that must be achieved to unlock the next level. Only challenges for the current level are tracking progress.
Parameters
level_id string
Unique id of this BattlePassLevel object.
app_id string
The app id
battle_pass_id string
The id of the battle pass this level belongs to
reward_amount string
In the Admin Panel you can set different types of rewards. You can also set an identifier of an in-game-item or anything you like. Use this to include the reward into your own business logic.
reward_type_name string
There are different types of rewards available. Possible values are Coins, Voucher, Money and Experience. This is deprecated in favor of level_reward_type which uses a slug instead of a human readable expression
level_reward_type string
The reward type in a machine readable slug. Available values are nothing, coin, experience, item
level_completed boolean
Indicates if this level is completed, i.e. all challenges have been completed.
level_priority number
Indicates the position of the level.
reward_claimed boolean
Indicates if this level has already be claimed.
activated_at string
The date when this level has been activated or null if it’s not activated.
challenges BattlePassLevelChallenge[]
An array of BattlePassLevelChallenge objects. Please note, not all values are available from the challenge object, as battle passes handle the lifecycle of challenges.
BattlePassLevelChallenge
Each level in battle passes contains one or more challenges that need to be fullfilled to unlock the next level. This structure holds challenge information and is based on the Challenge structure. However, as Battle Passes manage the lifecycle of challenges, this data structure is a bit simpler. The same principles apply mostly as for the personal challenges, i.e. you can share the exact same UI to render personal challenges and battle pass challenges.
Parameters
challenge_id string
The unique id of this challenge. Every challenge is linked to a product.
challenge_name string
The name of the challenge in the language set by the language parameter.
challenge_goal number
Indicates how many “tasks” must be completed or done to complete this challenge.
challenge_goal_condition number
With this you can set the way how the SCILL system approaches the challenges state. 0 means, that the counter of the challenge must be brought above the goal. If this is 1, then the counter must be kept below the goal. This is often useful for challenges that include times, like: Manage the level in under 50 seconds.
user_challenge_current_score number
Indicates how many tasks the user already has completed. Use this in combination with challenge_goal to render a nice progress bar.
challenge_xp number
If you have experience, player rankings whatever, you can use this field to set the gain in that when this challenge is rewarded.
challenge_icon string
In the admin panel you can set a string representing an image. This can be a URL, but it can also be an image or texture that you have in your games asset database.
challenge_icon_hd string
This is the HD variant of the challenge icon image. If you have a game, that runs on multiple platforms that could come in handy. Otherwise just leave blank.
type string
Indicates the status of the challenge. This can be one of the following unlock: Challenge does not track anything. in-progress: Challenge is active and tracking. overtime: User did not manage to finish the challenge in time. unclaimed: The challenge has been completed but the reward has not yet been claimed. finished: The challenge has been successfully be completed and the reward has been claimed
BattlePassLevelId
Used in previous versions of the battle pass system to provide the level_id via payload. We changed routes in newer versions to have level id in the path.
Parameters
battle_pass_level_id string
The level id, i.e. battle_pass_level_id of the BattlePassLevel object
EventPayload
Events are the engine and driver for challenges, battle passes and leaderboards within the SCILL ecosystem. They are a simple, yet powerful data structure. The idea is, that you just send events for actions and things that happen in your game or application. SCILL leverages these info to update and progress challenges or to figure out the users score within a leaderboard. You don’t have to handle any state in your application or game, as everything is done by SCILL.
Parameters
user_id string
This is your user id. You can set this to whatever you like, either your real user id or an obfuscated user id. However you need to be consistent here. Events linked to this user id only track if challenges or battle passes are unlocked with the same user id.
session_id string
This is required if event_type is single and identifies a session. This can be anything used to group events together. For example this can be a level or a match id.
event_name string
This is the event type as a string. These have predefined event names for many games and applications. It’s wise to use those as this allows us to analyse data and help you balancing your application or game.
event_type string
This is either single or group. You can send multiple events in one request (group) or send events in sequence. Please note, that depending on your tier you might run into rate limits.
meta_data EventMetaData
team_id string
Provide an optional team id that will be used in leaderboards to group results of teams.
EventProperty
This object holds information about a proporty of an event. Events have required and optional properties.
Parameters
property_name string
The name of the property. Is the field value in the event payloads meta_data.
property_type string
The type of the property. Can be number or string.
EventDescription
Describes an available event structure
Parameters
event_name string
The name of the event, i.e kill-enemy. This will be used in the EventPayload as event_name.
required_properties EventProperty[]
A list of required properties - properties that must be set
optional_properties EventProperty[]
A list of optional properties
EventMetaData
This holds metadata and is specific to each event type. Please have a look at the documentation to learn which properties need to be set for the event-type you want to send.
Parameters
action_object string
The object that is the source of the action
action_subject string
The object that is the target of the action
action_type string
The name of the action
ammo_used number
Number of ammonition used
amount number
A general indicator for number of items (i.e. number of kills in kill-enemy event)
amount_gained number
The number of ammonition gained
amount_given number
The number of amminition given
animal_name string
The name of an animal
armor number
The “health” state of the armor
away_team_id string
The id of the opponent team
away_score number
The score of the opponent team
battle_status number
An integer value indicating the battle status (map it to an enum for example in your code)
bounty_name string
The name of the bounty
building_id string
The id or name of a building
building_level number
The level of the building
card_type string
The name of the card
character_name string
The name of a character
checkpoint_id string
The id/name of a checkpint
coordinate_x number
The x coordinate in your coordinate system, used for example to store position on a map
coordinate_y number
The y coordinate in your coordinate system, used for example to store position on a map
crew_name string
The name of a crew
damage_amount number
The amount of damage
distance number
The distance measured in any coordinate system of your choice. Please note: This is an integer field. If you need more precision multiple your floating point value with 1000 or so to keep the precision but storing it as an integer value
duration number
The duration in any unit you like
effect_id string
The effect id or name
enemy_character string
The character type or name of an enemy
enemy_type string
The type of an enemy
event_type string
The event type
fuel_consumed number
The number of fuel consumed
health number
The health
hit_type string
The type of a hit (i.e. head, torso, leg)
home_team_id string
The id or name of your or the home team
home_score number
The score of your or the home team
item_id string
The id of an item
item_name string
The name of an item
item_type string
The type of an item
kill_type string
The type of a kill
lap_position number
The position in a lap
level_id string
The id of the level
map_name string
The name of a map
map_section_name string
The name of a section of a map
mission_id string
The mission id
player_character string
The name of the player character
puzzle_id number
The id of a puzzle
race_position number
The position within a race
realm string
The realm
required_time number
The time required involed in this event. I.e. in a reach-checkpoint event this could be the time in seconds required to reach that checkpoint from the last checkpoint.
resource_gained string
The name/id of the resource gained
resource_given string
The name/id of the resource given (to someone else)
resource_name string
The name of the resource
round_id number
The id of the round
round_type string
The type of the round
score number
The score
stat_type string
The type of the stats item
time_condition string
The timing condition
transport_id string
The id of the transport
type string
The name/id of a type
unit_type string
The name/id of a unit type
upgrade_type string
The name of the upgrade
weapon_action string
The action taken on a weapon (i.e. infrared-activated)
weapon_id string
The id of the weapon
weapon_type string
The type of the weapon
weapon_used string
The name/id of a weapon used in a kill or similar event
zone_name string
The name of the zone
Error
Errors are reported using this structure. Error messages are human readable and will be translated (if available) in the language provided by the language query parameter.
Parameters
code string
message string
UnknownChallengeError
Parameters
error string
The error message
error_slug string
Machine readable error message
status_code number
HTTP status code of this error message'
SocketToken
Parameters
socket_token string
NotificationTopic
Realtime updates are implemented via MQTT - a resource efficient real time message system. Each user has it’s own channel in our MQTT system that you need to request from the backend. This structure returns the topic for the user provided with the access token.
Parameters
topic string
AccessToken
As SCILL does not know anything about the users an access token is required to handle authentication. Requesting an access token in the backend returns this object that contains the token which needs to be set as the Authentication Bearer in subsequent requests to the SCILL backend.
Parameters
token string
ForeignUserIdentifier
Requesting an access token requires this object to be sent containing the user id of your user. The user id can be anything (we dont care) but it must be consistent for the lifetime of the user.
Parameters
user_id string
Any string allowed, this is the foreign user identifier that has no relation in the SCILL database and the user is unkown to SCILL.
ChallengeWebhookPayload
The payload sent to the users webhook.
Parameters
webhook_type string
The type of the webhook. Depending on the module, there are different webhook types indicating different events. Check the reference documentation to see all types.
category_position number
The index of the category this challenge is linked to. When you request personal challenges, you get an array of categories which contain an array of challenges in their challenges property. This value indicates in which category this challenge can be found. Speeds up updating UI as you don’t need to iterate through all catagories and challenges to find the challenge.
user_token string
The access token for the user of that challenge. You can use that user_token to directly send another event and therefore to chain different SCILL pieces together. For example you can send another event driving another challenge or battle pass whenever a user has completed a challenge.
new_challenge Challenge
old_challenge Challenge
BattlePassUnlockPayload
Unlocking a battle pass requires some info to be sent so we can validate everything is ok
Parameters
purchase_price number
The purchase price. Set to 0 if this was free. The idea behind this is to provide information via an Admin Panel on average purchase price and to also allow showing users purchase info in their user account.
purchase_currency string
The currency (EUR, USD, etc) of the purchase price
BattlePassUnlockInfo
Parameters
purchase_id string
The id of this battle pass purchase
battle_pass_id string
The battle pass id
user_id string
The user id of this battle pass purchase
purchase_price number
The price paid for this battle pass
purchase_currency string
The currency used to purchase this battle pass
purchased_at string
The date this battle pass has been purchased
battle_pass_completed boolean
Indicates if this battle pass has been completed
BattlePassChallengeChangedPayload
This payload is sent in Webhooks and notifications as part of the battlepass-challenge-changed notification. The idea is to provide enough information to quickly update UI or implementing backend logic. We provide both the state of the object before it changed, and after that. This allows you to react in many different ways.
Parameters
webhook_type string
The type of the notification. If you receive this payload, it’s most likely battlepass-challenge-changed
old_battle_pass_challenge BattlePassChallengeState
new_battle_pass_challenge BattlePassChallengeState
BattlePassChallengeState
This object stores information about a battle pass challenge state. It is designed to update challenges loaded previously with the getBattlePassLevels API. Indices allow you to quickly update locally stored Challenge objects without iterating or reloading data.
Parameters
app_id string
The unique id of the app
battle_pass_id string
The unique id of this battle pass.
level_id string
Unique id of this BattlePassLevel object.
user_id string
This is your user id. You can set this to whatever you like, either your real user id or an obfuscated user id. However you need to be consistent here. Events linked to this user id only track if challenges or battle passes are unlocked with the same user id.
level_position_index number
Typical usage pattern is to load battle pass levels with getBattlePassLevels operation and store them for rendering. Using this value you can quickly identify the index of the level that changed.
challenge_id string
The unique id of this challenge. Every challenge is linked to a product.
challenge_position_index number
Same as level_position_index. Use this index to identify the challenge that changed within the levels challenges array. Typical usage pattern is to update the previously stored score and type.
challenge_goal number
Indicates how many “tasks” must be completed or done to complete this challenge.
user_challenge_current_score number
Indicates how many tasks the user already has completed. Use this in combination with challenge_goal to render a nice progress bar.
type string
Indicates the status of the challenge. This can be one of the following unlock: Challenge does not track anything. in-progress: Challenge is active and tracking. overtime: User did not manage to finish the challenge in time. unclaimed: The challenge has been completed but the reward has not yet been claimed. finished: The challenge has been successfully be completed and the reward has been claimed
BattlePassLevelReward
This objects holds information about a battle pass reward
Parameters
app_id string
The unique id of the app
battle_pass_id string
The unique id of this battle pass.
level_id string
Unique id of this BattlePassLevel object.
user_id string
This is your user id. You can set this to whatever you like, either your real user id or an obfuscated user id. However you need to be consistent here. Events linked to this user id only track if challenges or battle passes are unlocked with the same user id.
level_position_index number
Typical usage pattern is to load battle pass levels with getBattlePassLevels operation and store them for rendering. Using this value you can quickly identify the index of the level that changed.
reward_amount string
In the Admin Panel you can set different types of rewards. You can also set an identifier of an in-game-item or anything you like. Use this to include the reward into your own business logic.
reward_type_name string
There are different types of rewards available. Possible values are Coins, Voucher, Money and Experience.
BattlePassLevelClaimedPayload
Payload sent via Webhook or realtime notifications whenever a usrs level reward has been claimed. Use this payload to unlock the item for the specified user.
Parameters
webhook_type string
The type of the notification. If you receive this payload, it’s most likely battlepass-level-reward-claimed
battle_pass_level_reward_claimed BattlePassLevelReward
BattlePassState
This object holds some basic info about lifetime of a battle pass and is used in expired notifications.
Parameters
battle_pass_id string
The unique id of this battle pass.
app_id string
The unique id of the app
battle_pass_priority number
The priority of the battle pass. I.e. if multiple are available you can use this field to sort them.
start_date string
The date (in iso format) when the Battle Pass starts. Tracking begins once this date is passed.
end_date string
The date (in iso format) when the Battle Pass ends. Tracking stops once the end is reached and users will not be able to progress further than what they have achieved up to that point.
is_active boolean
Indicated if this battle pass is active.
LeaderboardV2Results_leaderboard_results_by_member_type
This object uses two keys - “user” and “team”, both of which contain ranking info