Description
This endpoint returns all available information for a specific booking, including customer details, agent, service, location, and payment status.Authentication
Your LatePoint API Key with read permissions
Path Parameters
Unique ID of the booking to retrieve
Response
Successful Response (200 OK)
Response status (“success”)
Complete booking object
Show Complete Booking Structure
Show Complete Booking Structure
Unique booking ID
Unique booking code
Current booking statusPossible values:
pending
- Pendingapproved
- Approvedcancelled
- Cancelledcompleted
- Completedno_show
- No show
Start date (YYYY-MM-DD)
Start time (HH:MM)
End time (HH:MM)
Duration in minutes
Total booking price
Additional booking notes
Payment statusPossible values:
not_paid
- Not paidpartially_paid
- Partially paidpaid
- Paidrefunded
- Refunded
Creation date and time (ISO 8601)
Last update date and time (ISO 8601)
Examples
Basic Request
Copy
curl -X GET "http://latepoint-dev.local/wp-json/latepoint-api/v1/bookings/16" \
-H "X-API-Key: lp_n1k6BVf3h7JRyjXkWMSoXi0BBZYRaOLL4QohDPQJ" \
-H "Content-Type: application/json"
Example Response
Copy
{
"success": true,
"data": {
"id": "18",
"booking_code": "EUHJVNH",
"start_datetime": "2025-11-17T16:00:00-03:00",
"end_datetime": "2025-11-17T17:00:00-03:00",
"service_name": "test 1",
"duration": "60",
"customer_comment": null,
"status": "pending",
"start_date": "11/17/2025",
"start_time": "16:00",
"timezone": "America/Montevideo",
"agent": {
"id": "1",
"full_name": "Pao Campo",
"email": "pao@pao.com",
"phone": ""
},
"created_datetime": "2025-08-21T07:41:32+00:00",
"manage_booking_for_agent": "http://latepoint-dev.local/wp-admin/admin-post.php?action=latepoint_route_call&route_name=manage_booking_by_key__show&key=3d09aa7219f4c883f6a3f78e7662c977a5dd",
"manage_booking_for_customer": "http://latepoint-dev.local/wp-admin/admin-post.php?action=latepoint_route_call&route_name=manage_booking_by_key__show&key=2009d8e53283cca27ccf1345b53ffa38d881",
"customer": {
"id": "7",
"first_name": "Ana",
"last_name": "Lopez",
"full_name": "Ana Lopez",
"email": "ana.lopez@email.com",
"phone": "+525559876543"
},
"transactions": [],
"order": {
"id": "34",
"confirmation_code": "SCLRA23J",
"customer_comment": null,
"status": "open",
"fulfillment_status": "not_fulfilled",
"payment_status": "not_paid",
"source_id": null,
"source_url": "",
"total": "$0",
"subtotal": "$0",
"created_datetime": "2025-08-21T07:41:32+00:00"
},
"location": {
"id": "1",
"name": "Main Location",
"full_address": "",
"category": []
},
"service_extras": []
}
}
Error Codes
Copy
{
"status": "error",
"error": {
"code": "booking_not_found",
"message": "Booking with ID 123 was not found"
}
}
Common Use Cases
1. Display Booking Details
Copy
// To display complete details on a booking page
async function showBookingDetails(bookingId) {
try {
const response = await fetch(`/wp-json/latepoint-api/v1/bookings/${bookingId}`, {
headers: {
'X-API-Key': 'your_api_key',
'Content-Type': 'application/json'
}
});
if (response.ok) {
const result = await response.json();
const booking = result.data;
// Display information in the UI
document.getElementById('booking-code').textContent = booking.booking_code;
document.getElementById('customer-name').textContent = booking.customer.full_name;
document.getElementById('service-name').textContent = booking.service.name;
document.getElementById('appointment-date').textContent =
`${booking.start_date} ${booking.start_time}`;
}
} catch (error) {
console.error('Error fetching booking:', error);
}
}
2. Check Booking Status
Copy
// To verify the current status of a booking
async function checkBookingStatus(bookingId) {
const response = await fetch(`/wp-json/latepoint-api/v1/bookings/${bookingId}`);
const result = await response.json();
if (result.status === 'success') {
const status = result.data.status;
const paymentStatus = result.data.payment_status;
return {
booking_status: status,
payment_status: paymentStatus,
is_approved: status === 'approved',
is_paid: paymentStatus === 'paid'
};
}
return null;
}
3. Get Information for Confirmation Email
Copy
// To generate personalized confirmation emails
async function getBookingForEmail(bookingId) {
const response = await fetch(`/wp-json/latepoint-api/v1/bookings/${bookingId}`);
const result = await response.json();
if (result.status === 'success') {
const booking = result.data;
return {
customer_name: booking.customer.full_name,
customer_email: booking.customer.email,
service_name: booking.service.name,
agent_name: booking.agent.display_name,
appointment_datetime: `${booking.start_date} ${booking.start_time}`,
location_name: booking.location.name,
location_address: booking.location.full_address,
booking_code: booking.booking_code
};
}
return null;
}```
## Important Notes
<Note>
**Complete Information**: This endpoint returns all available booking information, including related customer, agent, service, and location data.
</Note>
<Warning>
**Permissions**: Make sure your API Key has permissions to access bookings. Some configurations may restrict access to specific bookings.
</Warning>
<Tip>
**Caching**: Consider implementing client-side caching for bookings that don't change frequently, especially for displaying details in user interfaces.
</Tip>
## Additional Information
The booking response includes all essential information needed for managing appointments, including customer details, agent information, service details, and location data.
## Integration with Other Endpoints
This endpoint complements perfectly with other API endpoints:
- **Update booking**: Use `PUT /bookings/{id}` after getting current data
- **Check availability**: Use `GET /availability` for schedule changes
- **Get customer**: Use `GET /customers/{id}` for additional customer information
- **List bookings**: Use `GET /bookings` for context of other customer bookings