Common Errors seen on Appointments/ Bookings Endpoints

All API times for bookings are in UTC time (i.e for a salon based in Canada - If a booking is made at 13:30 it needs to use the time 18:30 because Canada is 5 hours behind).

Here is the full list of issues when trying to book an appointment with the API:

'STAFF_UNQUALIFIED'

The staff you have tried to use is not qualified for the service you are using.

'STAFF_REQUESTED’

When the client wants to request a specific staff member for the appointment.

Seen on these endpoints:

Example:

If "staffRequest" is set to true

When you create an appointment you can request a staff member (this sets staffRequest to true (see screenshot). So say a client wants her hair cut with Lisa so she requests Lisa. If you try to move this appointment to a different staff member later(move it to staff John) then you’ll get STAFF_REQUESTED error because the client/user requested the original staff member(Lisa) not the new staff remember you are moving the appointment to.

When the appointment time moves to another time on the same day or another time on different days the error comes up. The error will only happen for changing staff when clients have already requested that staff member. Moving to a different day/time could give you one of these errors:

  • 'CLIENT_ALREADY_BOOKED_THIS_TIME'

  • 'STAFF_NOT_WORKING' = staff not rostered for the day

If "staffRequest is set to false

On the appointment this error won’t happen. However if they change it to true at any point and then try to move the appointment to a different staff member they’ll get the error.

'STAFF_DOUBLE_BOOKED'

To find times when staff are not booked - You can check the /appointment endpoint to see when staff are booked. Or just use http://developer.phorest.com/#!/Appointments/findAvailableAppointmentTimes

'EXCEEDED_ROOM_CAPACITY'

There is no more physical space in the treatment room - Check machines and rooms are correct for each service http://developer.phorest.com/#!/Service/getBranchServices

'MACHINE_DOUBLE_BOOKED'

There are no more machines available for treatments - Check machines and rooms are correct for each service http://developer.phorest.com/#!/Service/getBranchServices

'ROOM_UNSUITABLE'

Room is not suitable to the type of treatment - Check machines and rooms are correct for each service http://developer.phorest.com/#!/Service/getBranchServices

'SERVICE_ALREADY_BOOKED_THIS_DAY',

Client is already booked for the same day

'INTERNET_BOOKING_ALREADY_BOOKED' or 'CLIENT_ALREADY_BOOKED_THIS_TIME'

Client is already booked for the slot appointment for the same time - You can check the /appointment endpoint or /client-service-history endpoint

'STAFF_NOT_WORKING'

Staff not rostered for the day

General Errors

'MACHINE_UNSUITABLE'
'MIN_DAYS_BETWEEN_SESSIONS_NOT_EXCEEDED'
'MAX_DAYS_BETWEEN_SESSIONS_EXCEEDED'
'SPECIAL_OFFER_BEFORE_START_DATE'
'SPECIAL_OFFER_AFTER_END_DATE'
'SPECIAL_OFFER_NOT_ALLOWED_TIME'
'SPECIAL_OFFER_MAX_CONCURRENT_EXCEEDED'
'SPECIAL_OFFER_MAX_PER_DAY_EXCEEDED'
' SPECIAL_OFFER_STAFF_EXCLUDED'


Check staff are not disqualified for a service http://developer.phorest.com/#!/Service/getBranchServicesCheck machines and rooms are correct for each service http://developer.phorest.com/#!/Service/getBranchServicesCheck Special offer settings before creating a booking http://developer.phorest.com/#!/Service_Special_Offers/getServiceSpecialOffers
Check available appointment times before booking http://developer.phorest.com/#!/Appointments/findAvailableAppointmentTimes