Special deal!
SAVE UP TO 50% OFF!
Grab now

Amelia API – Appointments

Here you can see API endpoints related to appointments.

You can see all the API endpoints with examples of requests and responses in the Amelia API Postman collection which you can download here.

Please note: The API Endpoints are included only in the Elite license plans. Using API Endpoints requires a certain level of coding skills, and is not included in the provided support for the plugin.

Authorization

All Amelia endpoints use an API key authorization, using the header property named “Amelia”.

Path

Amelia API paths start with: {{your_site_URL}}/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1

Add appointment

Create an appointment with bookings.

Method

This endpoint accepts POST requests.

Path

/appointments

Required Properties

The following properties are required.

Key Type Description
bookingStart string The starting date and time of the appointment in the format: “YYYY-MM-DD HH:mm”
bookings array Array of bookings. The booking object must contain the customerId of an existing customer. If you’d like to create a new customer while making a booking, use the /bookings endpoint
notifyParticipants boolean Whether the customers should be notified about the appointment
locationId integer Location ID of the appointment
providerId integer ID of an employee assigned to the appointment
serviceId integer Service ID of the appointment
recurring array An array of recurring appointments. Required if appointment is recurring

Other Properties

Key Type Description
internalNotes string Internal note.
timeZone string Timezone of the customer. Example: “Europe/Belgrade“
lessonSpace string The lesson space id to assign to the appointment. By default a new one will be created.
utc boolean Whether the date time is sent in UTC. False by default.

Example

curl --location 'http://localhost/amelia/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/appointments' \
--header 'Content-Type: application/json' \
--header 'Amelia: qUmkNNOLrWbf28izIgNnZ29O+7gVWL5M+8ySJ8VXq3r0' \
--data '{
    "bookingStart": "2023-10-05 13:00",
    "bookings": [
        {
            "customFields": "{\"1\":{\"label\":\"text\",\"value\":\"\",\"type\":\"text\"}}",
            "customerId": 10,
            "duration": 1800,
            "extras": [],
            "packageCustomerId": null,
            "persons": 1,
            "status": "approved"
        }
    ],
    "internalNotes": "",
    "lessonSpace": "",
    "locationId": 2,
    "notifyParticipants": 1,
    "providerId": 1,
    "recurring": [],
    "serviceId": 1,
    "timeZone": "Europe/Belgrade",
    "utc": false
}'
{
    "message": "Successfully added new appointment",
    "data": {
        "appointment": {
            "id": 742,
            "bookings": [
                {
                    "id": 979,
                    "customerId": 10,
                    "customer": null,
                    "status": "approved",
                    "extras": [],
                    "couponId": null,
                    "price": 23,
                    "coupon": null,
                    "customFields": "{\"1\":{\"label\":\"text\",\"value\":\"\",\"type\":\"text\"}}",
                    "info": null,
                    "appointmentId": 742,
                    "persons": 1,
                    "token": "e22f812066",
                    "payments": [
                        {
                            "id": 1000,
                            "customerBookingId": 979,
                            "packageCustomerId": null,
                            "parentId": null,
                            "amount": 0,
                            "gateway": "onSite",
                            "gatewayTitle": "",
                            "dateTime": "2023-10-05 13:00:00",
                            "status": "pending",
                            "data": "",
                            "entity": "appointment",
                            "created": null,
                            "actionsCompleted": true,
                            "wcOrderId": null,
                            "wcOrderUrl": null,
                            "wcItemCouponValue": null,
                            "wcItemTaxValue": null,
                            "transactionId": null
                        }
                    ],
                    "utcOffset": null,
                    "aggregatedPrice": true,
                    "isChangedStatus": true,
                    "isLastBooking": null,
                    "packageCustomerService": null,
                    "ticketsData": [],
                    "duration": 1800,
                    "created": "2023-09-26 10:19:00",
                    "actionsCompleted": true,
                    "isUpdated": null
                }
            ],
            "notifyParticipants": 1,
            "internalNotes": "",
            "status": "approved",
            "serviceId": 1,
            "parentId": null,
            "providerId": 1,
            "locationId": 2,
            "provider": null,
            "service": null,
            "location": null,
            "googleCalendarEventId": null,
            "googleMeetUrl": null,
            "outlookCalendarEventId": null,
            "zoomMeeting": null,
            "lessonSpace": null,
            "bookingStart": "2023-10-05 13:00:00",
            "bookingEnd": "2023-10-05 13:30:00",
            "type": "appointment",
            "isRescheduled": null,
            "isFull": null,
            "resources": []
        },
        "recurring": []
    }
}

