1. Tickets
[Game] FairPlay API
  • Getting Started
    • Introduction
    • Session and Token
    • Request and Response
    • Real-time Events (SSE)
    • Lotto Rules — หวยเฮงเฮง
    • Provably Fair
  • Player
    • Demo
      • Demo Login
    • Player Bet History
      GET
  • Common
    • Game
      • By Game Code
        • Provably Fair
          • Set Client Seed
          • Verify Result
          • Get Revealed Server Seed
        • Check Session
        • Get Balance
        • Get Provably-Fair State
      • Lobby Game List
  • Wallet
    • Wallet Status
      GET
  • Game
    • Lotto (หวยเฮงเฮง)
      • Lotto Rules
      • Rooms
        • By Room
          • Join Round
          • Place Multi-player Bet
          • Get Round Result
          • Room Event Stream
      • Tickets
        • Create Ticket
          POST
        • Inquiry My Tickets
          POST
        • Get Ticket
          POST
      • Round
        • Get My Bets
        • Get My Result
        • Get Round Provably Fair
      • Results
        • Inquiry Results
      • Get Rooms
        GET
      • Get Current Round
        POST
      • Get Pay Table
        GET
  • Appendix
    • Game List
    • Error Codes
    • Rate Limits
  • Language List
    GET
  • Ping
    GET
  • Schemas
    • DemoLoginRequest
    • DemoLoginResponse
    • DemoProfileResponse
    • ProfileResponse
    • GetHistoryResponse
    • BetRecord
    • GameInfo
    • Room
    • GetGameResponse
    • BetRequest
    • Bet
    • BetResponse
    • BetResult
    • GetProvablyFairResponse
    • SetClientSeedRequest
    • SetClientSeedResponse
    • RotateServerSeedResponse
    • VerifyResultRequest
    • VerifyResultResponse
    • GetServerSeedResponse
    • GetStatusResponse
    • JoinRoundResponse
    • PlaceMultiPlayerBetRequest
    • PlaceBetResponse
    • RoundResultResponse
    • SuccessResponse
    • ErrorResponse
  1. Tickets

Inquiry My Tickets

POST
/gapi/v1/g/lotto/tickets/inquiry
Lists the caller's tickets, newest first, filtered by the WAITING / SETTLED tab and an optional won / lost filter. Used by the bet history screen.
Auth: Player session — Authorization: Bearer {token}
Rate limit: 300 requests per 60 s per IP (LOTTO_TICKETS_INQUIRY)
Games: LOTTO
Rules
Lotto only: the route is under /g/lotto, so system maintenance and Lotto's own maintenance window both answer 503 99915.
Paginated: page and limit go in the JSON body (defaults 1 and 20; values below 1 fall back to the defaults; limit has no upper cap) and are echoed at the top level of the response.
In the paginated response, top-level total and totalPage are omitted when 0 and hasNext / hasPrev are omitted when false. data is always an array ([] when empty).
status is required and exact upper-case: WAITING or SETTLED; waiting is rejected.
outcome: omit, "" or ALL = no filter; WON = at least one winning line; LOST = no winning line. WON / LOST combined with WAITING always returns nothing.
Not scoped to a room or currency: all of the player's LOTTO tickets in the current demo / real mode.
Tickets of a cancelled round stay WAITING; they were refunded, not settled.
In rare cases a ticket stays WAITING after its round settled; my-result for that round shows the settled lines.
outcome and netWin are absent while WAITING; netWin can be negative even when outcome is WON.
Amounts (totalAmount, netWin) are JSON numbers; timestamps are UTC.
The ticket id key is betID (capital ID).
Validation failures answer 400 99911 with a description naming the field, e.g. status must be one of: WAITING SETTLED.
Flow
1.
Accept LOTTO only; validate status / outcome; apply the page / limit defaults.
2.
Check the session game.
3.
Query the caller's tickets (demo or real) by status and outcome, newest placement first, one page.
4.
Resolve room names (even for inactive or deleted rooms); add outcome and netWin for settled tickets.
5.
Return the page with its pagination values.

Request

Query Params

Header Params

Body Params application/json

Examples

Responses

🟢200OK
application/json
Bodyapplication/json

🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🟠429Too Many Requests
🔴500Internal Server Error
🔴503Service Unavailable
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://dev-api.ambfairgame.com/gapi/v1/gapi/v1/g/lotto/tickets/inquiry?token=8d0c6a4e2b9f4f1c9a7e3b5d1c2e4f60' \
--header 'Authorization: Bearer 3f9a1c7e5b2d4f6081a3c5e7f9b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a1c3e5b7' \
--header 'Accept-Language: th' \
--header 'Content-Type: application/json' \
--data '{
    "status": "SETTLED",
    "outcome": "ALL",
    "page": 1,
    "limit": 20
}'
Response Response Example
200 - One settled ticket
Settled tab, page 1 of 1.
{
    "code": "0",
    "description": "Success.",
    "traceID": "0f8e2c1a-6b3d-4e5f-9a7b-1c2d3e4f5a6b",
    "data": [
        {
            "betID": "2_1001_tm64903fa91c2e_9f1c0b7a4d2e6f8a1b3c5d7e9f0a2b4c",
            "room": {
                "roomId": 1,
                "name": "ห้องหวย 1"
            },
            "createdAt": "2026-09-30T08:07:31.482Z",
            "drawAt": "2026-09-30T08:15:00Z",
            "status": "SETTLED",
            "outcome": "WON",
            "itemCount": 3,
            "totalAmount": 35,
            "netWin": 3625
        }
    ],
    "page": 1,
    "limit": 20,
    "total": 1,
    "totalPage": 1
}
Modified at 2026-09-30 13:23:45
Previous
Create Ticket
Next
Get Ticket
Built with