PATCH /api/v1/sorteos/:id/open
Transitions a sorteo fromSCHEDULED to OPEN status, enabling ticket sales.
Once opened, vendedores can create tickets for this sorteo until it’s closed or the sales cutoff time is reached.
Authentication
Requires ADMIN role.Path Parameters
UUID of the sorteo to open
Request Body
No request body required.Response
Indicates if the operation was successful
The updated sorteo object with
status: "OPEN"Example Request
Example Response
Error Responses
Opening Requirements
Alternative: Force Open
For reopening sorteos from other states, see the Update endpoint for advanced options.Additional endpoints like force-open and activate-and-open are available but not yet documented. These allow forcefully opening sorteos from any non-evaluated state or reactivating inactive sorteos.
What Happens When Opening?
Status Transition
Status Transition
The sorteo status changes from
SCHEDULED to OPEN.Ticket Sales Enabled
Ticket Sales Enabled
Vendedores can now create tickets for this sorteo through the ticket creation API.
Cache Invalidation
Cache Invalidation
Sorteo cache is cleared to ensure all clients see the updated status.
Activity Logged
Activity Logged
An activity log entry is created:
Sales Cutoff
Example cutoff logic:Automated Opening
Sorteos can be opened automatically using the auto-open cron job. See Sorteo Automation for details.
Typical Workflow
Create Sorteos
Create sorteos manually or via seed sorteos for upcoming draws.
Evaluate After Draw
Admin evaluates sorteo with winning number using Evaluate Sorteo.
State Diagram
Related Endpoints
Close Sorteo
Close an open or evaluated sorteo
Evaluate Sorteo
Set winning number and evaluate
Update Sorteo
Modify sorteo configuration
Create Ticket
Create a ticket for open sorteo