Don’t miss our Special Offer!

Up to 50% off
Grab Amelia
Grab Amelia

Amelia API – Employees

Here you can see API endpoints related to employees.

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 employee

Create an employee.

Method

This endpoint accepts POST requests.

Path

/users/providers

Required Properties

The following properties are required.

Key Type Description
firstName string The first name of the employee
lastName string The last name of the employee
email string The email of the employee. This field must be unique
locationId integer The default location of the employee. This field id only required if there are any locations in the system.
serviceList
array An array of the services assigned to the employee. This field is required for the employee to be visible on the form.
weekDayList
array An array of that defines the employee’s working hours. This field is required for the employee to be visible on the form.

Optional Properties

The following properties are optional

Key Type Description
status string The status of the employee. Possible values: “hidden”, “visible”. The default value is “visible”
externalId
integer The id of the WP user tied to this Amelia user.
countryPhoneIso
string The country phone ISO tied to the phone number.
phone
string The phone of the employee.
zoomUserId
string The zoom user id.
note
string The internal employee note.
description
string The description of the employee
pictureFullPath
string The path to the employee picture.
pictureThumbPath
string The path to the employee picture.
specialDayList
array An array of special days.
dayOffList
array An array of the days off list.
sendEmployeePanelAccessEmail
boolean Whether to send the employee panel link after creating the employee.
descriptionHtml
string The description of the employee in HTML
timeZone
string The employee timezone. The wordpress timezone will be used by default

Example

