GET /api/v1/sorteos/:id
Retrieves detailed information about a specific sorteo (lottery draw) by its UUID.
Authentication
Requires authentication. Available to all roles.
Path Parameters
UUID of the sorteo to retrieve
Response
Indicates if the operation was successful
The sorteo object with full details
UUID of the associated loteria
ISO 8601 datetime in Costa Rica timezone
Display name of the sorteo
Current status: SCHEDULED, OPEN, EVALUATED, or CLOSED
Number of digits for winning numbers (2 or 3)
Whether the sorteo is active
Whether REVENTADO (extra multiplier) is enabled
Winning number (null if not evaluated)
Whether there are winning tickets
UUID of the extra multiplier used (REVENTADO)
Value of the extra multiplier applied
Outcome code for the extra multiplier
Associated loteria details
Loteria configuration rules (includes digits, drawSchedule, reventadoConfig)
Extra multiplier details if applied
ISO 8601 timestamp of creation
ISO 8601 timestamp of last update
Example Request
curl https://api.example.com/api/v1/sorteos/7c9e6679-7425-40de-944b-e07fc1f90ae7 \
-H "Authorization: Bearer YOUR_TOKEN"
Example Response
{
"success": true,
"data": {
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"loteriaId": "550e8400-e29b-41d4-a716-446655440000",
"scheduledAt": "2025-03-03T12:55:00-06:00",
"name": "Lotto 12:55 PM",
"status": "EVALUATED",
"digits": 2,
"isActive": true,
"reventadoEnabled": true,
"winningNumber": "42",
"hasWinner": true,
"extraMultiplierId": "a1b2c3d4-e5f6-4a5b-9c8d-1e2f3a4b5c6d",
"extraMultiplierX": 5,
"extraOutcomeCode": "REVENTADO x5",
"loteria": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Lotto",
"rulesJson": {
"digits": 2,
"drawSchedule": {
"frequency": "diario",
"times": ["12:55", "18:55"]
},
"reventadoConfig": {
"enabled": true
}
}
},
"extraMultiplier": {
"id": "a1b2c3d4-e5f6-4a5b-9c8d-1e2f3a4b5c6d",
"name": "REVENTADO x5",
"valueX": 5
},
"createdAt": "2025-03-03T10:00:00-06:00",
"updatedAt": "2025-03-03T13:00:00-06:00"
}
}
Error Responses
{
"success": false,
"error": "Sorteo no encontrado"
}
Understanding Sorteo Status
The status field indicates the current lifecycle state:
Sorteo is created and waiting to be opened. No ticket sales yet.Allowed Operations:
- Update sorteo details
- Open sorteo
- Delete/deactivate sorteo
Sorteo is accepting ticket sales. Vendedores can create tickets.Allowed Operations:
- Create tickets
- Close sorteo
- Evaluate sorteo (set winning number)
Winning number has been set. Winners have been identified.Allowed Operations:
- Pay winning tickets
- Close sorteo
- Revert evaluation (admin only)
Sorteo is permanently closed. No further operations allowed.Terminal State - Cannot be reopened.
REVENTADO Multipliers
REVENTADO is an extra multiplier feature that can apply additional winnings to specific numbers.
When a sorteo has reventadoEnabled: true:
- The loteria has REVENTADO multipliers configured
- During evaluation, an optional
extraMultiplierId can be specified
- Tickets with REVENTADO bets on the winning number get extra payouts
Example flow:
Sorteo Created
Sorteo is created with reventadoEnabled: true (inherited from loteria)
Tickets Sold
Vendedores sell tickets with NUMERO and REVENTADO bets
Evaluation
Admin evaluates sorteo with winningNumber: "42" and extraMultiplierId: "xxx"
Winners Calculated
- NUMERO bets on “42” win with normal multiplier
- REVENTADO bets on “42” win with extra multiplier (e.g., x5)
List Sorteos
Get all sorteos with filtering
Update Sorteo
Update sorteo details
Evaluate Sorteo
Set winning number
Multipliers Guide
Learn about multiplier system