Update appointment

Update appointment details. To update appointment status use /appointments/status endpoint.

Method

This endpoint accepts POST requests.

Path

/appointments/{{appointment_id}}

Optional Properties

Send only the properties you want updated.

Key Type Description
bookingStart string The starting date and time of the appointment in the format: “YYYY-MM-DD HH:mm”
bookings array Array of bookings
notifyParticipants boolean Whether the customers should be notified about the appointment
locationId integer Location ID of the appointment
providerId integer ID of an employee assigned to the appointment
serviceId integer Service ID of the appointment
internalNotes string Internal note.
lessonSpace string The lesson space id to assign to the appointment. By default a new one will be created.
removedBookings array An array of bookings to be removed.
recurring array An array of recurring appointments. Required if appointment is recurring.

Example

curl --location 'http://localhost/amelia/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/appointments/742' \
--header 'Content-Type: application/json' \
--header 'Amelia: qUmkNNOLrWbf28izIgNnZ29O+7gVWL5M+8ySJ8VXq3r0' \
--data '{
    "bookingStart": "2023-10-05 11:00",
    "bookings": [
        {
            "id": 979,
            "customFields": "{\"1\":{\"label\":\"text\",\"value\":\"\",\"type\":\"text\"}}",
            "customerId": 10,
            "duration": 1800,
            "extras": [],
            "packageCustomerId": null,
            "persons": 2,
            "status": "approved"
        }
    ],
    "internalNotes": "",
    "lessonSpace": "",
    "locationId": 2,
    "notifyParticipants": 1,
    "providerId": 1,
    "removedBookings": [],
    "serviceId": 1
}
{
    "message": "Successfully updated appointment",
    "data": {
        "appointment": {
            "id": 742,
            "bookings": [
                {
                    "id": 979,
                    "customerId": 10,
                    "customer": null,
                    "status": "approved",
                    "extras": [],
                    "couponId": null,
                    "price": 23,
                    "coupon": null,
                    "customFields": "{\"1\":{\"label\":\"text\",\"value\":\"\",\"type\":\"text\"}}",
                    "info": null,
                    "appointmentId": null,
                    "persons": 2,
                    "token": null,
                    "payments": [],
                    "utcOffset": null,
                    "aggregatedPrice": null,
                    "isChangedStatus": false,
                    "isLastBooking": null,
                    "packageCustomerService": null,
                    "ticketsData": [],
                    "duration": 1800,
                    "created": "2023-09-26 10:19:00",
                    "actionsCompleted": null,
                    "isUpdated": true
                }
            ],
            "notifyParticipants": 1,
            "internalNotes": "",
            "status": "approved",
            "serviceId": 1,
            "parentId": null,
            "providerId": 1,
            "locationId": 2,
            "provider": null,
            "service": null,
            "location": null,
            "googleCalendarEventId": "hlda2snvbh7llqbupsgnels3io",
            "googleMeetUrl": null,
            "outlookCalendarEventId": "AQMkADAwATYwMAItZTk0ZS1lMGRmLTAwAi0wMAoARgAAA3egvCudOo1GsyywV8xCQ2wHANjP2dT7pGFAu0b6VBSGJOoAAAIBDQAAANjP2dT7pGFAu0b6VBSGJOoABsaEPm0AAAA=",
            "zoomMeeting": {
                "id": 76092515836,
                "startUrl": "https://us04web.zoom.us/s/76092515836?zak=eyJ0eXAiOiJKV1QiLCJzdiI6IjAwMDAwMSIsInptX3NrbSI6InptX28ybSIsImFsZyI6IkhTMjU2In0.eyJhdWQiOiJjbGllbnRzbSIsInVpZCI6IlBNUVVXdlVXVEJLMVh6cW11YVM2LUEiLCJpc3MiOiJ3ZWIiLCJzayI6Ijg0OTc4OTYwMzQ5OTI5NjU2NDUiLCJzdHkiOjEwMCwid2NkIjoidXMwNCIsImNsdCI6MCwibW51bSI6Ijc2MDkyNTE1ODM2IiwiZXhwIjoxNjk1NzIzNTQyLCJpYXQiOjE2OTU3MTYzNDIsImFpZCI6Ing4ejhiTG1WUzJLODA0aktOa09lTmciLCJjaWQiOiIifQ.5stnr-oa5EhUGp5H_oIrb9ckfTq6WGu0TxGw7Mzo7t4",
                "joinUrl": "https://us04web.zoom.us/j/76092515836?pwd=O3kmYBTPHsxTSMKe7mKrAbSllftaJ7.1"
            },
            "lessonSpace": null,
            "bookingStart": "2023-10-05 11:00:00",
            "bookingEnd": "2023-10-05 11:30:00",
            "type": "appointment",
            "isRescheduled": null,
            "isFull": null,
            "resources": []
        },
        "appointmentStatusChanged": false,
        "appointmentRescheduled": false,
        "initialAppointmentDateTime": {
            "bookingStart": "2023-10-05 11:00:00",
            "bookingEnd": "2023-10-05 11:30:00"
        },
        "bookingsWithChangedStatus": [],
        "appointmentEmployeeChanged": null,
        "appointmentZoomUserChanged": false,
        "bookingAdded": false,
        "appointmentZoomUsersLicenced": false,
        "createPaymentLinks": null
    }
}

