{ "status": "error", "error": { "code": "invalid_request", "message": "Invalid input data", "details": { "service_id": "The specified service does not exist", "start_time": "Invalid time format, use HH:MM", "customer.email": "Invalid email" } }}
Bookings
Create Booking
Creates a new booking in the LatePoint system with automatic availability validation.
POST
/
wp-json
/
latepoint-api
/
v1
/
bookings
Copy
{ "status": "error", "error": { "code": "invalid_request", "message": "Invalid input data", "details": { "service_id": "The specified service does not exist", "start_time": "Invalid time format, use HH:MM", "customer.email": "Invalid email" } }}
This endpoint allows you to create a new booking in your LatePoint system. It includes automatic availability validation, creation of new customers if necessary, and application of configured business rules.
{ "status": "error", "error": { "code": "invalid_request", "message": "Invalid input data", "details": { "service_id": "The specified service does not exist", "start_time": "Invalid time format, use HH:MM", "customer.email": "Invalid email" } }}
Existing vs New Customer: If you provide customer_id, all customer fields are ignored. If you don’t provide customer_id, the first_name, last_name and email fields are required.
Availability Check: Always verify availability using the /availability endpoint before creating a booking to avoid conflicts.
Booking Codes: Booking codes are automatically generated following the pattern LP-YYYY-NNN where YYYY is the year and NNN is a sequential number.