Create Multiple Bookings
Bookings
Create Multiple Bookings
Creates multiple bookings in a single request with automatic availability validation and error handling.
POST
Create Multiple Bookings
Description
This endpoint allows you to create multiple bookings at once in your LatePoint system. It includes automatic availability validation for all bookings, creation of new customers if necessary, and comprehensive error handling for partial failures. Key Features:- Create up to 50 bookings in a single request
- Automatic availability validation for all bookings before creation
- Support for both existing and new customers
- Partial success handling (some bookings may succeed while others fail)
- Detailed error reporting for each failed booking
- Optional confirmation email sending
Authentication
Your LatePoint API key. You can get it from the admin panel.
Request Body
Required Fields
Array of booking objects to create (maximum 50 bookings per request)
Booking Object Structure
Each booking object in thebookings array must contain:
ID of the service to book
ID of the agent who will provide the service. Use “any” or “-1” for automatic agent assignment based on availability
Booking date (format: YYYY-MM-DD)
Start time (format: HH:MM in 24-hour format)
Customer Information (per booking)
ID of an existing customer. If provided, new customer fields are ignored
Customer first name (required if customer_id is not provided)
Customer last name (required if customer_id is not provided)
Customer email (required if customer_id is not provided)
Customer phone number
Optional Fields (per booking)
ID of the location where the service will be provided. If not specified, the default location will be used
Duration of the booking in minutes. If not provided, the service’s default duration will be used
Booking status. Defaults to ‘approved’
Additional notes for the booking
Global Options
Whether to send confirmation emails for successfully created bookings. Defaults to false
Request Example
Response Format
The response includes detailed information about the success and failure of each booking creation:Success Response (201 Created)
Partial Success Response (207 Multi-Status)
Error Response (400 Bad Request)
Response Status Codes
- 201 Created: All bookings were created successfully
- 207 Multi-Status: Some bookings were created successfully, others failed
- 400 Bad Request: All bookings failed or invalid request format
- 503 Service Unavailable: LatePoint is not available
Error Handling
The endpoint uses a two-phase approach:- Validation Phase: All bookings are validated for required fields and availability
- Creation Phase: Only validated bookings are created
- No partial data corruption occurs
- Clear error reporting for each failed booking
- Successful bookings are not affected by failed ones
Usage Examples
cURL Example
Limitations
- Maximum 50 bookings per request
- Each booking must pass availability validation
- Customer email must be unique when creating new customers
- All standard LatePoint business rules apply to each booking
Integration Notes
This endpoint is perfect for:- Importing bookings from external systems
- Creating recurring appointments
- Batch booking operations
- Integration with calendar systems
POST /bookings endpoint for better performance.