Update appointment status

Update the appointment group status.

Method

This endpoint accepts POST requests.

Path

appointments/status/{{appointment_id}}

Required Properties

The following properties are required.

Key Type Description
status string The new appointment status. Possible values: approved, pending, canceled, rejected and no-show
packageCustomerId integer Package customer id, if the appointment is part of a package

Example

curl --location 'http://localhost/amelia/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/appointments/status/742'
--header 'Content-Type: application/json'
--header 'Amelia: qUmkNNOLrWbf28izIgNnZ29O+7gVWL5M+8ySJ8VXq3r0'
--data '{
    "status": "pending",
    "packageCustomerId": null
}'
{
    "message": "Successfully updated appointment status",
    "data": {
        "appointment": {
            "id": 742,
            "bookings": [
                {
                    "id": 979,
                    "customerId": 10,
                    "customer": null,
                    "status": "pending",
                    "extras": [],
                    "couponId": null,
                    "price": 23,
                    "coupon": null,
                    "customFields": "{\"1\":{\"label\":\"text\",\"value\":\"\",\"type\":\"text\"}}",
                    "info": null,
                    "appointmentId": 742,
                    "persons": 2,
                    "token": null,
                    "payments": [
                        {
                            "id": 1000,
                            "customerBookingId": 979,
                            "packageCustomerId": null,
                            "parentId": null,
                            "amount": 0,
                            "gateway": "onSite",
                            "gatewayTitle": "",
                            "dateTime": "2023-10-05 13:00:00",
                            "status": "pending",
                            "data": "",
                            "entity": null,
                            "created": null,
                            "actionsCompleted": null,
                            "wcOrderId": null,
                            "wcOrderUrl": null,
                            "wcItemCouponValue": null,
                            "wcItemTaxValue": null,
                            "transactionId": null
                        }
                    ],
                    "utcOffset": null,
                    "aggregatedPrice": true,
                    "isChangedStatus": false,
                    "isLastBooking": null,
                    "packageCustomerService": null,
                    "ticketsData": [],
                    "duration": 1800,
                    "created": "2023-09-26 10:19:00",
                    "actionsCompleted": null,
                    "isUpdated": null
                }
            ],
            "notifyParticipants": 1,
            "internalNotes": "",
            "status": "pending",
            "serviceId": 1,
            "parentId": null,
            "providerId": 1,
            "locationId": 2,
            "provider": null,
            "service": null,
            "location": null,
            "googleCalendarEventId": "hlda2snvbh7llqbupsgnels3io",
            "googleMeetUrl": null,
            "outlookCalendarEventId": null,
            "zoomMeeting": null,
            "lessonSpace": null,
            "bookingStart": "2023-10-05 11:00:00",
            "bookingEnd": "2023-10-05 11:30:00",
            "type": "appointment",
            "isRescheduled": null,
            "isFull": null,
            "resources": []
        },
        "bookingsWithChangedStatus": [],
        "status": "pending",
        "oldStatus": "pending",
        "message": "Appointment status has been changed to pending"
    }
}

