Open a Box
Request LoyaltyGyre to open a specific reward box for a player. This endpoint initiates the game logic on LoyaltyGyre’s backend, generates a prize, and returns the details of the item won by the player.
Endpoint
Query Parameters
| Parameter | Type | Description |
|---|---|---|
player_idRequired |
string / number | The unique identifier for the player in the casino's system. |
box_idRequired |
string / number | The unique identifier for the box to be opened. |
Example Request
cURL
curl -X POST "https://app.loyaltygyre.com/api/box/open" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"player_id": "12345", "box_id": "58"}'
Responses
200 OK
The box was successfully opened, and the prize details are returned, including the ID of the item won by the player.
400 Bad Request
The request is missing required parameters or contains invalid data.
401 Unauthorized
The API key is missing or invalid.
404 Not Found
The specified box was not found or is unavailable for the player.
500 Internal Server Error
An internal error occurred while processing the request.