Skip to main content
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

string
required
Your LatePoint API key. You can get it from the admin panel.

Request Body

Required Fields

array
required
Array of booking objects to create (maximum 50 bookings per request)

Booking Object Structure

Each booking object in the bookings array must contain:
integer
required
ID of the service to book
integer|string
required
ID of the agent who will provide the service. Use “any” or “-1” for automatic agent assignment based on availability
string
required
Booking date (format: YYYY-MM-DD)
string
required
Start time (format: HH:MM in 24-hour format)

Customer Information (per booking)

integer
ID of an existing customer. If provided, new customer fields are ignored
string
Customer first name (required if customer_id is not provided)
string
Customer last name (required if customer_id is not provided)
string
Customer email (required if customer_id is not provided)
string
Customer phone number

Optional Fields (per booking)

integer
ID of the location where the service will be provided. If not specified, the default location will be used
integer
Duration of the booking in minutes. If not provided, the service’s default duration will be used
string
Booking status. Defaults to ‘approved’
string
Additional notes for the booking

Global Options

boolean
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:
  1. Validation Phase: All bookings are validated for required fields and availability
  2. Creation Phase: Only validated bookings are created
This ensures that:
  • 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
For single booking creation, use the standard POST /bookings endpoint for better performance.