Get appointment

Retrieve appointment details.

Method

This endpoint accepts GET requests.

Path

appointments/{{appointment_id}}

Example

curl --location 'http://localhost/amelia/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/appointments/742'
--header 'Amelia: qUmkNNOLrWbf28izIgNnZ29O+7gVWL5M+8ySJ8VXq3r0'
{
    "message": "Successfully retrieved appointment",
    "data": {
        "appointment": {
            "id": 742,
            "bookings": [
                {
                    "id": 979,
                    "customerId": 10,
                    "customer": null,
                    "status": "pending",
                    "extras": [],
                    "couponId": null,
                    "price": 23,
                    "coupon": null,
                    "customFields": "{\"1\":{\"label\":\"text\",\"value\":\"\",\"type\":\"text\"}}",
                    "info": null,
                    "appointmentId": 742,
                    "persons": 2,
                    "token": null,
                    "payments": [
                        {
                            "id": 1000,
                            "customerBookingId": 979,
                            "packageCustomerId": null,
                            "parentId": null,
                            "amount": 0,
                            "gateway": "onSite",
                            "gatewayTitle": "",
                            "dateTime": "2023-10-05 13:00:00",
                            "status": "pending",
                            "data": "",
                            "entity": null,
                            "created": null,
                            "actionsCompleted": null,
                            "wcOrderId": null,
                            "wcOrderUrl": null,
                            "wcItemCouponValue": null,
                            "wcItemTaxValue": null,
                            "transactionId": null
                        }
                    ],
                    "utcOffset": null,
                    "aggregatedPrice": true,
                    "isChangedStatus": null,
                    "isLastBooking": null,
                    "packageCustomerService": null,
                    "ticketsData": [],
                    "duration": 1800,
                    "created": "2023-09-26 10:19:00",
                    "actionsCompleted": null,
                    "isUpdated": null
                }
            ],
            "notifyParticipants": 1,
            "internalNotes": "",
            "status": "pending",
            "serviceId": 1,
            "parentId": null,
            "providerId": 1,
            "locationId": 2,
            "provider": null,
            "service": null,
            "location": null,
            "googleCalendarEventId": "hlda2snvbh7llqbupsgnels3io",
            "googleMeetUrl": null,
            "outlookCalendarEventId": null,
            "zoomMeeting": null,
            "lessonSpace": null,
            "bookingStart": "2023-10-05 11:00:00",
            "bookingEnd": "2023-10-05 11:30:00",
            "type": "appointment",
            "isRescheduled": null,
            "isFull": null,
            "resources": []
        },
        "recurring": []
    }
}

Get appointments

Retrieve appointments details.

Method

This endpoint accepts GET requests.

Path

appointments
Key Type Description
dates string The beggining and end date from which to retreieve appointments
page integer The page number. The limit is set in settings.
skipServices boolean Whether to retrieve service details as well.
skipProviders boolean Whether to retrieve employee details as well.
asArray boolean Whether the retrieved appointments will be in array format. False by default, sent as an object where the keys are the appointment dates.

Example