curl --location 'http://localhost/amelia/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/users/providers' \
--header 'Content-Type: application/json' \
--header 'Amelia: qUmkNNOLrWbf28izIgNnZ29O+7gVWL5M+8ySJ8VXq3r0' \
--data-raw '{
    "status": "visible",
    "firstName": "Amelia2",
    "lastName": "Employee2",
    "email": "[email protected]",
    "externalId": "",
    "locationId": 1,
    "phone": "",
    "countryPhoneIso": "rs",
    "googleCalendar": {},
    "outlookCalendar": {},
    "zoomUserId": "",
    "note": "",
    "description": "",
    "pictureFullPath": "",
    "pictureThumbPath": "",
    "serviceList": [
        {
            "id": 4,
            "price": 45,
            "minCapacity": 1,
            "maxCapacity": 1,
            "customPricing": "{\"enabled\":false,\"durations\":{}}"
        },
        {
            "id": 2,
            "price": 0,
            "minCapacity": 1,
            "maxCapacity": 1,
            "customPricing": "{\"enabled\":false,\"durations\":{}}"
        }
    ],
    "weekDayList": [
        {
            "dayIndex": 1,
            "startTime": "09:00:00",
            "endTime": "17:00:00",
            "timeOutList": [],
            "periodList": [
                {
                    "startTime": "09:00:00",
                    "endTime": "17:00:00",
                    "locationId": null,
                    "periodLocationList": [
                        {
                            "id": null,
                            "locationId": 2
                        }
                    ],
                    "periodServiceList": []
                }
            ]
        },
        {
            "dayIndex": 2,
            "startTime": "09:00:00",
            "endTime": "17:00:00",
            "timeOutList": [],
            "periodList": [
                {
                    "startTime": "09:00:00",
                    "endTime": "17:00:00",
                    "locationId": null,
                    "periodLocationList": [],
                    "periodServiceList": []
                }
            ]
        },
        {
            "dayIndex": 3,
            "startTime": "09:00:00",
            "endTime": "17:00:00",
            "timeOutList": [],
            "periodList": [
                {
                    "startTime": "09:00:00",
                    "endTime": "17:00:00",
                    "locationId": null,
                    "periodLocationList": [],
                    "periodServiceList": []
                }
            ]
        },
        {
            "dayIndex": 4,
            "startTime": "09:00:00",
            "endTime": "17:00:00",
            "timeOutList": [],
            "periodList": [
                {
                    "startTime": "09:00:00",
                    "endTime": "17:00:00",
                    "locationId": null,
                    "periodLocationList": [],
                    "periodServiceList": []
                }
            ]
        },
        {
            "dayIndex": 5,
            "startTime": "09:00:00",
            "endTime": "17:00:00",
            "timeOutList": [],
            "periodList": [
                {
                    "startTime": "09:00:00",
                    "endTime": "17:00:00",
                    "locationId": null,
                    "periodLocationList": [],
                    "periodServiceList": []
                }
            ]
        }
    ],
    "specialDayList": [
        {
            "startDate": "2023-11-15",
            "endDate": "2023-11-15",
            "periodList": [
                {
                    "startTime": "13:00:00",
                    "endTime": "14:30:00",
                    "periodLocationList": [
                        {
                            "locationId": 2
                        },
                        {
                            "locationId": 1
                        }
                    ],
                    "periodServiceList": [
                        {
                            "serviceId": 2
                        }
                    ]
                }
            ]
        }
    ],
    "dayOffList": [
        {
            "name": "Day off 1",
            "startDate": "2023-09-17",
            "endDate": "2023-09-17",
            "repeat": 0
        }
    ],
    "sendEmployeePanelAccessEmail": true,
    "descriptionHtml": "",
    "timeZone": "Europe/Belgrade"
}'
{
    "message": "Successfully added new user.",
    "data": {
        "user": {
            "id": 88,
            "firstName": "Amelia2",
            "lastName": "Employee2",
            "birthday": null,
            "email": "[email protected]",
            "phone": "",
            "type": "provider",
            "status": "visible",
            "note": null,
            "zoomUserId": null,
            "countryPhoneIso": "rs",
            "externalId": null,
            "pictureFullPath": null,
            "pictureThumbPath": null,
            "translations": null,
            "weekDayList": [
                {
                    "id": 89,
                    "dayIndex": 1,
                    "startTime": "09:00:00",
                    "endTime": "17:00:00",
                    "timeOutList": [],
                    "periodList": [
                        {
                            "id": null,
                            "startTime": "09:00:00",
                            "endTime": "17:00:00",
                            "locationId": 2,
                            "periodServiceList": [],
                            "periodLocationList": []
                        }
                    ]
                },
                {
                    "id": 90,
                    "dayIndex": 2,
                    "startTime": "09:00:00",
                    "endTime": "17:00:00",
                    "timeOutList": [],
                    "periodList": [
                        {
                            "id": null,
                            "startTime": "09:00:00",
                            "endTime": "17:00:00",
                            "locationId": 0,
                            "periodServiceList": [],
                            "periodLocationList": []
                        }
                    ]
                },
                {
                    "id": 91,
                    "dayIndex": 3,
                    "startTime": "09:00:00",
                    "endTime": "17:00:00",
                    "timeOutList": [],
                    "periodList": [
                        {
                            "id": null,
                            "startTime": "09:00:00",
                            "endTime": "17:00:00",
                            "locationId": 0,
                            "periodServiceList": [],
                            "periodLocationList": []
                        }
                    ]
                },
                {
                    "id": 92,
                    "dayIndex": 4,
                    "startTime": "09:00:00",
                    "endTime": "17:00:00",
                    "timeOutList": [],
                    "periodList": [
                        {
                            "id": null,
                            "startTime": "09:00:00",
                            "endTime": "17:00:00",
                            "locationId": 0,
                            "periodServiceList": [],
                            "periodLocationList": []
                        }
                    ]
                },
                {
                    "id": 93,
                    "dayIndex": 5,
                    "startTime": "09:00:00",
                    "endTime": "17:00:00",
                    "timeOutList": [],
                    "periodList": [
                        {
                            "id": null,
                            "startTime": "09:00:00",
                            "endTime": "17:00:00",
                            "locationId": 0,
                            "periodServiceList": [],
                            "periodLocationList": []
                        }
                    ]
                }
            ],
            "serviceList": [
                {
                    "id": 4,
                    "name": null,
                    "description": null,
                    "color": null,
                    "price": 45,
                    "deposit": null,
                    "depositPayment": null,
                    "depositPerPerson": null,
                    "pictureFullPath": null,
                    "pictureThumbPath": null,
                    "extras": [],
                    "coupons": [],
                    "position": null,
                    "settings": null,
                    "fullPayment": null,
                    "minCapacity": 1,
                    "maxCapacity": 1,
                    "duration": null,
                    "timeBefore": null,
                    "timeAfter": null,
                    "bringingAnyone": null,
                    "show": null,
                    "aggregatedPrice": null,
                    "status": null,
                    "categoryId": null,
                    "category": null,
                    "priority": [],
                    "gallery": [],
                    "recurringCycle": null,
                    "recurringSub": null,
                    "recurringPayment": null,
                    "translations": null,
                    "minSelectedExtras": null,
                    "mandatoryExtra": null,
                    "customPricing": "{\"enabled\":false,\"durations\":{}}",
                    "maxExtraPeople": null,
                    "limitPerCustomer": null
                },
                {
                    "id": 2,
                    "name": null,
                    "description": null,
                    "color": null,
                    "price": 0,
                    "deposit": null,
                    "depositPayment": null,
                    "depositPerPerson": null,
                    "pictureFullPath": null,
                    "pictureThumbPath": null,
                    "extras": [],
                    "coupons": [],
                    "position": null,
                    "settings": null,
                    "fullPayment": null,
                    "minCapacity": 1,
                    "maxCapacity": 1,
                    "duration": null,
                    "timeBefore": null,
                    "timeAfter": null,
                    "bringingAnyone": null,
                    "show": null,
                    "aggregatedPrice": null,
                    "status": null,
                    "categoryId": null,
                    "category": null,
                    "priority": [],
                    "gallery": [],
                    "recurringCycle": null,
                    "recurringSub": null,
                    "recurringPayment": null,
                    "translations": null,
                    "minSelectedExtras": null,
                    "mandatoryExtra": null,
                    "customPricing": "{\"enabled\":false,\"durations\":{}}",
                    "maxExtraPeople": null,
                    "limitPerCustomer": null
                }
            ],
            "dayOffList": [
                {
                    "id": 10,
                    "name": "Day off 1",
                    "startDate": "2023-09-17",
                    "endDate": "2023-09-17",
                    "repeat": 0
                }
            ],
            "specialDayList": [
                {
                    "id": 7,
                    "startDate": "2023-11-15",
                    "endDate": "2023-11-15",
                    "periodList": [
                        {
                            "id": null,
                            "startTime": "13:00:00",
                            "endTime": "14:30:00",
                            "locationId": 2,
                            "periodServiceList": [
                                {
                                    "id": null,
                                    "serviceId": 2
                                }
                            ],
                            "periodLocationList": [
                                {
                                    "id": null,
                                    "locationId": 2
                                },
                                {
                                    "id": null,
                                    "locationId": 1
                                }
                            ]
                        }
                    ]
                }
            ],
            "locationId": 1,
            "googleCalendar": null,
            "outlookCalendar": null,
            "timeZone": "Europe/Belgrade",
            "description": null
        },
        "sendEmployeePanelAccessEmail": false,
        "password": null
    }
}

