Handle the lifecycle of a customer ticket.
A ticket represents a customer's place in a queue. Managing the ticket lifecycle is the core of your daily operations.
A ticket generally goes through the following statuses:
waiting → called → serving → completed (or absent/cancelled).
Register a customer and issue a ticket.
curl -X POST "https://api.oquira.com/v1/business/queues/clsh7z8m1000008l2bh3z6p9k/join" \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"customerName": "John Doe",
"phoneNumber": "+1234567890"
}'Response:
{
"success": true,
"data": {
"id": "clsh8a2b3000208l2bh3z6p9k",
"queueId": "clsh7z8m1000008l2bh3z6p9k",
"userId": "clsh8b4c5000308l2bh3z6p9k",
"number": 45,
"sequenceNumber": 45,
"displayCode": "A-045",
"status": "waiting",
"visitorName": "John Doe",
"estimatedWaitTime": 15,
"createdAt": "2024-03-15T11:00:00.000Z"
}
}We highly recommend using WebSocket events or Webhooks to receive instant notifications when a ticket status changes. This ensures your dashboard remains in sync with actual counter activity.
Always update the status immediately (e.g., mark as present when the customer arrives). This ensures wait time calculations remain accurate for other customers.
When completing a ticket, you can include customer feedback or internal notes to improve service quality.
Use the requeue option for absent customers if your policy allows them to be called again later without losing their place entirely.