Skip to main content
POST
Create Customer

Description

This endpoint allows you to create a new customer in the LatePoint system. You can provide basic or complete customer information, including contact details, address, preferences, and custom fields.

Authentication

string
required
Your LatePoint API Key with write permissions

Request Body

Required Fields

string
required
Customer’s first nameValidations:
  • Minimum 2 characters
  • Maximum 50 characters
  • Only letters, spaces, and hyphens
string
required
Customer’s last nameValidations:
  • Minimum 2 characters
  • Maximum 50 characters
  • Only letters, spaces, and hyphens

Optional Fields

string
Customer’s email (optional for API, must be unique if provided)Validations:
  • Valid email format
  • Unique in the system
  • Maximum 100 characters
Email is optional when creating customers via API. However, if you provide an email, it must be valid and unique.
string
Customer’s phone numberValidations:
  • Valid phone format
  • Can include country code
  • Maximum 20 characters
string
default:"active"
Initial customer statusPossible values:
  • active - Active customer (default)
  • inactive - Inactive customer
  • pending - Pending verification
string
Customer’s date of birth (format: YYYY-MM-DD)
string
Customer’s genderPossible values:
  • male - Male
  • female - Female
  • other - Other
  • prefer_not_to_say - Prefer not to say

Address Information

string
Customer’s street address
string
Customer’s city
string
Customer’s state or province
string
Customer’s ZIP or postal code
string
Customer’s country

Custom Fields

object
Custom fields defined in your configurationExample:
string
Additional notes about the customerValidations:
  • Maximum 1000 characters

Additional Information

boolean
default:"false"
Whether the customer is a guest (no account)
integer
Associated WordPress user ID (if applicable)

Response

Successful Response (201 Created)

string
Response status (“success”)
string
Confirmation message
object
Created customer information

Examples

Basic Customer

Complete Customer with Address

Customer Without Email (API Only)

This example shows how to create a customer without an email address, which is only possible via API.

Create Customer from Web Form

Example Response

Customer Created Successfully

Error Codes

Automatic Validations

Data Validations

  1. First and Last Name:
    • Minimum 2 characters, maximum 50
    • Only letters, spaces, hyphens and apostrophes
    • Extra spaces are automatically removed
  2. Email:
    • Valid email format
    • Unique in the system
    • Automatically converted to lowercase
    • Maximum 100 characters
  3. Phone:
    • Valid format (can include country code)
    • Spaces and special characters are normalized
    • Maximum 20 characters
  4. Date of Birth:
    • YYYY-MM-DD format
    • Cannot be future date
    • Configurable minimum age (default 13 years)

Business Validations

  1. References:
    • Agent, location and service IDs must exist and be active
    • Time slot preferences must be valid
  2. Custom Fields:
    • Must match defined configuration
    • Specific validations according to field type
  3. Address:
    • Country code must be valid (ISO 3166-1 alpha-2)
    • Postal code must match country format

1. Pre-validation

2. Create Customer

3. Post-Creation Handling

Common Use Cases

1. Quick Registration during Booking

2. Full Registration with Account

3. Bulk Customer Import

Best Practices

1. Client-Side Validation

2. Robust Error Handling

3. Performance Optimization

Important Notes

Unique Email: The email must be unique throughout the system. If you try to create a customer with an existing email, you will receive a 409 error.
Custom Fields: Custom fields must be previously configured in your LatePoint installation to be accepted.
Rate Limiting: Respect API rate limits, especially when creating multiple customers. Implement pauses between requests.
WordPress User: If you create an associated WordPress user, the customer will be able to access the customer area and manage their bookings.