ThrillConnect: ThrillPots Requests

You can use the authenticated WebSocket connection to send requests that are relevant to the authenticated player.

Opt-In/Out Request

In order to opt a player into or out of a jackpot, you use the PlayerOptInRequest message. This allows you to send not only standard opt-in / opt-out requests, but also to specify the contribution value that the player wishes to opt-in with.

Example: Opting a player in with the default contribution value

{
    "PlayerOptInRequest": {
        "instance_id": "209cc142-ccb2-4e28-a763-0a031b560d74",
        "player_id": "player_id_token_00001",
        "brand_id": "thrilltech:brand1",
        "player_country": "MT",
        "opt_in": true
    }
}

Example: Opting a player in with a specific contribution value (0.30)

{
    "PlayerOptInRequest": {
        "instance_id": "209cc142-ccb2-4e28-a763-0a031b560d74",
        "player_id": "player_id_token_00001",
        "brand_id": "thrilltech:brand1",
        "player_country": "MT",
        "opt_in": true,
        "contribution_value": 0.3
    }
}

Example: Opting a player out of a jackpot

{
    "PlayerOptInRequest": {
        "instance_id": "209cc142-ccb2-4e28-a763-0a031b560d74",
        "player_id": "player_id_token_00001",
        "brand_id": "thrilltech:brand1",
        "player_country": "MT",
        "opt_in": false
    }
}

If the opt-in or opt-out request was successful, you will receive an OptInEvent

Retrieving a player's raffle tickets for a specific instance

To retrieve a player's raffle ticket count for a specific Raffle Jackpot, send the PlayerRaffleTicketsRequest message:

{
    "PlayerRaffleTicketsRequest": {
        "player_id": "player_00001",
        "instance_id": "f0dee1ae-6231-458a-ad6d-4dc0c941e5c3",
        "brand_id": "thrilltech:brand1"
    }
}

If the request was valid, you will receive a PlayerRaffleTicketResponse message:

{
    "msg_type": "Message",
    "source": "thrillpots",
    "msg_name": "PlayerRaffleTicketResponse",
    "operator_id": "thrilltech",
    "brand_id": "brand1",
    "player_id": "player_00001",
    "data": {
        "instance_id": "f0dee1ae-6231-458a-ad6d-4dc0c941e5c3",
        "ticket_count": 8
        "timestamp_start": 134857982371,
        "timestamp_end": 14384723487,
    },
    "timestamp": 1715191298453
}

Retrieving all of a player's raffle tickets for active raffles

To retrieve all the raffle tickets for all active raffles for a player (in other words, not specific to a particular raffle), you can use a modified version of the above PlayerRaffleTicketsRequest request (omitting the instance_id on the request):

{
    "PlayerRaffleTicketsRequest": {
        "player_id": "player_00001",
        "brand_id": "thrilltech:brand1"
    }
}

If the player has earned any raffle tickets on any active raffles, the response will be a PlayerRaffleTicketListResponse and will look something like this:

{
    "msg_type": "Message",
    "source": "thrillpots",
    "msg_name": "PlayerRaffleTicketListResponse",
    "operator_id": "thrilltech",
    "brand_id": "brand1",
    "player_id": "player_00001",
    "data": {
        "instance_tickets": [
            {
                "instance_id": "raffle_instance_a_id",
                "ticket_count": 8
                "timestamp_start": 134857982371,
                "timestamp_end": 14384723487,
            },
            {
                "instance_id": "raffle_instance_b_id",
                "ticket_count": 3
                "timestamp_start": 134857982371,
                "timestamp_end": 14384723487,
            },

        ]
    },
    "timestamp": 1715191298453
}

In the case that a player has not earned any raffle tickets for active raffles, the list will be empty. For example:

{
    "msg_type": "Message",
    "source": "thrillpots",
    "msg_name": "PlayerRaffleTicketListResponse",
    "operator_id": "thrilltech",
    "brand_id": "brand1",
    "player_id": "player_01010",
    "data": {
        "instance_tickets": []
    },
    "timestamp": 1715191298453
}