Models

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.

ActionResponse

Parameters

status number

HTTP status code

message string

BattlePass

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. If left empty, the end date will be exactly one month after the start date.

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.

BattlePassLevel

Parameters

battle_pass_id string

The unique id of this battle pass.

app_id string

The unique id of the app

is_active boolean

Set if this level is active or not

reward_type_id string

The id of the reward type

reward_amount string

The reward amount as a string. Provide anything you like and that makes sense for your application

challenges BattlePassLevelChallenge[]

An array of BattlePassLevelChallenge objects.

BattlePassLevelChallenge

Parameters

challenge_id string

The id of the challenge

BattlePassChallenge

Parameters

app_id string

The unique id of the app

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.

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_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

challange_xp number

The experience points for this challenge. This is just a value you can set and make any use in your app

required_metadata_values string

An internal flag that will be used to decide when this challenge should be triggered

generic_metadata GenericMetaData[]

BattlePassLevelId

Parameters

battle_pass_level_id string

The level id, i.e. battle_pass_level_id of the BattlePassLevel object

Leaderboard

Parameters

leaderboard_id string

The unique id of the leaderboard

name string

The name of the leaderboard

app_id string

The unique id of the app this leaderboard belong to

event_type string

The name of the event type that this leaderboard responds to

start_date string

The date (in ISO format) when the leaderboard starts. Tracking begins once this datetime has been reached.

end_date string

The date (in ISO format) when the leaderboard ends. Tracking stops once the end date is reached, unless the leaderboard is repeatable, in which case this field is irrelevant

active boolean

Set if this leaderboard is active or not

sort_order_ascending boolean

Set if you want an asecending sort order; if false, the order is descending

sorting_metadata_list SortingMetaDataList[]

generic_metadata GenericMetaDataCreate[]

repeatable_leaderboard boolean

Set if this leaderboard is to be reset at regular intervals, e.g. daily, weekly, or monthly

reset_period_range string

The interval, “d” for day, “w” for week, or “m” for month, after which the leaderboard resets

reset_period_range_number number

The duration of days (“d”), weeks (“w”), or months (“m”) after which the leaderboard resets; this field with a value of 12, in combination with the range value of “d”, means that the leaderboard wil lreset itself every 12 days

reset_period_range_at_time string

The time (HH:mm:ss) when the leaderboard resets. Valid only for a specific timezone.

reset_period_range_time_zone string

The date (TZ database format) when the leaderboard resets. Referrs to the reset period range.

LeaderboardCreate

Parameters

name string

The name of the leaderboard

app_id string

The unique id of the app this leaderboard belong to

event_type string

The name of the event type that this leaderboard responds to

start_date string

The date (in ISO format) when the leaderboard starts. Tracking begins once this datetime has been reached.

end_date string

The date (in ISO format) when the leaderboard ends. Tracking stops once the end date is reached, unless the leaderboard is repeatable, in which case this field is irrelevant

active boolean

Set if this leaderboard is active or not

sort_order_ascending boolean

Set if you want an asecending sort order; if false, the order is descending

sorting_metadata_list SortingMetaDataList[]

generic_metadata GenericMetaDataCreate[]

repeatable_leaderboard boolean

Set if this leaderboard is to be reset at regular intervals, e.g. daily, weekly, or monthly

reset_period_range string

The interval, “d” for day, “w” for week, or “m” for month, after which the leaderboard resets

reset_period_range_number number

The duration of days (“d”), weeks (“w”), or months (“m”) after which the leaderboard resets; this field with a value of 12, in combination with the range value of “d”, means that the leaderboard wil lreset itself every 12 days

reset_period_range_at_time string

The time (HH:mm:ss) when the leaderboard resets. Valid only for a specific timezone.

reset_period_range_time_zone string

The date (TZ database format) when the leaderboard resets. Referrs to the reset period range.

LeaderboardUpdate

Parameters

name string

The name of the leaderboard

active boolean

Set if this leaderboard is active or not

start_date string

The date (in ISO format) when the leaderboard starts. Tracking begins once this datetime has been reached.

end_date string

The date (in ISO format) when the leaderboard ends. Tracking stops once the end date is reached, unless the leaderboard is repeatable, in which case this field is irrelevant

LeaderboardSortingMetadata

Parameters

allowed_aggregates LeaderboardAggregate[]

allowed_orders LeaderboardOrder[]

allowed_sorting_metadata array

LeaderboardSortingMetadataCreate

Parameters

aggregate string

The aggregate function for the calculation of the results - can be BEST (returns a single score - either the lowest if ASC sorting is used, or the highest if DESC is used) or SUM (default value - increments (sums up) the scores).

