List Bookings
curl --request GET \
--url https://api.example.com/wp-json/latepoint-api/v1/bookings \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://api.example.com/wp-json/latepoint-api/v1/bookings"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://api.example.com/wp-json/latepoint-api/v1/bookings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/wp-json/latepoint-api/v1/bookings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/wp-json/latepoint-api/v1/bookings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/wp-json/latepoint-api/v1/bookings")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/wp-json/latepoint-api/v1/bookings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"id": 123,
"booking_code": "<string>",
"status": "<string>",
"start_date": "<string>",
"start_time": "<string>",
"end_time": "<string>",
"duration": 123,
"price": "<string>",
"customer": {
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>"
},
"payment_status": "<string>",
"agent": {
"id": "<string>",
"full_name": "<string>",
"email": "<string>",
"phone": "<string>"
},
"service": [
{}
],
"location": {
"id": "<string>",
"name": "<string>",
"full_address": "<string>",
"category": [
{}
]
},
"total_attendees": 123,
"notes": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
],
"pagination": {
"page": 123,
"per_page": 123,
"total": 123,
"total_pages": 123,
"has_next_page": true,
"has_previous_page": true
}
}Bookings
List Bookings
Retrieves a paginated list of all bookings with filtering and search options.
GET
/
wp-json
/
latepoint-api
/
v1
/
bookings
List Bookings
curl --request GET \
--url https://api.example.com/wp-json/latepoint-api/v1/bookings \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://api.example.com/wp-json/latepoint-api/v1/bookings"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://api.example.com/wp-json/latepoint-api/v1/bookings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/wp-json/latepoint-api/v1/bookings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/wp-json/latepoint-api/v1/bookings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/wp-json/latepoint-api/v1/bookings")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/wp-json/latepoint-api/v1/bookings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"id": 123,
"booking_code": "<string>",
"status": "<string>",
"start_date": "<string>",
"start_time": "<string>",
"end_time": "<string>",
"duration": 123,
"price": "<string>",
"customer": {
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>"
},
"payment_status": "<string>",
"agent": {
"id": "<string>",
"full_name": "<string>",
"email": "<string>",
"phone": "<string>"
},
"service": [
{}
],
"location": {
"id": "<string>",
"name": "<string>",
"full_address": "<string>",
"category": [
{}
]
},
"total_attendees": 123,
"notes": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
],
"pagination": {
"page": 123,
"per_page": 123,
"total": 123,
"total_pages": 123,
"has_next_page": true,
"has_previous_page": true
}
}Description
This endpoint allows you to retrieve a list of all bookings in your LatePoint system. It includes advanced filtering, search, and pagination options to efficiently handle large volumes of data.Authentication
string
required
Your LatePoint API key. You can get it from the admin panel.
Query Parameters
Pagination
integer
default:"1"
Page number for pagination
integer
default:"20"
Number of bookings per page (max 100)
Basic Filters
string
Filter by booking status (pending, confirmed, cancelled, completed)
integer
Filter by customer ID
integer
Filter by agent ID
integer
Filter by service ID
integer
Filter by location ID
Date Filters
string
Filter bookings from this date (YYYY-MM-DD format)
string
Filter bookings until this date (YYYY-MM-DD format)
string
Filter by creation date from (YYYY-MM-DD format)
string
Filter by creation date until (YYYY-MM-DD format)
Dynamic Filters
string
Filter by booking code (partial match supported)
string
Filter by payment status
integer
Filter bookings with minimum duration (in minutes)
integer
Filter bookings with maximum duration (in minutes)
number
Filter bookings with minimum price
number
Filter bookings with maximum price
string
Filter by customer email (partial match supported)
string
Filter by customer phone (partial match supported)
Metadata Filters
boolean
default:"false"
Include booking metadata in response
string
Filter by specific metadata key (requires meta_value)
string
Filter by metadata value (requires meta_key, partial match supported)
Search and Sorting
string
Search in customer name, email, or booking code
string
default:"start_date"
Sort field (start_date, created_at, customer_name, status, id)
string
default:"desc"
Sort order (asc, desc)
Response
boolean
Always
true on successarray
Array of booking objects
Show Booking Structure
Show Booking Structure
integer
Unique booking ID
string
Unique booking code
string
Current booking status
string
Start date (YYYY-MM-DD)
string
Start time (HH:MM)
string
End time (HH:MM)
integer
Duration in minutes
string
Total booking price
object
string
Payment status of the booking
object
array
Service information (empty array if no service assigned)
object
integer
Total number of attendees for the booking
string
Additional booking notes
string
Creation date and time (ISO 8601)
string
Last update date and time (ISO 8601)
object
Examples
Basic Request
curl -X GET "https://your-site.com/wp-json/latepoint-api/v1/bookings" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://your-site.com/wp-json/latepoint-api/v1/bookings', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get(
'https://your-site.com/wp-json/latepoint-api/v1/bookings',
headers={'X-API-Key': 'YOUR_API_KEY'}
)
print(response.json())
Filter by Status and Date
curl -X GET "https://your-site.com/wp-json/latepoint-api/v1/bookings?status=approved&date_from=2024-01-01&date_to=2024-01-31" \
-H "X-API-Key: YOUR_API_KEY"
const params = new URLSearchParams({
status: 'approved',
date_from: '2024-01-01',
date_to: '2024-01-31'
});
const response = await fetch(`https://your-site.com/wp-json/latepoint-api/v1/bookings?${params}`, {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
Search by Customer Name or Code
curl -X GET "https://your-site.com/wp-json/latepoint-api/v1/bookings?search=john&sort=start_date&order=asc" \
-H "X-API-Key: YOUR_API_KEY"
Example Response
{
"success": true,
"data": [
{
"id": 55,
"booking_code": "M3DELUX",
"status": "approved",
"start_date": "2026-04-29",
"start_time": "13:00",
"end_time": "14:00",
"duration": 60,
"price": "23.00",
"payment_status": "",
"customer": {
"id": 2,
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone": "+11111111111"
},
"agent": {
"id": "1",
"full_name": "Pao Campo",
"email": "pao@example.com",
"phone": ""
},
"service": [],
"location": {
"id": "1",
"name": "Main Location",
"full_address": "",
"category": []
},
"notes": "",
"created_at": "2026-04-26 06:14:48",
"updated_at": "2026-04-26 06:14:48",
"total_attendees": 1
}
],
"pagination": {
"page": 1,
"per_page": 20,
"total": 21,
"total_pages": 2,
"has_next_page": true,
"has_previous_page": false
}
}
Error Responses
Error 401 - Unauthorized
{
"code": "rest_forbidden",
"message": "Unauthorized",
"data": { "status": 401 }
}
Error 503 - LatePoint not available
{
"code": "latepoint_not_available",
"message": "LatePoint is not available or has not loaded correctly",
"data": { "status": 503 }
}
Important Notes
Performance: For better performance, use specific filters instead of fetching all bookings and filtering on the client side.
Rate Limiting: This endpoint is subject to rate limiting. Check response headers to monitor your usage.
Pagination: To get all bookings, use the
has_next_page field in the response to determine if more pages are available.Common Use Cases
1. Today’s Bookings Dashboard
// Get today's bookings sorted by start time
const today = new Date().toISOString().split('T')[0];
const response = await fetch(`/wp-json/latepoint-api/v1/bookings?date_from=${today}&date_to=${today}&sort=start_date&order=asc`, {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
if (data.success) console.log(data.data);
2. Customer History
// Get all bookings for a specific customer
const response = await fetch(`/wp-json/latepoint-api/v1/bookings?customer_id=45&sort=start_date&order=desc`, {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
if (data.success) console.log(data.data);
3. Monthly Report
// Get current month's bookings
const firstDay = new Date(new Date().getFullYear(), new Date().getMonth(), 1).toISOString().split('T')[0];
const lastDay = new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toISOString().split('T')[0];
const response = await fetch(`/wp-json/latepoint-api/v1/bookings?date_from=${firstDay}&date_to=${lastDay}&status=approved`, {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
if (data.success) {
console.log(`Total bookings: ${data.pagination.total}`);
console.log(data.data);
}
