How do Amelia API timeslots endpoints work
Use the timeslots endpoint to retrieve available booking timeslots for a service based on duration, number of persons, and optional filters like employees, location, extras, and rescheduling rules.
You can find more API examples in the Amelia API Postman collection you can download here.
API endpoints are available only in Elite license plans. Using the API requires coding skills and is not covered by standard plugin support.
How do I call the get timeslots endpoint?
Use this endpoint to retrieve available timeslots for a specific service configuration.
- Method: GET
- Path:
/slots
Base path
{{your_site_URL}}/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1
Authorization
- All Amelia endpoints use API key authorization via a request header named Amelia.
Required properties
- serviceId (
integer); service ID - serviceDuration (
integer); service duration in seconds - persons (
integer); number of persons
Other properties
- providerIds (
array); array of employee IDs - locationId (
integer); location ID - startDateTime (
string); from which date to retrieve timeslots, string in datetime formatYYYY-MM-DD HH:mm - excludeAppointmentId (
integer); do not include this appointment ID in the timeslot calculation, used when an appointment is being rescheduled - extras (
array); an array of extras, since they can affect the timeslots
Example
Request
curl --location 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/slots&locationId=2&serviceId=3&serviceDuration=1800&providerIds=3&persons=1&startDateTime=2026-02-10%2009:00&extras=[]&excludeAppointmentId=null' \
--header 'Amelia: YOUR_API_KEY'
Response
{
"message": "Successfully retrieved free slots",
"data": {
"minimum": "2026-02-10 09:00",
"maximum": "2026-04-10 09:00",
"slots": {
"2026-03-02": {
"08:30": [[3, 2]],
"09:00": [[3, 2]],
"09:30": [[3, 2]],
"10:00": [[3, 2]],
"10:30": [[3, 2]],
"11:00": [[3, 2]]
},
"2026-03-09": {
"07:00": [[3, 2]],
"07:30": [[3, 2]],
"08:00": [[3, 2]],
"08:30": [[3, 2]]
},
"2026-03-16": {
"07:00": [[3, 2]],
"07:30": [[3, 2]],
"08:00": [[3, 2]],
"08:30": [[3, 2]]
}
},
"occupied": {
"2026-02-12": {
"07:00": [[3, 4, 0, 6]],
"08:00": [[3, 4, 0, 6]],
"09:30": [[3, 4, 0, 2]],
"11:30": [[3, 4, 0, 6]]
},
"2026-02-26": {
"13:00": [[3, 1, 0, 2]]
},
"2026-03-02": {
"07:30": [[3, 1, 0, 1]]
}
},
"busyness": {
"2026-03-02": 7,
"2026-03-09": 0,
"2026-03-16": 0
},
"lastProvider": null
}
}