curl --location 'http://localhost/amelia/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/appointments&dates=2023-05-09,2023-05-10&page=1&skipServices=1&skipProviders=1'
--header 'Amelia: qUmkNNOLrWbf28izIgNnZ29O+7gVWL5M+8ySJ8VXq3r0'
{
    "message": "Successfully retrieved appointments",
    "data": {
        "appointments": {
            "2023-05-09": {
                "date": "2023-05-09",
                "appointments": [
                    {
                        "id": 151,
                        "bookings": [
                            {
                                "id": 228,
                                "customerId": 16,
                                "customer": {
                                    "id": 16,
                                    "firstName": "Amelia",
                                    "lastName": "Test",
                                    "birthday": null,
                                    "email": "[email protected]",
                                    "phone": null,
                                    "type": "customer",
                                    "status": "visible",
                                    "note": null,
                                    "zoomUserId": null,
                                    "countryPhoneIso": null,
                                    "externalId": null,
                                    "pictureFullPath": null,
                                    "pictureThumbPath": null,
                                    "translations": null,
                                    "gender": null
                                },
                                "status": "approved",
                                "extras": [],
                                "couponId": null,
                                "price": 100,
                                "coupon": null,
                                "customFields": "{\"1\":{\"label\":\"text\",\"value\":\"\",\"type\":\"text\"}}",
                                "info": null,
                                "appointmentId": 151,
                                "persons": 1,
                                "token": null,
                                "payments": [
                                    {
                                        "id": 269,
                                        "customerBookingId": 228,
                                        "packageCustomerId": null,
                                        "parentId": null,
                                        "amount": 0,
                                        "gateway": "onSite",
                                        "gatewayTitle": "",
                                        "dateTime": "2023-05-09 11:00:00",
                                        "status": "pending",
                                        "data": "",
                                        "entity": null,
                                        "created": "2023-04-25 10:55:33",
                                        "actionsCompleted": null,
                                        "wcOrderId": null,
                                        "wcOrderUrl": null,
                                        "wcItemCouponValue": null,
                                        "wcItemTaxValue": null
                                    }
                                ],
                                "utcOffset": null,
                                "aggregatedPrice": true,
                                "isChangedStatus": null,
                                "isLastBooking": null,
                                "packageCustomerService": null,
                                "ticketsData": [],
                                "duration": 1800,
                                "created": "2023-04-25 10:55:33",
                                "actionsCompleted": null
                            },
                            {
                                "id": 229,
                                "customerId": 17,
                                "customer": {
                                    "id": 17,
                                    "firstName": "Avatar",
                                    "lastName": "Last Airbender",
                                    "birthday": null,
                                    "email": "[email protected]",
                                    "phone": null,
                                    "type": "customer",
                                    "status": "visible",
                                    "note": null,
                                    "zoomUserId": null,
                                    "countryPhoneIso": null,
                                    "externalId": null,
                                    "pictureFullPath": null,
                                    "pictureThumbPath": null,
                                    "translations": null,
                                    "gender": null
                                },
                                "status": "approved",
                                "extras": [],
                                "couponId": null,
                                "price": 100,
                                "coupon": null,
                                "customFields": "{\"1\":{\"label\":\"text\",\"value\":\"\",\"type\":\"text\"}}",
                                "info": null,
                                "appointmentId": 151,
                                "persons": 1,
                                "token": null,
                                "payments": [
                                    {
                                        "id": 270,
                                        "customerBookingId": 229,
                                        "packageCustomerId": null,
                                        "parentId": null,
                                        "amount": 0,
                                        "gateway": "onSite",
                                        "gatewayTitle": "",
                                        "dateTime": "2023-05-09 11:00:00",
                                        "status": "pending",
                                        "data": "",
                                        "entity": null,
                                        "created": "2023-04-25 10:55:58",
                                        "actionsCompleted": null,
                                        "wcOrderId": null,
                                        "wcOrderUrl": null,
                                        "wcItemCouponValue": null,
                                        "wcItemTaxValue": null
                                    }
                                ],
                                "utcOffset": null,
                                "aggregatedPrice": true,
                                "isChangedStatus": null,
                                "isLastBooking": null,
                                "packageCustomerService": null,
                                "ticketsData": [],
                                "duration": 1800,
                                "created": "2023-04-25 10:55:58",
                                "actionsCompleted": null
                            }
                        ],
                        "notifyParticipants": 1,
                        "internalNotes": "",
                        "status": "approved",
                        "serviceId": 2,
                        "parentId": null,
                        "providerId": 1,
                        "locationId": 1,
                        "provider": null,
                        "service": null,
                        "location": null,
                        "googleCalendarEventId": "omia1hbnknkcha7addq7nc8aes",
                        "googleMeetUrl": null,
                        "outlookCalendarEventId": null,
                        "zoomMeeting": {
                            "id": 83025905325,
                            "startUrl": "https://us06web.zoom.us/s/83025905325?zak=eyJ0eXAiOiJKV1QiLCJzdiI6IjAwMDAwMSIsInptX3NrbSI6InptX28ybSIsImFsZyI6IkhTMjU2In0.eyJhdWQiOiJjbGllbnRzbSIsInVpZCI6IkNGUUQ1bV9BU1pPNXpLTE5VbS1pOFEiLCJpc3MiOiJ3ZWIiLCJzayI6IjAiLCJzdHkiOjEsIndjZCI6InVzMDYiLCJjbHQiOjAsIm1udW0iOiI4MzAyNTkwNTMyNSIsImV4cCI6MTY4MjQyNzM1OCwiaWF0IjoxNjgyNDIwMTU4LCJhaWQiOiJpeV8zd01JUFRyLTdyclZZSnZnM01nIiwiY2lkIjoiIn0.rsCwEyo4mqLRSzs9nXWEt2yFg7MHyMdGgmTfgw12zEc",
                            "joinUrl": "https://us06web.zoom.us/j/83025905325?pwd=UWw5Y0NTTVpVc3lEb21iNmxvT2Nodz09"
                        },
                        "lessonSpace": null,
                        "bookingStart": "2023-05-09 11:00:00",
                        "bookingEnd": "2023-05-09 11:30:00",
                        "type": "appointment",
                        "isRescheduled": null,
                        "resources": [],
                        "cancelable": true,
                        "reschedulable": true,
                        "past": false,
                        "isGroup": false
                    }
                ]
            },
            "2023-05-10": {
                "date": "2023-05-10",
                "appointments": [
                    {
                        "id": 157,
                        "bookings": [
                            {
                                "id": 237,
                                "customerId": 2,
                                "customer": {
                                    "id": 2,
                                    "firstName": "Milica",
                                    "lastName": "Snake",
                                    "birthday": null,
                                    "email": "[email protected]",
                                    "phone": null,
                                    "type": "customer",
                                    "status": "visible",
                                    "note": null,
                                    "zoomUserId": null,
                                    "countryPhoneIso": null,
                                    "externalId": null,
                                    "pictureFullPath": null,
                                    "pictureThumbPath": null,
                                    "translations": null,
                                    "gender": null
                                },
                                "status": "approved",
                                "extras": [],
                                "couponId": null,
                                "price": 100,
                                "coupon": null,
                                "customFields": "{\"1\":{\"label\":\"text\",\"type\":\"text\",\"value\":\"\"}}",
                                "info": "{\"firstName\":\"Milica\",\"lastName\":\"Snake\",\"phone\":null,\"locale\":\"en_US\",\"timeZone\":\"Europe\\/Belgrade\",\"urlParams\":null}",
                                "appointmentId": 157,
                                "persons": 1,
                                "token": null,
                                "payments": [
                                    {
                                        "id": 277,
                                        "customerBookingId": 237,
                                        "packageCustomerId": null,
                                        "parentId": null,
                                        "amount": 120,
                                        "gateway": "wc",
                                        "gatewayTitle": "Check payments",
                                        "dateTime": "2023-04-25 16:32:11",
                                        "status": "paid",
                                        "data": "",
                                        "entity": null,
                                        "created": "2023-04-25 14:32:11",
                                        "actionsCompleted": null,
                                        "wcOrderId": 330,
                                        "wcOrderUrl": null,
                                        "wcItemCouponValue": null,
                                        "wcItemTaxValue": 20
                                    }
                                ],
                                "utcOffset": null,
                                "aggregatedPrice": true,
                                "isChangedStatus": null,
                                "isLastBooking": null,
                                "packageCustomerService": null,
                                "ticketsData": [],
                                "duration": 1800,
                                "created": "2023-04-25 14:32:11",
                                "actionsCompleted": null
                            },
                            {
                                "id": 238,
                                "customerId": 11,
                                "customer": {
                                    "id": 11,
                                    "firstName": "Amelia",
                                    "lastName": "Test",
                                    "birthday": null,
                                    "email": "[email protected]",
                                    "phone": null,
                                    "type": "customer",
                                    "status": "visible",
                                    "note": null,
                                    "zoomUserId": null,
                                    "countryPhoneIso": null,
                                    "externalId": null,
                                    "pictureFullPath": null,
                                    "pictureThumbPath": null,
                                    "translations": null,
                                    "gender": null
                                },
                                "status": "approved",
                                "extras": [],
                                "couponId": null,
                                "price": 100,
                                "coupon": null,
                                "customFields": "{\"1\":{\"label\":\"text\",\"type\":\"text\",\"value\":\"\"}}",
                                "info": "{\"firstName\":\"Amelia\",\"lastName\":\"Test\",\"phone\":null,\"locale\":\"en_US\",\"timeZone\":\"Europe\\/Belgrade\",\"urlParams\":null}",
                                "appointmentId": 157,
                                "persons": 1,
                                "token": null,
                                "payments": [
                                    {
                                        "id": 278,
                                        "customerBookingId": 238,
                                        "packageCustomerId": null,
                                        "parentId": null,
                                        "amount": 120,
                                        "gateway": "wc",
                                        "gatewayTitle": "Check payments",
                                        "dateTime": "2023-04-25 16:42:44",
                                        "status": "paid",
                                        "data": "",
                                        "entity": null,
                                        "created": "2023-04-25 14:42:44",
                                        "actionsCompleted": null,
                                        "wcOrderId": 331,
                                        "wcOrderUrl": null,
                                        "wcItemCouponValue": null,
                                        "wcItemTaxValue": 20
                                    }
                                ],
                                "utcOffset": null,
                                "aggregatedPrice": true,
                                "isChangedStatus": null,
                                "isLastBooking": null,
                                "packageCustomerService": null,
                                "ticketsData": [],
                                "duration": 1800,
                                "created": "2023-04-25 14:42:44",
                                "actionsCompleted": null
                            }
                        ],
                        "notifyParticipants": 1,
                        "internalNotes": "",
                        "status": "pending",
                        "serviceId": 2,
                        "parentId": null,
                        "providerId": 1,
                        "locationId": 1,
                        "provider": null,
                        "service": null,
                        "location": null,
                        "googleCalendarEventId": "9v21b37kr4gsi19tabjtt97404",
                        "googleMeetUrl": null,
                        "outlookCalendarEventId": null,
                        "zoomMeeting": null,
                        "lessonSpace": null,
                        "bookingStart": "2023-05-10 11:00:00",
                        "bookingEnd": "2023-05-10 11:30:00",
                        "type": "appointment",
                        "isRescheduled": null,
                        "resources": [],
                        "cancelable": true,
                        "reschedulable": true,
                        "past": false,
                        "isGroup": false
                    }
                ]
            }
        },
        "availablePackageBookings": [],
        "emptyPackageBookings": [],
        "occupied": [],
        "total": 2,
        "totalApproved": 1,
        "totalPending": 1,
        "currentUser": {
            "id": null,
            "firstName": "AmeliaApi",
            "lastName": "AmeliaApi",
            "birthday": null,
            "email": "[email protected]",
            "phone": null,
            "type": "admin",
            "status": "visible",
            "note": null,
            "zoomUserId": null,
            "countryPhoneIso": null,
            "externalId": null,
            "pictureFullPath": null,
            "pictureThumbPath": null,
            "translations": null
        }
    }
}

