Skip to main content

Customer Booking History

Get a customer's booking history with filtering and pagination.

Endpointโ€‹

GET /v1/customers/{id}/bookings

Path Parametersโ€‹

ParameterTypeDescription
idintegerCustomer ID

Query Parametersโ€‹

ParameterTypeDescription
statusstringFilter by booking status
date_fromstringFilter bookings from date (YYYY-MM-DD)
date_tostringFilter bookings to date (YYYY-MM-DD)
pageintegerPage number (default: 1)
per_pageintegerItems per page (default: 20, max: 100)
sortstringSort field: id, start_date, end_date, created_at, status
orderstringSort direction: asc or desc

Example Requestโ€‹

curl -X GET "https://app.equipdash.com/api/v1/customers/123/bookings?date_from=2026-01-01&per_page=10" \
-H "Authorization: Bearer YOUR_API_KEY"

Responseโ€‹

{
"data": [
{
"id": 456,
"type": "rental",
"status": "completed",
"payment_status": "paid",
"start_date": "2026-01-15T09:00:00+00:00",
"end_date": "2026-01-17T17:00:00+00:00",
"pricing": {
"subtotal": 250.00,
"total": 275.00,
"currency": "USD"
},
"products": [
{
"id": 1,
"name": "Mountain Bike",
"quantity": 2,
"unit_price": 50.00,
"line_total": 200.00
}
],
"created_at": "2026-01-10T14:30:00+00:00"
},
{
"id": 234,
"type": "rental",
"status": "completed",
"payment_status": "paid",
"start_date": "2025-12-20T10:00:00+00:00",
"end_date": "2025-12-21T10:00:00+00:00",
"pricing": {
"subtotal": 75.00,
"total": 82.50,
"currency": "USD"
},
"products": [
{
"id": 3,
"name": "Kayak",
"quantity": 1,
"unit_price": 75.00,
"line_total": 75.00
}
],
"created_at": "2025-12-15T09:00:00+00:00"
}
],
"meta": {
"current_page": 1,
"per_page": 10,
"total": 8,
"total_pages": 1
}
}

Filter by Statusโ€‹

Get only active bookings:

curl -X GET "https://app.equipdash.com/api/v1/customers/123/bookings?status=confirmed" \
-H "Authorization: Bearer YOUR_API_KEY"

Filter by Date Rangeโ€‹

Get bookings for a specific period:

curl -X GET "https://app.equipdash.com/api/v1/customers/123/bookings?date_from=2026-01-01&date_to=2026-03-31" \
-H "Authorization: Bearer YOUR_API_KEY"

Use Casesโ€‹

Display Customer Historyโ€‹

Show a customer's complete rental/booking history in your CRM or customer portal.

Loyalty Programsโ€‹

Analyze booking patterns to identify frequent customers for loyalty rewards.

Support Contextโ€‹

Quickly access a customer's booking history when handling support inquiries.