PUT/PATCH /api/v1/sorteos/:id
Updates an existing sorteo (lottery draw). Changes are only allowed for sorteos inSCHEDULED or OPEN status.
Authentication
Requires ADMIN role.Path Parameters
UUID of the sorteo to update
Request Body
All fields are optional. Only provided fields will be updated.Change the associated loteria.
Update the scheduled time.ISO 8601 datetime in Costa Rica timezone (GMT-6).Example:
"2025-03-03T14:55:00-06:00"Update the display name.Min: 1 character, Max: 100 characters
Update the number of digits (2 or 3).
Changing digits affects which winning numbers are valid during evaluation.
Activate or deactivate the sorteo.Inactive sorteos are hidden from vendedores and don’t accept ticket sales.
Response
Indicates if the operation was successful
The updated sorteo object (see Get Sorteo for full structure)
Example Request
Example Response
Error Responses
Update Restrictions by Status
- SCHEDULED
- OPEN
- EVALUATED
- CLOSED
Full Update AccessAll fields can be updated:
loteriaIdscheduledAtnamedigitsisActive
Changing Loteria
Requirements:- Current status must be
SCHEDULED - New loteria must exist and be active
- New loteria configuration will be inherited
Changing Scheduled Time
Be cautious when changing
scheduledAt for sorteos that already have tickets sold. Consider communication to vendedores and players.- Before Opening: Safe to change anytime
- After Opening: Notify stakeholders of time change
- Close to Draw Time: Avoid changes - may cause confusion
Updating Digits
Thedigits field affects:
- Valid winning number range during evaluation
- Display formatting in UI
- Ticket validation logic
Activate/Deactivate Sorteo
Use the dedicated Set Active endpoint for bulk activation operations.
- Hidden from vendedor lists
- Cannot create new tickets
- Existing tickets remain valid
- Can be reactivated later
Activity Logging
All sorteo updates are logged in the activity system with:- Action:
SORTEO_UPDATE - User: Admin who made the change
- Details: Changed fields and their new values
- Description: Human-readable summary
Related Endpoints
Get Sorteo
View current sorteo details
Open Sorteo
Open sorteo for sales
Close Sorteo
Close sorteo for evaluation
Activity Logs
View audit trail