metadata_key string

The name of the event type

LeaderboardAggregate

The aggregate function for the calculation of the results - can be BEST (returns a single score - either the lowest if ASC sorting is used, or the highest if DESC is used) or SUM (default value - increments (sums up) the scores).

LeaderboardOrder

Can be ASC for ascending or DESC for descending order, designating how the leaderboard scores are sorted

EventRate

Parameters

event_count number

The number of events sent this month

event_limit number

The number of events that can be sent each month in the current tariff

fusion_id number

Internal user id of the 4Players domain

paid_tariff boolean

Defines if this is a paid or free (explore) tariff.

EventPayload

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 object

This holds metadata and is optional. However, you can use this to send additional info, like a weapon in a kill event. This way you can build more elaborate challenges like Kill 10 enemies with AK47 and with no armor protection.

Language

Parameters

language_id string

The id of the language

language_name string

The language in english language (human readable)

language_shortcode string

International shortcode for the language (i.e. en, fr, de, es, it, …)

Error

Parameters

code string

message string

SocketToken

Parameters

socket_token string

AccessToken

Parameters

token string

ForeignUserIdentifier

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.

App

Parameters

app_id number

The id of the app

app_name string

The name of your app

app_tag string

A unique identifier for your game with only alphanumeric characters, dash and underscore

app_active boolean

Indicates if this app is active. Use the DELETE route to deactivate an app

app_image string

A string identifying the apps logo image in your own application. Can also be a URL.

app_image_hd string

A string identifying the apps logo image in high quality in your own application. Can also be a URL.

has_battle_passes boolean

Indicates if this app has activated the battle pass system

has_battle_challenges boolean

Indicates if this app has activated the challenges system

request_count number

Number of requests sent in the current month

rate_limit number

The number of requests allowed per month

event_limit number

The number of events allowed per month

fusion_id number

The 4Players User Id

AppPayload

Parameters

app_name string

The name of your app

app_tag string

A unique identifier for your game with only alphanumeric characters, dash and underscore

app_image string

A string identifying the apps logo image in your own application. Can also be a URL.

app_image_hd string

A string identifying the apps logo image in high quality in your own application. Can also be a URL.

has_battle_passes boolean

Indicates if this app has activated the battle pass system

has_battle_challenges boolean

Indicates if this app has activated the challenges system

Apps

Parameters

event_count number

The number of events sent so far this month

applications App[]

LabelPayload

Parameters

label string

Label used for the API Key

Webhook

Parameters

webhook_id string

The id of the webhook

webhook_type string

The type of the webhook. Many different areas within SCILL GaaS trigger webhooks. Refer to the documentation for all available types.

app_id string

The id of your app that is linked to this webhook.

description string

A string used to store some information about the webhook.

target_url string

The URL to the webservices called by SCILL backends. This must be world open, i.e. reachable from the internet.

secret_key string

A secret that is sent with the webhook. Implement that secret on your side to make sure, that this is an authorized request.

WebhookPayload

Parameters

webhook_type string

The type of the webhook. Many different areas within SCILL GaaS trigger webhooks. Refer to the documentation for all available types.

app_id string

The id of your app that is linked to this webhook.

description string

A string used to store some information about the webhook.

target_url string

The URL to the webservices called by SCILL backends. This must be world open, i.e. reachable from the internet.

secret_key string

A secret that is sent with the webhook. Implement that secret on your side to make sure, that this is an authorized request.

ApiKeyInfo

Parameters

key_id number

The id of the API key

fusion_id number

The 4Players User Id

app_id number

The App Id. This is the id you need to use in most other endpoints

api_key string

The API Key. Use your API key in the Authorization header as the Bearer. Please don’t expose the API Key! This should only be used in server to server communication, not in clients. Generate an access token using this API key to be used in clients

enabled boolean

Indicates if this API key is active.

ChallengeCategoryType

Parameters

id string

The unique id of the category type

slug string

A short name without special chars that can be used to hardcode things

name string

The name of this category type

RewardType

Parameters

reward_type_id string

The id of the reward type

reward_type string

The type of the reward as a slug (machine readable format)

reward_name string

The name of the reward in a human readable format

ChallengeCategory

Parameters

category_id string

The unique id of the category

app_id string

The id of the app this challenge category is linked to

category_type string

The id of the challenge category type (see /api/v1/admin/challenge-category-available-types)

position number

The position of the challenge category (use to change order in lists)

active boolean

Indicates if this challenge category is active

category_name string

