How do I manage packages with the Amelia API
Use the packages endpoints to create and update packages, define included services, retrieve package lists, check delete impact, and delete packages.
You can review all endpoints and examples in the Amelia API Postman collection.
How do I add a package with the Amelia API?
Use this endpoint to create a new package, define its included services, and configure pricing and purchase rules.
- Method: POST
- Path:
/packages
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); package name - bookable (
array); array of included service objects, each object supportsservice,providers,locations,quantity,minimumScheduled,maximumScheduled,allowProviderSelection - price (
double); package price
Other properties
- status (
string); possible values:visible,hidden,disabled, defaultvisible - description (
string); package description - color (
string); hex color, default#1788FB - calculatedPrice (
boolean); calculate price from services, defaulttrue - discount (
double); package discount - gallery (
array); gallery image paths - pictureFullPath (
string); full image path - pictureThumbPath (
string); thumbnail image path - position (
integer); sorting position, default1 - settings (
string); JSON encoded package settings, default uses general settings - endDate (
string); purchase expiration inYYYY-MM-DD HH:mmformat - durationCount (
string); expiration duration count - durationType (
integer); expiration duration unit, possible values:day,week,month - translations (
string); JSON encoded translations - sharedCapacity (
boolean); shared capacity across services, defaultfalse - quantity (
integer); total quantity when sharedCapacity istrue - limitPerCustomer (
integer); JSON encoded limits per customer - descriptionHtml (
string); description in HTML - deposit (
double); deposit amount - depositPayment (
string); deposit type:disabled,fixed,percentage - fullPayment (
boolean); allow full payment instead of deposit only, defaultfalse
Example
Request
curl --location 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/packages' \
--header 'Content-Type: application/json' \
--header 'Amelia: YOUR_API_KEY' \
--data '{
"bookable": [
{
"service": { "id": 1 },
"providers": [],
"locations": [],
"quantity": 1,
"minimumScheduled": 0,
"maximumScheduled": 1,
"allowProviderSelection": true
},
{
"service": { "id": 4 },
"providers": [],
"locations": [],
"quantity": 1,
"minimumScheduled": 0,
"maximumScheduled": 1,
"allowProviderSelection": false
}
],
"color": "#1788FB",
"description": "A two-session package combining consultation and treatment at a discounted rate.",
"name": "Starter wellness package",
"pictureFullPath": "",
"pictureThumbPath": "",
"price": 55,
"calculatedPrice": false,
"discount": 0,
"status": "visible",
"gallery": [],
"position": 9,
"settings": "{\"payments\":{\"paymentLinks\":{\"enabled\":true,\"changeBookingStatus\":false,\"redirectUrl\":null},\"onSite\":true,\"payPal\":{\"enabled\":true},\"stripe\":{\"enabled\":false},\"mollie\":{\"enabled\":false},\"razorpay\":{\"enabled\":false}}}",
"endDate": "2026-06-30 23:59",
"durationCount": null,
"durationType": null,
"deposit": 0,
"depositPayment": "disabled",
"translations": null,
"sharedCapacity": false,
"quantity": 1,
"limitPerCustomer": "{\"enabled\":true,\"numberOfApp\":1,\"timeFrame\":\"day\",\"period\":1}",
"descriptionHtml": "A two-session package combining consultation and treatment at a discounted rate."
}'
Response
{
"message": "Successfully added new package.",
"data": {
"package": {
"id": 22,
"name": "Starter wellness package",
"description": null,
"color": "#1788FB",
"price": 55,
"deposit": 0,
"depositPayment": "disabled",
"depositPerPerson": null,
"pictureFullPath": null,
"pictureThumbPath": null,
"extras": [],
"coupons": [],
"position": 1,
"settings": null,
"fullPayment": null,
"type": "package",
"status": "visible",
"gallery": [],
"bookable": [
{
"id": 35,
"quantity": 1,
"service": {
"id": 1,
"name": "Initial consultation",
"description": "A focused consultation for first-time clients.",
"color": "#1788FB",
"price": 20
},
"minimumScheduled": 0,
"maximumScheduled": 1,
"providers": [],
"locations": [],
"allowProviderSelection": true
},
{
"id": 36,
"quantity": 1,
"service": {
"id": 4,
"name": "Deep tissue massage",
"description": "A 60-minute massage focused on releasing muscle tension.",
"color": "#1788FB",
"price": 45
},
"minimumScheduled": 0,
"maximumScheduled": 1,
"providers": [],
"locations": [],
"allowProviderSelection": false
}
],
"calculatedPrice": true,
"discount": 0,
"endDate": "2026-06-30 23:59",
"durationCount": null,
"durationType": null,
"translations": null,
"sharedCapacity": null,
"quantity": 1,
"limitPerCustomer": null
}
}
}
How do I update a package with the Amelia API?
Use this endpoint to update an existing package by sending only the properties you want to change, such as included services, pricing, visibility, or expiration rules.
- Method: POST
- Path:
/packages/{{package_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); package name - bookable (
array); array of included service objects - price (
double); package price - description (
string); package description - color (
string); hex color, default#1788FB - calculatedPrice (
boolean); calculate price from services, defaulttrue - discount (
double); package discount - gallery (
array); gallery image paths - pictureFullPath (
string); full image path - pictureThumbPath (
string); thumbnail image path - position (
integer); sorting position - settings (
string); JSON encoded package settings - endDate (
string); purchase expiration inYYYY-MM-DD HH:mmformat - durationCount (
string); expiration duration count - durationType (
integer); expiration duration unit,day,week,month - translations (
string); JSON encoded translations - sharedCapacity (
boolean); shared capacity across services - quantity (
integer); total quantity when shared capacity is enabled - limitPerCustomer (
integer); JSON encoded per-customer limits - descriptionHtml (
string); description in HTML - deposit (
double); deposit amount - depositPayment (
string);disabled,fixed,percentage - fullPayment (
boolean); allow full payment, defaultfalse - status (
string);visible,hidden,disabled, defaultvisible
Example
Request
curl --location 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/packages/22' \
--header 'Content-Type: application/json' \
--header 'Amelia: YOUR_API_KEY' \
--data '{
"name": "Starter wellness package plus",
"description": "A two-session package with an extended treatment option.",
"price": 65,
"calculatedPrice": false,
"status": "visible",
"endDate": "2026-06-30 23:59"
}'
Response
{
"message": "Successfully updated package.",
"data": {
"package": {
"id": 22,
"name": "Starter wellness package plus",
"description": "A two-session package with an extended treatment option.",
"color": "#1788FB",
"price": 65,
"deposit": 0,
"depositPayment": "disabled",
"position": 9,
"settings": "{\"payments\":{\"paymentLinks\":{\"enabled\":true,\"changeBookingStatus\":false,\"redirectUrl\":null},\"onSite\":true,\"payPal\":{\"enabled\":true},\"stripe\":{\"enabled\":false},\"mollie\":{\"enabled\":false},\"razorpay\":{\"enabled\":false}}}",
"fullPayment": false,
"type": "package",
"status": "visible",
"gallery": [],
"bookable": [
{
"quantity": 1,
"service": {
"id": 1,
"name": "Initial consultation"
},
"minimumScheduled": 0,
"maximumScheduled": 1,
"providers": [],
"locations": [],
"allowProviderSelection": true
},
{
"quantity": 1,
"service": {
"id": 4,
"name": "Deep tissue massage"
},
"minimumScheduled": 0,
"maximumScheduled": 1,
"providers": [],
"locations": [],
"allowProviderSelection": false
}
],
"calculatedPrice": false,
"discount": 0,
"endDate": "2026-06-30 23:59",
"durationCount": null,
"durationType": null,
"translations": null,
"sharedCapacity": false,
"quantity": 1,
"limitPerCustomer": "{\"enabled\":true,\"numberOfApp\":1,\"timeFrame\":\"day\",\"period\":1}"
}
}
}
How do I check whether a package can be deleted safely with the Amelia API?
Use this endpoint to check whether a package has future package appointments that would prevent safe deletion.
- Method: GET
- Path:
/packages/effect/{{package_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/packages/effect/22' \
--header 'Amelia: YOUR_API_KEY'
Response
{
"message": "Successfully retrieved message.",
"data": {
"valid": true,
"message": ""
}
}
How do I retrieve packages with the Amelia API?
Use this endpoint to retrieve packages. You can paginate results and sort them depending on the supported parameters.
- Method: GET
- Path:
/packages
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 - sort (
string); sorting mode, for examplename
Example
Request
curl --location 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/packages?page=1&sort=name' \
--header 'Amelia: YOUR_API_KEY'
Response
{
"message": "Successfully retrieved packages.",
"data": {
"packages": [
{
"id": 9,
"name": "Starter recovery package",
"description": "A short package for clients who want to try two core services.",
"color": "#1788FB",
"price": 53.89,
"deposit": 0,
"depositPayment": "disabled",
"depositPerPerson": null,
"pictureFullPath": null,
"pictureThumbPath": null,
"extras": [],
"coupons": [],
"position": 2,
"settings": "{\"payments\":{\"paymentLinks\":{\"enabled\":true,\"changeBookingStatus\":false,\"redirectUrl\":null},\"onSite\":true,\"payPal\":{\"enabled\":false},\"stripe\":{\"enabled\":true},\"mollie\":{\"enabled\":false},\"razorpay\":{\"enabled\":false}}}",
"fullPayment": false,
"type": "package",
"status": "visible",
"gallery": [],
"bookable": [],
"calculatedPrice": true,
"discount": 0,
"endDate": null,
"durationCount": null,
"durationType": null,
"translations": null,
"sharedCapacity": false,
"quantity": 1,
"limitPerCustomer": "{\"enabled\":false,\"numberOfApp\":1,\"timeFrame\":\"day\",\"period\":1}"
},
{
"id": 14,
"name": "Monthly wellness package",
"description": "A package for recurring clients who book services regularly.",
"color": "#1788FB",
"price": 180,
"deposit": 0,
"depositPayment": "disabled",
"depositPerPerson": null,
"pictureFullPath": null,
"pictureThumbPath": null,
"extras": [],
"coupons": [],
"position": 11,
"settings": "{\"payments\":{\"paymentLinks\":{\"enabled\":false,\"changeBookingStatus\":false,\"redirectUrl\":null},\"onSite\":true,\"payPal\":{\"enabled\":true},\"stripe\":{\"enabled\":true},\"mollie\":{\"enabled\":false},\"razorpay\":{\"enabled\":true}}}",
"fullPayment": false,
"type": "package",
"status": "visible",
"gallery": [],
"bookable": [],
"calculatedPrice": true,
"discount": 0,
"endDate": null,
"durationCount": null,
"durationType": null,
"translations": null,
"sharedCapacity": false,
"quantity": 1,
"limitPerCustomer": "{\"enabled\":false,\"numberOfApp\":1,\"timeFrame\":\"day\",\"period\":1}"
},
{
"id": 22,
"name": "Starter wellness package plus",
"description": "A two-session package with an extended treatment option.",
"color": "#1788FB",
"price": 65,
"deposit": 0,
"depositPayment": "disabled",
"depositPerPerson": null,
"pictureFullPath": null,
"pictureThumbPath": null,
"extras": [],
"coupons": [],
"position": 9,
"settings": "{\"payments\":{\"paymentLinks\":{\"enabled\":true,\"changeBookingStatus\":false,\"redirectUrl\":null},\"onSite\":true,\"payPal\":{\"enabled\":true},\"stripe\":{\"enabled\":false},\"mollie\":{\"enabled\":false},\"razorpay\":{\"enabled\":false}}}",
"fullPayment": false,
"type": "package",
"status": "visible",
"gallery": [],
"bookable": [],
"calculatedPrice": false,
"discount": 0,
"endDate": "2026-06-30 23:59",
"durationCount": null,
"durationType": null,
"translations": null,
"sharedCapacity": false,
"quantity": 1,
"limitPerCustomer": "{\"enabled\":true,\"numberOfApp\":1,\"timeFrame\":\"day\",\"period\":1}"
}
]
}
}
How do I delete a package with the Amelia API?
Use this endpoint to delete a package.
- Method: POST
- Path:
/packages/delete/{{package_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/packages/delete/22' \
--header 'Amelia: YOUR_API_KEY'
Response
{
"message": "Successfully deleted package.",
"data": []
}