Loyalty.lt
Shop games

Get User's Game History

Retrieves the game history for the authenticated user

GET/{locale}/shop/game-sessions/history

Retrieves the game history for the authenticated user

Authorization

bearerAuth
AuthorizationBearer <token>

Enter JWT token in the format: Bearer {token}

In: header

Path Parameters

locale*string

Locale code

Query Parameters

game_id?integer

Filter by game ID

status?string

Filter by session status

Value in

  • "active"
  • "completed"
  • "expired"
  • "cancelled"
date_from?string

Filter by date from

Formatdate
date_to?string

Filter by date to (inclusive)

Formatdate
page?integer

Page number

Range1 <= value
per_page?integer

Items per page

Range1 <= value <= 100

Response Body

application/json

curl -X GET "https://example.com/en/shop/game-sessions/history"
{  "success": true,  "data": {    "data": [      {        "id": 1,        "user_id": 1,        "game_id": 1,        "session_key": "game_session_1234567890abcdef1234567890abcdef",        "status": "completed",        "score": 1000,        "reward_claimed": true,        "created_at": "2023-10-27T10:00:00Z",        "completed_at": "2023-10-27T10:30:00Z",        "game": {          "id": 1,          "name": "Wheel of Fortune",          "type": "wheel_of_fortune",          "description": "Spin the wheel to win prizes",          "is_active": true,          "is_featured": false,          "points_cost": 100,          "daily_limit": 5,          "can_play": true,          "play_restriction": null        }      }    ],    "meta": {}  }}