How do I manage extras with the Amelia API
Use the extras endpoints to create and manage optional add-ons for services, including pricing, duration, quantity limits, translations, and per-person pricing rules.
You can review all endpoints and examples in the Amelia API Postman collection.
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 add an extra with the Amelia API?
Use this endpoint to create a new extra and attach it to a service.
- Method: POST
- Path:
/extras
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); extra name - price (
float); extra price - serviceId (
integer); service ID this extra belongs to
Other properties
- duration (
integer); duration in seconds - description (
string); extra description - maxQuantity (
integer); maximum quantity, default1 - position (
integer); sorting position, default1 - translations (
string); JSON encoded translations - aggregatedPrice (
boolean); multiply price by persons, defaultfalse
Example
Request
curl --location 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/extras' \
--header 'Content-Type: application/json' \
--header 'Amelia: YOUR_API_KEY' \
--data '{
"name": "Deep conditioning",
"price": 20,
"duration": 1800,
"description": "Add a deep conditioning treatment to your service.",
"maxQuantity": 1,
"position": 1,
"translations": "{\"name\":{\"fr_FR\":\"Soin profond\"},\"description\":{\"fr_FR\":\"Ajoutez un soin profond à votre service.\",\"fr_FRHtml\":\"Ajoutez un soin profond à votre service.\"}}",
"aggregatedPrice": false,
"serviceId": 1
}'
Response
{
"message": "Successfully added new service extra.",
"data": {
"extra": {
"id": 25,
"name": "Deep conditioning",
"description": "Add a deep conditioning treatment to your service.",
"price": 20,
"maxQuantity": 1,
"position": 1,
"duration": 1800,
"serviceId": 1,
"aggregatedPrice": false,
"translations": "{\"name\":{\"fr_FR\":\"Soin profond\"},\"description\":{\"fr_FR\":\"Ajoutez un soin profond à votre service.\",\"fr_FRHtml\":\"Ajoutez un soin profond à votre service.\"}}"
}
}
}
How do I update an extra with the Amelia API?
Use this endpoint to update extra details by sending only the properties you want to change.
- Method: POST
- Path:
/extras/{{extra_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); extra name - price (
float); extra price - serviceId (
integer); service ID this extra belongs to - duration (
integer); duration in seconds - description (
string); description - maxQuantity (
integer); maximum quantity - position (
integer); sorting position - translations (
string); JSON encoded translations - aggregatedPrice (
boolean); multiply price by persons
Example
Request
curl --location 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/extras/25' \
--header 'Content-Type: application/json' \
--header 'Amelia: YOUR_API_KEY' \
--data '{
"name": "Deep conditioning plus",
"duration": 1800,
"price": 25,
"description": "Add a premium deep conditioning treatment to your service.",
"maxQuantity": 1,
"position": 1,
"translations": "{\"name\":{\"fr_FR\":\"Soin profond premium\"},\"description\":{\"fr_FR\":\"Ajoutez un soin profond premium à votre service.\",\"fr_FRHtml\":\"Ajoutez un soin profond premium à votre service.\"}}",
"aggregatedPrice": true,
"serviceId": 1
}'
Response
{
"message": "Successfully updated bookable extra.",
"data": {
"extra": {
"id": 25,
"name": "Deep conditioning plus",
"description": "Add a premium deep conditioning treatment to your service.",
"price": 25,
"maxQuantity": 1,
"position": 1,
"duration": 1800,
"serviceId": 1,
"aggregatedPrice": true,
"translations": "{\"name\":{\"fr_FR\":\"Soin profond premium\"},\"description\":{\"fr_FR\":\"Ajoutez un soin profond premium à votre service.\",\"fr_FRHtml\":\"Ajoutez un soin profond premium à votre service.\"}}"
}
}
}
How do I retrieve an extra with the Amelia API?
Use this endpoint to retrieve details for a single extra.
- Method: GET
- Path:
/extras/{{extra_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/extras/25' \
--header 'Amelia: YOUR_API_KEY'
Response
{
"message": "Successfully retrieved extra",
"data": {
"extra": {
"id": 25,
"name": "Deep conditioning plus",
"description": "Add a premium deep conditioning treatment to your service.",
"price": 25,
"maxQuantity": 1,
"position": 1,
"duration": 1800,
"serviceId": 1,
"aggregatedPrice": true,
"translations": "{\"name\":{\"fr_FR\":\"Soin profond premium\"},\"description\":{\"fr_FR\":\"Ajoutez un soin profond premium à votre service.\",\"fr_FRHtml\":\"Ajoutez un soin profond premium à votre service.\"}}"
}
}
}
How do I retrieve extras with the Amelia API?
Use this endpoint to retrieve a list of extras.
- Method: GET
- Path:
/extras
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/extras' \
--header 'Amelia: YOUR_API_KEY'
Response
{
"message": "Successfully retrieved extras.",
"data": {
"extras": [
{
"id": 5,
"name": "Aromatherapy",
"description": "Add aromatherapy oils during the session.",
"price": 20,
"maxQuantity": 1,
"position": 1,
"duration": null,
"serviceId": 6,
"aggregatedPrice": false,
"translations": null
},
{
"id": 6,
"name": "Hot stones",
"description": "Add hot stones to the treatment.",
"price": 0,
"maxQuantity": 3,
"position": 2,
"duration": 1800,
"serviceId": 6,
"aggregatedPrice": false,
"translations": null
},
{
"id": 25,
"name": "Deep conditioning plus",
"description": "Add a premium deep conditioning treatment to your service.",
"price": 25,
"maxQuantity": 1,
"position": 1,
"duration": 1800,
"serviceId": 1,
"aggregatedPrice": true,
"translations": "{\"name\":{\"fr_FR\":\"Soin profond premium\"},\"description\":{\"fr_FR\":\"Ajoutez un soin profond premium à votre service.\",\"fr_FRHtml\":\"Ajoutez un soin profond premium à votre service.\"}}"
}
]
}
}
How do I delete an extra with the Amelia API?
Use this endpoint to delete an extra.
- Method: POST
- Path:
/extras/delete/{{extra_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/extras/delete/25' \
--header 'Amelia: YOUR_API_KEY'
Response
{
"message": "Successfully deleted bookable extra.",
"data": {
"extra": {
"id": 25,
"name": "Deep conditioning plus",
"description": "Add a premium deep conditioning treatment to your service.",
"price": 25,
"maxQuantity": 1,
"position": 1,
"duration": 1800,
"serviceId": 1,
"aggregatedPrice": true,
"translations": "{\"name\":{\"fr_FR\":\"Soin profond premium\"},\"description\":{\"fr_FR\":\"Ajoutez un soin profond premium à votre service.\",\"fr_FRHtml\":\"Ajoutez un soin profond premium à votre service.\"}}"
}
}
}