Update employee

Update employee details.

Method

This endpoint accepts POST requests.

Path

/users/providers/{{provider_id}}

Optional Properties

Key Type Description
firstName string The first name of the employee
lastName string The last name of the employee
email string The email of the employee. This field must be unique
locationId integer The default location of the employee. This field id only required if there are any locations in the system.
serviceList
array An array of the services assigned to the employee. This field is required for the employee to be visible on the form.
weekDayList
array An array of that defines the employee’s working hours. This field is required for the employee to be visible on the form.
status string The status of the employee. Possible values: “hidden”, “visible”. The default value is “visible”
externalId
integer The id of the WP user tied to this Amelia user.
countryPhoneIso
string The country phone ISO tied to the phone number.
phone
string The phone of the employee.
zoomUserId
string The zoom user id.
note
string The internal employee note.
description
string The description of the employee
pictureFullPath
string The path to the employee picture.
pictureThumbPath
string The path to the employee picture.
specialDayList
array An array of special days.
dayOffList
array An array of the days off list.
sendEmployeePanelAccessEmail
boolean Whether to send the employee panel link after creating the employee.
descriptionHtml
string The description of the employee in HTML
timeZone
string The employee timezone. The wordpress timezone will be used by default

Example

curl --location 'http://localhost/amelia/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/users/providers/88' \
--header 'Content-Type: application/json' \
--header 'Amelia: qUmkNNOLrWbf28izIgNnZ29O+7gVWL5M+8ySJ8VXq3r0' \
--data-raw '{
    "status": "visible",
    "firstName": "Amelia2",
    "lastName": "New Last Name",
    "email": "[email protected]",
    "externalId": "",
    "locationId": 1,
    "phone": "",
    "countryPhoneIso": "rs",
    "note": "",
    "description": "",
    "pictureFullPath": "",
    "pictureThumbPath": "",
    "serviceList": [
        {
            "id": 4,
            "price": 45,
            "minCapacity": 1,
            "maxCapacity": 6,
            "customPricing": "{\"enabled\":false,\"durations\":{}}"
        },
         {
            "id": 2,
            "price": 20,
            "minCapacity": 1,
            "maxCapacity": 1,
            "customPricing": "{\"enabled\":false,\"durations\":{}}"
        }
    ]  
}'