The name of the challenge category in the current language

category_slug string

A short name you can use to hardcode stuff in your code

ChallengeCategoryPayload

Parameters

app_id string

The id of the app this challenge category is linked to

category_type string

The id of the challenge category type (see /api/v1/admin/challenge-category-available-types)

category_name string

The name of the challenge category in the current language

active boolean

Indicates if this challenge category is active

ChallengeEventType

Parameters

challenge_type_id string

The type id

challenge_type_mandatory_metadata string

Mandatory meta data fields that need to be set in the event meta data payload

challenge_type_name string

The name of the event type

challenge_type_name_humanized string

The name of the event in a human readable format

challenge_type_non_mandatory_metadata string

Optional event meta data available for this event type

Challenge

Parameters

challenge_id string

The unique id of this challenge. Every challenge is linked to a product.

app_id string

The id of the app this challenge is linked to

challenge_category_id string

The id of the challenge category this challenge should be linked to

challenge_name string

The name of the challenge in the language set by the language parameter.

challenge_duration_time number

The duration of the challenge in seconds. Challenges auto lock after time-out and need to be unlocked again.

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.

challange_price number

The price for this challenge. This is just a value you can set and make any use in your app

challange_xp number

The experience points for this challenge. This is just a value you can set and make any use in your app

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_description string

An optional description the challenge in detail

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).

challenge_auto_activated boolean

Wether this challenge will be activated when requested by a user automatically or if users/clients need to activate challenges by hand or script.

period_range string

If challenge is auto activated it will be reset at specific points in time. Options are daily (d), weekly (w), monthly (m) or never.

period_range_reset_at_time string

The reset time this challenge will be set back. If period range is set to daily, then the challenge will be reset every day at this clock. If it’s weekly, it will be set to 0 on Monday at this clock.

period_range_time_zone string

The timezone used for reseting the challenge.

time_target number

time_condition number

live_date string

The date and time when this challenge should be activated. Use that to create challenges that will be visible in the future.

challenge_type string

The event type used to drive this challenge

required_metadata_values string

An internal flag that will be used to decide when this challenge should be triggered

is_battle_pass_challenge boolean

If this is a battle pass challenge. Should always be false!

generic_metadata GenericMetaData[]

ChallengePayload

Parameters

app_id string

The id of the app this challenge is linked to

challenge_category_id string

The id of the challenge category this challenge should be linked to

challenge_name string

The name of the challenge in the language set by the language parameter.

challenge_description string

An optional description the challenge in detail

challenge_type string

The event type used to drive this challenge

challenge_reward_type_id string

The id of the reward type.

repeatable boolean

Wether the challenge will be available again after it has been won or lost. Otherwise it will not be delivered again.

is_battle_pass_challenge boolean

If this is a battle pass challenge. Should always be false!

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_duration_time number

The duration of the challenge in seconds. Challenges auto lock after time-out and need to be unlocked again.

challenge_goal number

Indicates how many “tasks” must be completed or done to complete this challenge.

challange_price number

The price for this challenge. This is just a value you can set and make any use in your app

challange_xp number

The experience points for this challenge. This is just a value you can set and make any use in your app

challange_reward string

The reward for this challenge. This is just a value you can set and make any use in your app

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.

live_date string

The date and time when this challenge should be activated. Use that to create challenges that will be visible in the future.

challenge_auto_activated boolean

Wether this challenge will be activated when requested by a user automatically or if users/clients need to activate challenges by hand or script.

period_range string

If challenge is auto activated it will be reset at specific points in time. Options are daily (d), weekly (w), monthly (m) or never.

period_range_reset_at_time string

The reset time this challenge will be set back. If period range is set to daily, then the challenge will be reset every day at this clock. If it’s weekly, it will be set to 0 on Monday at this clock.

period_range_time_zone string

The timezone used for reseting the challenge.

generic_metadata GenericMetaData[]

GenericMetaData

Parameters

values array

metadata_key string

The event type that this challenge should listen to

conjunction string

Can be OR and AND and defines if all values need to match or just any of the provided values

GenericMetaDataCreate

SortingMetaDataList

Parameters

aggregate string

Can have a value of SUM or BEST. SUM increments the score, and BEST replaces the score depending on the order (if the order is ASC, it will replace a lower score, otherwise, for DESC, it will replace the score only if the score is larger)

metadata_key string

The event type that this challenge should listen to

order string

Can be ASC or DESC; signifies ascending or descending sorting order

inline_response_200

Parameters

api_key string

The app id of the app just created

inline_response_200_1

Parameters

api_key string

The API key