GET
5 min read
List Bookings
GET
/api/v1/bookings
Retrieve a paginated list of bookings
List Bookings
Retrieve a paginated list of bookings from companies you have access to.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
company_id |
integer | Filter by specific company |
status |
string | Filter by status: pending, confirmed, cancelled, completed |
date |
date | Filter by scheduled date (YYYY-MM-DD) |
per_page |
integer | Results per page (default: 15, max: 100) |
page |
integer | Page number |
Example Request
curl -X GET "https://hydra.marketdragon.ph/api/v1/bookings?company_id=1&status=confirmed" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
Example Response
{
"data": [
{
"id": 1,
"company_id": 1,
"customer_name": "John Smith",
"customer_email": "[email protected]",
"customer_phone": "+1234567890",
"vehicle_make": "Toyota",
"vehicle_model": "Camry",
"vehicle_year": 2022,
"vehicle_plate": "ABC 123",
"service_type": "Oil Change",
"scheduled_date": "2024-01-20",
"scheduled_time": "10:00",
"duration_minutes": 60,
"status": "confirmed",
"notes": "Customer prefers synthetic oil",
"reference_number": "BK4A7F2C9E",
"qr_code_url": "https://hydra.marketdragon.ph/p/acme-auto/booking/550e8400-e29b-41d4-a716-446655440000",
"confirmed_at": "2024-01-18T14:30:00+00:00",
"cancelled_at": null,
"created_at": "2024-01-15T08:30:00+00:00",
"updated_at": "2024-01-18T14:30:00+00:00"
}
],
"links": {
"first": "https://hydra.marketdragon.ph/api/v1/bookings?page=1",
"last": "https://hydra.marketdragon.ph/api/v1/bookings?page=3",
"prev": null,
"next": "https://hydra.marketdragon.ph/api/v1/bookings?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 3,
"per_page": 15,
"to": 15,
"total": 42
}
}
Back to Bookings
Was this helpful?