Comprehensive REST API documentation for integrating QFlow with your systems.
Build custom workflows, automate processes, and extend QFlow's capabilities.
Generate API keys from your QFlow dashboard settings
Test authentication and fetch your account data
Use our SDKs or direct API calls to build features
QFlow API uses API keys for authentication. Include your API key in the Authorization header.
curl https://api.qflow.io/v1/branches \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
/v1/tickets
Create a new ticket for a customer in the queue.
{
"branch_id": 123,
"service_id": 456,
"customer": {
"name": "John Doe",
"phone": "+1234567890",
"email": "john@example.com"
},
"priority": "normal",
"metadata": {
"source": "mobile_app"
}
}
{
"success": true,
"ticket": {
"id": 789,
"number": "A001",
"status": "waiting",
"position": 3,
"estimated_wait": "15 minutes",
"created_at": "2024-12-28T10:30:00Z"
}
}
/v1/tickets/{ticket_id}
Retrieve details of a specific ticket.
{
"success": true,
"ticket": {
"id": 789,
"number": "A001",
"status": "serving",
"counter": 5,
"service": {
"id": 456,
"name": "Account Opening"
},
"customer": {
"name": "John Doe",
"phone": "+1234567890"
},
"created_at": "2024-12-28T10:30:00Z",
"called_at": "2024-12-28T10:45:00Z"
}
}
/v1/tickets/{ticket_id}/status
Update ticket status (call, serve, complete, cancel).
{
"status": "completed",
"counter_id": 5,
"notes": "Service completed successfully"
}
/v1/branches/{branch_id}/queues
Get real-time queue status for a branch.
{
"success": true,
"queues": [
{
"service_id": 456,
"service_name": "Account Opening",
"total_waiting": 12,
"average_wait_time": "18 minutes",
"tickets_served_today": 45,
"active_counters": 3
},
{
"service_id": 457,
"service_name": "Teller Services",
"total_waiting": 8,
"average_wait_time": "10 minutes",
"tickets_served_today": 128,
"active_counters": 5
}
]
}
/v1/analytics/performance
Retrieve performance metrics for specified date range.
| Parameter | Type | Required | Description |
|---|---|---|---|
branch_id |
integer | No | Filter by specific branch (omit for all branches) |
start_date |
date | Yes | Start date (YYYY-MM-DD) |
end_date |
date | Yes | End date (YYYY-MM-DD) |
{
"success": true,
"metrics": {
"total_tickets": 1250,
"average_wait_time": "12.5 minutes",
"average_service_time": "8.2 minutes",
"customer_satisfaction": 4.3,
"peak_hours": ["10:00-11:00", "14:00-15:00"],
"busiest_day": "Monday"
}
}
Receive real-time notifications for important events in your QFlow system.
| Event | Description | Payload |
|---|---|---|
ticket.created |
Fired when a new ticket is generated | Ticket object with customer data |
ticket.called |
Fired when a ticket is called to counter | Ticket ID, counter ID, timestamp |
ticket.serving |
Fired when service begins | Ticket ID, staff member ID |
ticket.completed |
Fired when service is completed | Ticket ID, service duration, rating |
ticket.cancelled |
Fired when ticket is cancelled | Ticket ID, reason, timestamp |
queue.sla_violation |
Fired when SLA threshold exceeded | Queue ID, current wait time, threshold |
{
"event": "ticket.created",
"timestamp": "2024-12-28T10:30:00Z",
"data": {
"ticket": {
"id": 789,
"number": "A001",
"branch_id": 123,
"service_id": 456,
"customer": {
"name": "John Doe",
"phone": "+1234567890"
},
"status": "waiting",
"position": 3,
"estimated_wait": "15 minutes"
}
}
}
Official SDKs to accelerate your integration development.
Our developer support team is here to help you succeed with your QFlow integration.