Delete appointment

Delete appointment.

Method

This endpoint accepts POST requests.

Path

/appointments/delete/{{appointment_id}}

Example

curl --location --request POST 'http://localhost/amelia/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/appointments/delete/173'
--header 'Amelia: qUmkNNOLrWbf28izIgNnZ29O+7gVWL5M+8ySJ8VXq3r0'
{
    "message": "Successfully deleted appointment",
    "data": {
        "appointment": {
            "id": 173,
            "bookings": [
                {
                    "id": 254,
                    "customerId": 10,
                    "customer": null,
                    "status": "rejected",
                    "extras": [],
                    "couponId": null,
                    "price": 20,
                    "coupon": null,
                    "customFields": "{\"1\":{\"label\":\"text\",\"value\":\"\",\"type\":\"text\"}}",
                    "info": null,
                    "appointmentId": 173,
                    "persons": 1,
                    "token": null,
                    "payments": [
                        {
                            "id": 295,
                            "customerBookingId": 254,
                            "packageCustomerId": null,
                            "parentId": null,
                            "amount": 0,
                            "gateway": "onSite",
                            "gatewayTitle": "",
                            "dateTime": "2023-05-11 09:00:00",
                            "status": "pending",
                            "data": "",
                            "entity": null,
                            "created": null,
                            "actionsCompleted": null,
                            "wcOrderId": null,
                            "wcOrderUrl": null,
                            "wcItemCouponValue": null,
                            "wcItemTaxValue": null
                        }
                    ],
                    "utcOffset": null,
                    "aggregatedPrice": true,
                    "isChangedStatus": true,
                    "isLastBooking": null,
                    "packageCustomerService": null,
                    "ticketsData": [],
                    "duration": 1800,
                    "created": null,
                    "actionsCompleted": null
                }
            ],
            "notifyParticipants": 1,
            "internalNotes": "",
            "status": "rejected",
            "serviceId": 1,
            "parentId": null,
            "providerId": 1,
            "locationId": 1,
            "provider": null,
            "service": null,
            "location": null,
            "googleCalendarEventId": null,
            "googleMeetUrl": null,
            "outlookCalendarEventId": null,
            "zoomMeeting": null,
            "lessonSpace": null,
            "bookingStart": "2023-05-11 09:00:00",
            "bookingEnd": "2023-05-11 09:30:00",
            "type": "appointment",
            "isRescheduled": null,
            "resources": []
        },
        "bookingsWithChangedStatus": [
            {
                "id": 254,
                "customerId": 10,
                "customer": null,
                "status": "pending",
                "extras": [],
                "couponId": null,
                "price": 20,
                "coupon": null,
                "customFields": "{\"1\":{\"label\":\"text\",\"value\":\"\",\"type\":\"text\"}}",
                "info": null,
                "appointmentId": 173,
                "persons": 1,
                "token": null,
                "payments": [
                    {
                        "id": 295,
                        "customerBookingId": 254,
                        "packageCustomerId": null,
                        "parentId": null,
                        "amount": 0,
                        "gateway": "onSite",
                        "gatewayTitle": "",
                        "dateTime": "2023-05-11 09:00:00",
                        "status": "pending",
                        "data": "",
                        "entity": null,
                        "created": null,
                        "actionsCompleted": null,
                        "wcOrderId": null,
                        "wcOrderUrl": null,
                        "wcItemCouponValue": null,
                        "wcItemTaxValue": null
                    }
                ],
                "utcOffset": null,
                "aggregatedPrice": true,
                "isChangedStatus": true,
                "isLastBooking": null,
                "packageCustomerService": null,
                "ticketsData": [],
                "duration": 1800,
                "created": null,
                "actionsCompleted": null
            }
        ]
    }
}