{
    "message": "Successfully",
    "data": {
        "user": {
            "id": 88,
            "firstName": "Amelia2",
            "lastName": "New Last Name",
            "birthday": null,
            "email": "[email protected]",
            "phone": "",
            "type": "provider",
            "status": "visible",
            "note": null,
            "zoomUserId": null,
            "countryPhoneIso": "rs",
            "externalId": null,
            "pictureFullPath": null,
            "pictureThumbPath": null,
            "translations": null,
            "weekDayList": [
                {
                    "id": 89,
                    "dayIndex": 1,
                    "startTime": "09:00:00",
                    "endTime": "17:00:00",
                    "timeOutList": [],
                    "periodList": [
                        {
                            "id": 82,
                            "startTime": "09:00:00",
                            "endTime": "17:00:00",
                            "locationId": null,
                            "periodServiceList": [],
                            "periodLocationList": []
                        }
                    ]
                },
                {
                    "id": 90,
                    "dayIndex": 2,
                    "startTime": "09:00:00",
                    "endTime": "17:00:00",
                    "timeOutList": [],
                    "periodList": [
                        {
                            "id": 83,
                            "startTime": "09:00:00",
                            "endTime": "17:00:00",
                            "locationId": null,
                            "periodServiceList": [],
                            "periodLocationList": []
                        }
                    ]
                },
                {
                    "id": 91,
                    "dayIndex": 3,
                    "startTime": "09:00:00",
                    "endTime": "17:00:00",
                    "timeOutList": [],
                    "periodList": [
                        {
                            "id": 84,
                            "startTime": "09:00:00",
                            "endTime": "17:00:00",
                            "locationId": null,
                            "periodServiceList": [],
                            "periodLocationList": []
                        }
                    ]
                },
                {
                    "id": 92,
                    "dayIndex": 4,
                    "startTime": "09:00:00",
                    "endTime": "17:00:00",
                    "timeOutList": [],
                    "periodList": [
                        {
                            "id": 85,
                            "startTime": "09:00:00",
                            "endTime": "17:00:00",
                            "locationId": null,
                            "periodServiceList": [],
                            "periodLocationList": []
                        }
                    ]
                },
                {
                    "id": 93,
                    "dayIndex": 5,
                    "startTime": "09:00:00",
                    "endTime": "17:00:00",
                    "timeOutList": [],
                    "periodList": [
                        {
                            "id": 86,
                            "startTime": "09:00:00",
                            "endTime": "17:00:00",
                            "locationId": null,
                            "periodServiceList": [],
                            "periodLocationList": []
                        }
                    ]
                }
            ],
            "serviceList": [
                {
                    "id": 4,
                    "name": "Service 2",
                    "description": "",
                    "color": "#1788FB",
                    "price": 45,
                    "deposit": 20,
                    "depositPayment": "fixed",
                    "depositPerPerson": true,
                    "pictureFullPath": null,
                    "pictureThumbPath": null,
                    "extras": [],
                    "coupons": [],
                    "position": 16,
                    "settings": "{\"payments\":{\"paymentLinks\":{\"enabled\":true,\"changeBookingStatus\":false,\"redirectUrl\":null},\"onSite\":true,\"payPal\":{\"enabled\":true},\"stripe\":{\"enabled\":true},\"mollie\":{\"enabled\":false},\"razorpay\":{\"enabled\":false},\"square\":{\"enabled\":true}},\"zoom\":{\"enabled\":true},\"lessonSpace\":{\"enabled\":true},\"activation\":{\"version\":\"6.2.3\"}}",
                    "fullPayment": false,
                    "minCapacity": 1,
                    "maxCapacity": 6,
                    "duration": 3600,
                    "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\"}"
                },
                {
                    "id": 2,
                    "name": "milica service",
                    "description": "",
                    "color": "#1788FB",
                    "price": 20,
                    "deposit": 20,
                    "depositPayment": "fixed",
                    "depositPerPerson": false,
                    "pictureFullPath": null,
                    "pictureThumbPath": null,
                    "extras": [],
                    "coupons": [],
                    "position": 5,
                    "settings": "{\"payments\":{\"onSite\":true,\"stripe\":{\"enabled\":true},\"razorpay\":{\"enabled\":false},\"paymentLinks\":{\"enabled\":true,\"changeBookingStatus\":false,\"redirectUrl\":null},\"payPal\":{\"enabled\":false},\"mollie\":{\"enabled\":false}},\"zoom\":{\"enabled\":true},\"lessonSpace\":{\"enabled\":false},\"activation\":{\"version\":\"6.6\"}}",
                    "fullPayment": false,
                    "minCapacity": 1,
                    "maxCapacity": 1,
                    "duration": 1800,
                    "timeBefore": null,
                    "timeAfter": null,
                    "bringingAnyone": true,
                    "show": true,
                    "aggregatedPrice": true,
                    "status": "visible",
                    "categoryId": 1,
                    "category": null,
                    "priority": [],
                    "gallery": [],
                    "recurringCycle": "all",
                    "recurringSub": "future",
                    "recurringPayment": 999,
                    "translations": null,
                    "minSelectedExtras": null,
                    "mandatoryExtra": false,
                    "customPricing": "{\"enabled\":false,\"durations\":{}}",
                    "maxExtraPeople": null,
                    "limitPerCustomer": "{\"enabled\":false,\"numberOfApp\":null,\"period\":null,\"timeFrame\":null,\"from\":null}"
                }
            ],
            "dayOffList": [
                {
                    "id": 10,
                    "name": "Day off 1",
                    "startDate": "2023-09-17",
                    "endDate": "2023-09-17",
                    "repeat": 0
                }
            ],
            "specialDayList": [
                {
                    "id": 7,
                    "startDate": "2023-11-15",
                    "endDate": "2023-11-15",
                    "periodList": [
                        {
                            "id": 7,
                            "startTime": "13:00:00",
                            "endTime": "14:30:00",
                            "locationId": 1,
                            "periodServiceList": [
                                {
                                    "id": 4,
                                    "serviceId": 2
                                }
                            ],
                            "periodLocationList": [
                                {
                                    "id": 6,
                                    "locationId": 1
                                },
                                {
                                    "id": 5,
                                    "locationId": 2
                                }
                            ]
                        }
                    ]
                }
            ],
            "locationId": 1,
            "googleCalendar": {
                "calendarList": [],
                "calendarId": null
            },
            "outlookCalendar": {
                "calendarList": [],
                "calendarId": null
            },
            "timeZone": "Europe/Belgrade",
            "description": null,
            "activity": "available"
        },
        "is_wp_user": false,
        "sendEmployeePanelAccessEmail": false,
        "password": null
    }
}

