Implemented JSON API to create Appointments
Handling errors in API