List Orders
Retrieve a paginated list of orders and bookings.
Endpoint
Authentication
Bearer token with orders:read scope
Query Parameters
Number of orders to return (1-100)
Pagination cursor from previous response
Filter by status: pending, confirmed, completed, cancelled
Filter by type: booking, sale, enquiry
Orders scheduled after this date (ISO 8601)
Orders scheduled before this date (ISO 8601)
Orders created after this date (ISO 8601)
Request Example
curl -X GET "https://api.tiquo.co/v1/orders?status=confirmed&limit=10" \
-H "Authorization: Bearer sk_live_xxxxx"
Response Example
{
"success": true,
"data": [
{
"id": "ord_abc123",
"type": "booking",
"status": "confirmed",
"customerId": "cust_xyz789",
"customerName": "John Doe",
"customerEmail": "[email protected]",
"locationId": "loc_def456",
"scheduledAt": "2024-01-25T10:00:00Z",
"duration": 60,
"services": [
{
"id": "svc_123",
"name": "Consultation",
"price": 75.00,
"quantity": 1
}
],
"subtotal": 75.00,
"tax": 6.56,
"total": 81.56,
"paymentStatus": "paid",
"notes": "First-time customer",
"createdAt": "2024-01-20T14:30:00Z",
"updatedAt": "2024-01-20T15:00:00Z"
}
],
"pagination": {
"hasMore": true,
"nextCursor": "ord_abc123"
}
}
Order Object
Order type: booking, sale, enquiry
Order status: pending, confirmed, in_progress, completed, cancelled
Location ID where service occurs
Scheduled date/time (ISO 8601)
Array of services/products in order
Payment status: pending, paid, refunded, failed
Filtering Examples
By Status
GET /v1/orders?status=pending
By Date Range
GET /v1/orders?startDate=2024-01-01&endDate=2024-01-31
By Customer
GET /v1/orders?customerId=cust_xyz789
Code Examples
const params = new URLSearchParams({
status: 'confirmed',
limit: '10'
});
const response = await fetch(`https://api.tiquo.co/v1/orders?${params}`, {
headers: {
'Authorization': `Bearer ${apiKey}`
}
});
const { data: orders } = await response.json();