Get employee

Retrieve employee details.

Method

This endpoint accepts GET requests.

Path

/users/providers/{{provider_id}}

Example

curl --location 'http://localhost/amelia/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/users/providers/88' \
--header 'Amelia: qUmkNNOLrWbf28izIgNnZ29O+7gVWL5M+8ySJ8VXq3r0'
{
    "message": "Successfully retrieved user.",
    "data": {
        "user": {
            "id": 88,
            "firstName": "Amelia2",
            "lastName": "New Last Name",
            "birthday": null,
            "email": "[email protected]",
            "phone": "",
            "type": "provider",
            "status": "visible",
            "note": null,
            "zoomUserId": null,
            "countryPhoneIso": "rs",
            "externalId": null,
            "pictureFullPath": null,
            "pictureThumbPath": null,
            "translations": null,
            "weekDayList": [
                {
                    "id": 89,
                    "dayIndex": 1,
                    "startTime": "09:00:00",
                    "endTime": "17:00:00",
                    "timeOutList": [],
                    "periodList": [
                        {
                            "id": 82,
                            "startTime": "09:00:00",
                            "endTime": "17:00:00",
                            "locationId": null,
                            "periodServiceList": [],
                            "periodLocationList": []
                        }
                    ]
                },
                {
                    "id": 90,
                    "dayIndex": 2,
                    "startTime": "09:00:00",
                    "endTime": "17:00:00",
                    "timeOutList": [],
                    "periodList": [
                        {
                            "id": 83,
                            "startTime": "09:00:00",
                            "endTime": "17:00:00",
                            "locationId": null,
                            "periodServiceList": [],
                            "periodLocationList": []
                        }
                    ]
                },
                {
                    "id": 91,
                    "dayIndex": 3,
                    "startTime": "09:00:00",
                    "endTime": "17:00:00",
                    "timeOutList": [],
                    "periodList": [
                        {
                            "id": 84,
                            "startTime": "09:00:00",
                            "endTime": "17:00:00",
                            "locationId": null,
                            "periodServiceList": [],
                            "periodLocationList": []
                        }
                    ]
                },
                {
                    "id": 92,
                    "dayIndex": 4,
                    "startTime": "09:00:00",
                    "endTime": "17:00:00",
                    "timeOutList": [],
                    "periodList": [
                        {
                            "id": 85,
                            "startTime": "09:00:00",
                            "endTime": "17:00:00",
                            "locationId": null,
                            "periodServiceList": [],
                            "periodLocationList": []
                        }
                    ]
                },
                {
                    "id": 93,
                    "dayIndex": 5,
                    "startTime": "09:00:00",
                    "endTime": "17:00:00",
                    "timeOutList": [],
                    "periodList": [
                        {
                            "id": 86,
                            "startTime": "09:00:00",
                            "endTime": "17:00:00",
                            "locationId": null,
                            "periodServiceList": [],
                            "periodLocationList": []
                        }
                    ]
                }
            ],
            "serviceList": [
                {
                    "id": 4,
                    "name": "Service 2",
                    "description": "",
                    "color": "#1788FB",
                    "price": 45,
                    "deposit": 20,
                    "depositPayment": "fixed",
                    "depositPerPerson": true,
                    "pictureFullPath": null,
                    "pictureThumbPath": null,
                    "extras": [],
                    "coupons": [],
                    "position": 16,
                    "settings": "{\"payments\":{\"paymentLinks\":{\"enabled\":true,\"changeBookingStatus\":false,\"redirectUrl\":null},\"onSite\":true,\"payPal\":{\"enabled\":true},\"stripe\":{\"enabled\":true},\"mollie\":{\"enabled\":false},\"razorpay\":{\"enabled\":false},\"square\":{\"enabled\":true}},\"zoom\":{\"enabled\":true},\"lessonSpace\":{\"enabled\":true},\"activation\":{\"version\":\"6.2.3\"}}",
                    "fullPayment": false,
                    "minCapacity": 1,
                    "maxCapacity": 6,
                    "duration": 3600,
                    "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\"}"
                },
                {
                    "id": 2,
                    "name": "milica service",
                    "description": "",
                    "color": "#1788FB",
                    "price": 20,
                    "deposit": 20,
                    "depositPayment": "fixed",
                    "depositPerPerson": false,
                    "pictureFullPath": null,
                    "pictureThumbPath": null,
                    "extras": [],
                    "coupons": [],
                    "position": 5,
                    "settings": "{\"payments\":{\"onSite\":true,\"stripe\":{\"enabled\":true},\"razorpay\":{\"enabled\":false},\"paymentLinks\":{\"enabled\":true,\"changeBookingStatus\":false,\"redirectUrl\":null},\"payPal\":{\"enabled\":false},\"mollie\":{\"enabled\":false}},\"zoom\":{\"enabled\":true},\"lessonSpace\":{\"enabled\":false},\"activation\":{\"version\":\"6.6\"}}",
                    "fullPayment": false,
                    "minCapacity": 1,
                    "maxCapacity": 1,
                    "duration": 1800,
                    "timeBefore": null,
                    "timeAfter": null,
                    "bringingAnyone": true,
                    "show": true,
                    "aggregatedPrice": true,
                    "status": "visible",
                    "categoryId": 1,
                    "category": null,
                    "priority": [],
                    "gallery": [],
                    "recurringCycle": "all",
                    "recurringSub": "future",
                    "recurringPayment": 999,
                    "translations": null,
                    "minSelectedExtras": null,
                    "mandatoryExtra": false,
                    "customPricing": "{\"enabled\":false,\"durations\":{}}",
                    "maxExtraPeople": null,
                    "limitPerCustomer": "{\"enabled\":false,\"numberOfApp\":null,\"period\":null,\"timeFrame\":null,\"from\":null}"
                }
            ],
            "dayOffList": [
                {
                    "id": 10,
                    "name": "Day off 1",
                    "startDate": "2023-09-17",
                    "endDate": "2023-09-17",
                    "repeat": 0
                }
            ],
            "specialDayList": [
                {
                    "id": 7,
                    "startDate": "2023-11-15",
                    "endDate": "2023-11-15",
                    "periodList": [
                        {
                            "id": 7,
                            "startTime": "13:00:00",
                            "endTime": "14:30:00",
                            "locationId": 1,
                            "periodServiceList": [
                                {
                                    "id": 4,
                                    "serviceId": 2
                                }
                            ],
                            "periodLocationList": [
                                {
                                    "id": 6,
                                    "locationId": 1
                                },
                                {
                                    "id": 5,
                                    "locationId": 2
                                }
                            ]
                        }
                    ]
                }
            ],
            "locationId": 1,
            "googleCalendar": {
                "calendarList": [],
                "calendarId": null
            },
            "outlookCalendar": {
                "calendarList": [],
                "calendarId": null
            },
            "timeZone": "Europe/Belgrade",
            "description": null,
            "activity": "available"
        },
        "successfulGoogleConnection": true,
        "successfulOutlookConnection": true,
        "futureAppointmentsServicesIds": []
    }
}

