How do I manage services with the Amelia API
Use the services endpoints to create and manage bookable services, update details and status, reorder services, check delete impact, and retrieve service lists.
You can review all endpoints and examples in the Amelia API Postman collection.
How do I add a service with the Amelia API?
Use this endpoint to create a new service and define its category, duration, capacity, price, and assigned employees.
- Method: POST
- Path:
/services
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
- name (
string); service name - categoryId (
integer); category ID the service belongs to - providers (
array); array of employee IDs assigned to the service - duration (
integer); service duration in seconds - minCapacity (
integer); minimum capacity - maxCapacity (
integer); maximum capacity - price (
float); service price
Other properties
- color (
string); hex color, default#1788FB - description (
string); service description - extras (
array); array of extras - pictureFullPath (
string); full image path - pictureThumbPath (
string); thumbnail image path - customPricing (
string); JSON encoded custom pricing rules - timeBefore (
integer); buffer time before the service in seconds - timeAfter (
integer); buffer time after the service in seconds - bringingAnyone (
boolean); allow additional people, defaultfalse - show (
boolean); show on booking form, defaultfalse - gallery (
array); service gallery image paths - aggregatedPrice (
boolean); multiply price by persons, defaultfalse - settings (
string); JSON encoded service settings, defaultnulluses general settings - recurringCycle (
string); recurring type, possible values:disabled,all,daily,weekly,monthly - recurringSub (
string); suggested alternatives, possible values:disabled,past,future,both - recurringPayment (
integer); payment rule,0first only,999all, default0 - position (
integer); sorting position - deposit (
float); deposit amount, default0 - depositPayment (
string); deposit type:disabled,fixed,percentage - depositPerPerson (
boolean); multiply deposit by persons, defaultfalse - fullPayment (
boolean); allow full payment when deposit is enabled, defaultfalse - translations (
string); JSON encoded translation for name and description - minSelectedExtras (
integer); minimum extras to choose - mandatoryExtra (
boolean); require selecting an extra, defaultfalse - maxExtraPeople (
integer); maximum additional people a customer can bring - limitPerCustomer (
string); JSON encoded rules limiting appointments per customer
Example
Request
curl --location 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/services' \
--header 'Content-Type: application/json' \
--header 'Amelia: YOUR_API_KEY' \
--data '{
"categoryId": 4,
"color": "#1788FB",
"description": "A focused 30-minute consultation for first-time clients.",
"duration": 1800,
"providers": [3],
"extras": [
{
"description": "Add a deep conditioning treatment.",
"descriptionHTML": "",
"duration": 900,
"maxQuantity": 1,
"name": "Deep conditioning",
"position": 1,
"price": 10,
"serviceId": 0,
"translations": null
}
],
"maxCapacity": 1,
"minCapacity": 1,
"name": "Initial consultation",
"pictureFullPath": "",
"pictureThumbPath": "",
"price": 35,
"customPricing": "{\"enabled\": false, \"durations\": []}",
"status": "visible",
"bringingAnyone": false,
"show": true,
"gallery": [],
"aggregatedPrice": false,
"settings": "{\"payments\":{\"paymentLinks\":{\"enabled\":true,\"changeBookingStatus\":false,\"redirectUrl\":null},\"onSite\":true,\"payPal\":{\"enabled\":false},\"stripe\":{\"enabled\":false},\"mollie\":{\"enabled\":false},\"razorpay\":{\"enabled\":false}},\"zoom\":{\"enabled\":true},\"lessonSpace\":{\"enabled\":false}}",
"recurringCycle": "disabled",
"recurringSub": "future",
"recurringPayment": 0,
"position": 9,
"deposit": 0,
"depositPayment": "disabled",
"depositPerPerson": false,
"fullPayment": false,
"translations": null,
"minSelectedExtras": null,
"mandatoryExtra": false,
"maxExtraPeople": null,
"limitPerCustomer": "{\"enabled\": false, \"numberOfApp\": 1, \"timeFrame\": \"day\", \"period\": 1, \"from\": \"bookingDate\"}"
}'
Response
{
"message": "Successfully added new service.",
"data": {
"service": {
"id": 24,
"name": "Initial consultation",
"description": "A focused 30-minute consultation for first-time clients.",
"color": "#1788FB",
"price": 35,
"deposit": 0,
"depositPayment": "disabled",
"depositPerPerson": false,
"pictureFullPath": null,
"pictureThumbPath": null,
"extras": [
{
"id": 18,
"name": "Deep conditioning",
"description": "Add a deep conditioning treatment.",
"price": 10,
"maxQuantity": 1,
"position": 1,
"duration": 900,
"serviceId": 24,
"aggregatedPrice": null,
"translations": null
}
],
"coupons": [],
"position": 1,
"settings": "{\"payments\":{\"paymentLinks\":{\"enabled\":true,\"changeBookingStatus\":false,\"redirectUrl\":null},\"onSite\":true,\"payPal\":{\"enabled\":false},\"stripe\":{\"enabled\":false},\"mollie\":{\"enabled\":false},\"razorpay\":{\"enabled\":false}},\"zoom\":{\"enabled\":true},\"lessonSpace\":{\"enabled\":false}}",
"fullPayment": false,
"minCapacity": 1,
"maxCapacity": 1,
"duration": 1800,
"timeBefore": null,
"timeAfter": null,
"bringingAnyone": false,
"show": true,
"aggregatedPrice": false,
"status": "visible",
"categoryId": 4,
"category": null,
"priority": [],
"gallery": [],
"recurringCycle": "disabled",
"recurringSub": "future",
"recurringPayment": 0,
"translations": null,
"minSelectedExtras": null,
"mandatoryExtra": false,
"customPricing": "{\"enabled\": false, \"durations\": []}",
"maxExtraPeople": null,
"limitPerCustomer": "{\"enabled\": false, \"numberOfApp\": 1, \"timeFrame\": \"day\", \"period\": 1, \"from\": \"bookingDate\"}"
}
}
}
How do I update a service with the Amelia API?
Use this endpoint to update service details by sending only the properties you want to change. If you update pricing and want employee-level pricing to update as well, include applyGlobally.
- Method: POST
- Path:
/services/{{service_id}}
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.
Optional properties
- name (
string); service name - categoryId (
integer); category ID - providers (
array); employee IDs - duration (
integer); duration in seconds - minCapacity (
integer); minimum capacity - maxCapacity (
integer); maximum capacity - price (
float); service price - applyGlobally (
boolean); update employees’ pricing as well, defaultfalse - color (
string); hex color - description (
string); description - extras (
array); extras array - pictureFullPath (
string); image path - pictureThumbPath (
string); thumb path - customPricing (
string); JSON encoded custom pricing rules - timeBefore (
integer); buffer time before in seconds - timeAfter (
integer); buffer time after in seconds - bringingAnyone (
boolean); allow additional people - show (
boolean); visible on booking form - gallery (
array); gallery image paths - aggregatedPrice (
boolean); price multiplied by persons - settings (
string); JSON encoded service settings - recurringCycle (
string);disabled,all,daily,weekly,monthly - recurringSub (
string);disabled,past,future,both - recurringPayment (
integer);0first only,999all - position (
integer); sorting position - deposit (
float); deposit amount - depositPayment (
string);disabled,fixed,percentage - depositPerPerson (
boolean); multiply deposit by persons - fullPayment (
boolean); allow full payment - translations (
string); JSON encoded translation - minSelectedExtras (
integer); minimum extras - mandatoryExtra (
boolean); require extra - maxExtraPeople (
integer); max additional people - limitPerCustomer (
string); JSON encoded per-customer limits
Example
Request
curl --location 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/services/12' \
--header 'Content-Type: application/json' \
--header 'Amelia: YOUR_API_KEY' \
--data '{
"name": "Initial consultation plus",
"description": "A 45-minute consultation for clients who want extra time.",
"duration": 2700,
"applyGlobally": false
}'
Response
{
"message": "Successfully updated service.",
"data": {
"service": {
"id": 12,
"name": "Initial consultation plus",
"description": "A 45-minute consultation for clients who want extra time.",
"color": "#1788FB",
"price": 0,
"deposit": 0,
"depositPayment": "disabled",
"depositPerPerson": true,
"pictureFullPath": null,
"pictureThumbPath": null,
"extras": [
{
"id": 11,
"name": "Deep conditioning",
"description": "Add a deep conditioning treatment.",
"price": 10,
"maxQuantity": 1,
"position": 1,
"duration": 900,
"serviceId": 12,
"aggregatedPrice": null,
"translations": null
}
],
"coupons": [],
"position": 9,
"settings": "{\"payments\":{\"paymentLinks\":{\"enabled\":true,\"changeBookingStatus\":false,\"redirectUrl\":null},\"onSite\":true,\"payPal\":{\"enabled\":false},\"stripe\":{\"enabled\":false},\"mollie\":{\"enabled\":false},\"razorpay\":{\"enabled\":false}},\"zoom\":{\"enabled\":true},\"lessonSpace\":{\"enabled\":false}}",
"fullPayment": false,
"minCapacity": 1,
"maxCapacity": 1,
"duration": 2700,
"timeBefore": null,
"timeAfter": null,
"bringingAnyone": true,
"show": true,
"aggregatedPrice": true,
"status": "visible",
"categoryId": 4,
"category": null,
"priority": [],
"gallery": [],
"recurringCycle": "disabled",
"recurringSub": "future",
"recurringPayment": 0,
"translations": null,
"minSelectedExtras": null,
"mandatoryExtra": false,
"customPricing": "{\"enabled\": false, \"durations\": []}",
"maxExtraPeople": null,
"limitPerCustomer": "{\"enabled\": false, \"numberOfApp\": 1, \"timeFrame\": \"day\", \"period\": 1, \"from\": \"bookingDate\"}"
}
}
}
How do I update a service status with the Amelia API?
Use this endpoint to update the visibility or availability state of a service.
- Method: POST
- Path:
/services/status/{{service_id}}
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
- status (
string); new service status, possible values:visible,hidden,disabled
Example
Request
curl --location 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/services/status/12' \
--header 'Content-Type: application/json' \
--header 'Amelia: YOUR_API_KEY' \
--data '{
"status": "visible"
}'
Response
{
"message": "Successfully updated service",
"data": true
}
How do I update service positions with the Amelia API?
Use this endpoint to update service sorting, including custom ordering based on a provided list of service IDs.
- Method: POST
- Path:
/services/positions
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
- sorting (
string); sorting type, possible values:custom,priceAsc,priceDesc,nameAsc,nameDesc - services (
array); array of service IDs in the intended order, used when sorting iscustom
Example
Request
curl --location 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/services/positions' \
--header 'Content-Type: application/json' \
--header 'Amelia: YOUR_API_KEY' \
--data '{
"services": [
{"id": 4},
{"id": 12}
],
"sorting": "custom"
}'
Response
{
"message": "Successfully updated bookable services positions.",
"data": null
}
How do I retrieve a service with the Amelia API?
Use this endpoint to retrieve full service details, including extras and additional information related to future appointments.
- Method: GET
- Path:
/services/{{service_id}}
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.
Example
Request
curl --location 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/services/12' \
--header 'Amelia: YOUR_API_KEY'
Response
{
"message": "Successfully retrieved service.",
"data": {
"service": {
"id": 12,
"name": "Initial consultation plus",
"description": "A 45-minute consultation for clients who want extra time.",
"color": "#1788FB",
"price": 0,
"deposit": 0,
"depositPayment": "disabled",
"depositPerPerson": true,
"pictureFullPath": null,
"pictureThumbPath": null,
"extras": [
{
"id": 10,
"name": "Deep conditioning",
"description": "Add a deep conditioning treatment.",
"price": 10,
"maxQuantity": 1,
"position": 1,
"duration": 900,
"serviceId": null,
"aggregatedPrice": false,
"translations": null
}
],
"coupons": [],
"position": 9,
"settings": "{\"payments\":{\"paymentLinks\":{\"enabled\":true,\"changeBookingStatus\":false,\"redirectUrl\":null},\"onSite\":true,\"payPal\":{\"enabled\":false},\"stripe\":{\"enabled\":false},\"mollie\":{\"enabled\":false},\"razorpay\":{\"enabled\":false}},\"zoom\":{\"enabled\":true},\"lessonSpace\":{\"enabled\":false}}",
"fullPayment": false,
"minCapacity": 1,
"maxCapacity": 1,
"duration": 2700,
"timeBefore": null,
"timeAfter": null,
"bringingAnyone": true,
"show": true,
"aggregatedPrice": true,
"status": "visible",
"categoryId": 2,
"category": null,
"priority": [],
"gallery": [],
"recurringCycle": "disabled",
"recurringSub": "future",
"recurringPayment": 0,
"translations": null,
"minSelectedExtras": null,
"mandatoryExtra": false,
"customPricing": "{\"enabled\":false,\"durations\":{}}",
"maxExtraPeople": null,
"limitPerCustomer": "{\"enabled\":false,\"numberOfApp\":1,\"timeFrame\":\"day\",\"period\":1,\"from\":\"bookingDate\"}"
},
"futureAppointmentsProvidersIds": []
}
}
How do I check whether a service can be deleted safely with the Amelia API?
Use this endpoint to check whether a service has future appointments that would prevent safe deletion.
- Method: GET
- Path:
/services/effect/{{service_id}}
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.
Example
Request
curl --location 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/services/effect/12' \
--header 'Amelia: YOUR_API_KEY'
Response
{
"message": "Successfully retrieved message.",
"data": {
"valid": false,
"message": "Could not delete service.\nThis service has 20 appointments in the future."
}
}
How do I retrieve services with the Amelia API?
Use this endpoint to retrieve a list of services, optionally filtered by category and paginated by page number.
- Method: GET
- Path:
/services
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.
Optional query parameters
- page (
integer); page number - categoryId (
integer); return services from a specific category
Example
Request
curl --location 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/services&page=1&categoryId=2' \
--header 'Amelia: YOUR_API_KEY'
Response
{
"message": "Successfully retrieved services.",
"data": {
"services": [
{
"id": 15,
"name": "Deep tissue massage",
"description": "A 60-minute massage focused on releasing muscle tension.",
"color": "#1788FB",
"price": 90,
"deposit": 0,
"depositPayment": "disabled",
"depositPerPerson": true,
"pictureFullPath": null,
"pictureThumbPath": null,
"extras": [],
"coupons": [],
"position": 3,
"settings": "{\"payments\":{\"payPal\":{\"enabled\":false},\"razorpay\":{\"enabled\":false},\"mollie\":{\"enabled\":true},\"paymentLinks\":{\"enabled\":true,\"changeBookingStatus\":false,\"redirectUrl\":null},\"onSite\":true,\"stripe\":{\"enabled\":false}},\"zoom\":{\"enabled\":true},\"lessonSpace\":{\"enabled\":false},\"activation\":{\"version\":\"6.6\"}}",
"fullPayment": false,
"minCapacity": 1,
"maxCapacity": 1,
"duration": 3600,
"timeBefore": null,
"timeAfter": null,
"bringingAnyone": true,
"show": true,
"aggregatedPrice": true,
"status": "visible",
"categoryId": 2,
"category": null,
"priority": "least_expensive",
"gallery": [],
"recurringCycle": "disabled",
"recurringSub": "future",
"recurringPayment": 0,
"translations": null,
"minSelectedExtras": null,
"mandatoryExtra": false,
"customPricing": "{\"enabled\":true,\"durations\":{\"1800\":{\"price\":55,\"rules\":[]},\"5400\":{\"price\":120,\"rules\":[]}}}",
"maxExtraPeople": null,
"limitPerCustomer": "{\"enabled\":false,\"numberOfApp\":1,\"timeFrame\":\"day\",\"period\":1,\"from\":\"bookingDate\"}"
}
],
"countFiltered": 4,
"countTotal": 18
}
}
How do I delete a service with the Amelia API?
Use this endpoint to delete a service.
- Method: POST
- Path:
/services/delete/{{service_id}}
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.
Example
Request
curl --location --request POST 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/services/delete/12' \
--header 'Amelia: YOUR_API_KEY'
Response
{
"message": "Successfully deleted service.",
"data": []
}