List Entries
GET /v1/lotteries/{slug}/entriesReturns a paginated list of all tickets your account has entered for a specific lottery. Use this to track your users’ entries and check draw results.
Authentication
Section titled “Authentication”| Header | Required | Value |
|---|---|---|
X-API-Secret | Yes | Your secret key |
Path Parameters
Section titled “Path Parameters”| Parameter | Type | Description |
|---|---|---|
slug | string | The lottery’s unique slug |
Query Parameters
Section titled “Query Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number |
limit | integer | 20 | Results per page (max 100) |
Request Examples
Section titled “Request Examples”curl -X GET "https://api.gamifyhost.com/v1/lotteries/mega-millions-weekly/entries?page=1&limit=20" \ -H "X-API-Secret: sk_live_your_secret_key"const response = await fetch( 'https://api.gamifyhost.com/v1/lotteries/mega-millions-weekly/entries?page=1&limit=20', { headers: { 'X-API-Secret': 'sk_live_your_secret_key', }, });
const { data, total } = await response.json();console.log(`${total} entries found`);data.forEach(ticket => { console.log(`${ticket.ticketRef} — ${ticket.email} — ${ticket.status}`);});import requests
response = requests.get( "https://api.gamifyhost.com/v1/lotteries/mega-millions-weekly/entries", headers={"X-API-Secret": "sk_live_your_secret_key"}, params={"page": 1, "limit": 20},)
result = response.json()for ticket in result["data"]: print(f"{ticket['ticketRef']} — {ticket['email']} — {ticket['status']}")req, _ := http.NewRequest("GET", "https://api.gamifyhost.com/v1/lotteries/mega-millions-weekly/entries?page=1&limit=20", nil)req.Header.Set("X-API-Secret", "sk_live_your_secret_key")
resp, err := http.DefaultClient.Do(req)if err != nil { log.Fatal(err)}defer resp.Body.Close()
var result map[string]interface{}json.NewDecoder(resp.Body).Decode(&result)fmt.Printf("Found %v entries\n", result["total"])$ch = curl_init('https://api.gamifyhost.com/v1/lotteries/mega-millions-weekly/entries?page=1&limit=20');curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ 'X-API-Secret: sk_live_your_secret_key', ],]);
$response = curl_exec($ch);curl_close($ch);
$data = json_decode($response, true);echo "Found {$data['total']} entries\n";foreach ($data['data'] as $ticket) { echo "{$ticket['ticketRef']} — {$ticket['email']} — {$ticket['status']}\n";}import 'dart:convert';import 'package:http/http.dart' as http;
final response = await http.get( Uri.parse('https://api.gamifyhost.com/v1/lotteries/mega-millions-weekly/entries?page=1&limit=20'), headers: {'X-API-Secret': 'sk_live_your_secret_key'},);
final result = jsonDecode(response.body);print('Found ${result['total']} entries');Response
Section titled “Response”Status: 200 OK
{ "status": "success", "data": [ { "id": "b1c2d3e4-f5a6-7890-bcde-f12345678901", "ticketRef": "LX-2026-0305-A7F2", "drawId": "c2d3e4f5-a6b7-8901-cdef-123456789012", "lotteryId": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "email": "user@example.com", "externalUserId": "user_12345", "status": "ACTIVE", "entryMethod": "PARTNER_API", "lines": [ { "main": [7, 14, 21, 35, 42], "bonus": [3] } ], "winTier": null, "winAmountCents": 0, "createdAt": "2026-03-05T14:30:00Z" }, { "id": "d4e5f6a7-b8c9-0123-def4-567890abcdef", "ticketRef": "LX-2026-0304-B3E1", "drawId": "c2d3e4f5-a6b7-8901-cdef-123456789012", "lotteryId": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "email": "another@example.com", "externalUserId": "user_67890", "status": "WON", "entryMethod": "PARTNER_API", "lines": [ { "main": [3, 12, 27, 33, 49], "bonus": [7] } ], "winTier": "Tier 3", "winAmountCents": 5000, "createdAt": "2026-03-04T09:15:00Z" } ], "total": 47, "page": 1, "limit": 20}Response Fields
Section titled “Response Fields”| Field | Type | Description |
|---|---|---|
data | array | List of ticket objects |
total | integer | Total entries for this lottery |
page | integer | Current page |
limit | integer | Results per page |
Ticket Object
Section titled “Ticket Object”| Field | Type | Description |
|---|---|---|
id | string | Ticket UUID |
ticketRef | string | Human-readable ticket reference |
drawId | string | Draw UUID this ticket was entered into |
lotteryId | string | Lottery UUID |
email | string | User’s email |
externalUserId | string | Your user ID (if provided at entry) |
status | string | Current ticket status (see below) |
entryMethod | string | How the entry was created |
lines | array | Number lines on this ticket |
winTier | string|null | Prize tier name if the ticket won, null otherwise |
winAmountCents | integer | Prize amount in cents (0 if not won) |
createdAt | string | ISO 8601 timestamp |
Ticket Statuses
Section titled “Ticket Statuses”| Status | Description |
|---|---|
ACTIVE | Ticket is entered in an upcoming or open draw |
DRAWN | Draw has been executed, results being processed |
WON | Ticket matched a winning tier |
LOST | Ticket did not match any winning tier |
CANCELLED | Ticket was cancelled |
Errors
Section titled “Errors”| Code | Message |
|---|---|
400 | lottery not found — Invalid slug |