Get employee delete effect

See if the employee can be deleted safely, based on future appointments.

Method

This endpoint accepts GET requests.

Path

/users/providers/effect/{{provider_id}}

Example

curl --location 'http://localhost/amelia/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/users/providers/effect/88' \
--header 'Amelia: qUmkNNOLrWbf28izIgNnZ29O+7gVWL5M+8ySJ8VXq3r0'
{
    "message": "Successfully retrieved message.",
    "data": {
        "valid": true,
        "message": ""
    }
}

Get employees

Retrieve employees.

Method

This endpoint accepts GET requests.

Path

/providers

Optional Properties

You can use the following query parameters for paging/filtering the employees.

Key Type Description
page
integer The page of the returned locations
search string The search term. The lookup includes first name, last name, email and note
services
array An array of services to filter employees by.
location array The location ids by which to filter employees by.

Example

curl --location 'http://localhost/amelia/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/users/providers&page=1&search=employee&services[0]=2&location=1' \
--header 'Amelia: qUmkNNOLrWbf28izIgNnZ29O+7gVWL5M+8ySJ8VXq3r0'
{
    "message": "Successfully retrieved users.",
    "data": {
        "users": [
            {
                "id": 3,
                "firstName": "Milica2",
                "lastName": "Employee2",
                "birthday": null,
                "email": "[email protected]",
                "phone": "",
                "type": "provider",
                "status": "visible",
                "note": null,
                "zoomUserId": null,
                "countryPhoneIso": "rs",
                "externalId": 6,
                "pictureFullPath": null,
                "pictureThumbPath": null,
                "translations": null,
                "weekDayList": [],
                "serviceList": [],
                "dayOffList": [],
                "specialDayList": [],
                "locationId": null,
                "googleCalendar": null,
                "outlookCalendar": null,
                "timeZone": null,
                "description": "",
                "activity": "available"
            },
            {
                "id": 88,
                "firstName": "Amelia2",
                "lastName": "New Last Name",
                "birthday": null,
                "email": "[email protected]",
                "phone": "",
                "type": "provider",
                "status": "visible",
                "note": null,
                "zoomUserId": null,
                "countryPhoneIso": "rs",
                "externalId": null,
                "pictureFullPath": null,
                "pictureThumbPath": null,
                "translations": null,
                "weekDayList": [],
                "serviceList": [],
                "dayOffList": [],
                "specialDayList": [],
                "locationId": null,
                "googleCalendar": null,
                "outlookCalendar": null,
                "timeZone": "Europe/Belgrade",
                "description": null,
                "activity": "available"
            }
        ],
        "countFiltered": 2,
        "countTotal": 6
    }
}

Delete employee

Delete employee.

Method

This endpoint accepts POST requests.

Path

/users/providers/delete/{{provider_id}}

Example

curl --location --request POST 'http://localhost/amelia/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/users/providers/delete/88' \
--header 'Amelia: qUmkNNOLrWbf28izIgNnZ29O+7gVWL5M+8ySJ8VXq3r0'
{
    "message": "Successfully deleted user.",
    "data": []
}