addAppointment API

Requirements 


All API calls require a dedicated JSON Web Token (JWT). These are created when a user with a dedicated mobile resource logs in to the application. If you are using the API for programmatic queries, it is best to create a dedicated user for the JWT as this gets reset each time the user logs in.

Endpoint 


/rest/rs/addAppointment

 

POST


Adds an appointment to a job. Requires that provided activities are not currently assigned to an appointment.

 

File Format Spec 


Available Fields 

 

Request Representations


JSON payload examples 

Screenshot 2023-03-13 at 11.39.39

Available Response Representations



Example Success Response


Screenshot 2023-03-13 at 11.50.06

 

Troubleshooting


401 Unauthorized

Response

401 Unauthorized

Reason

This error occurs if the OS-REST-AUTH-TOKEN has not been provided, has expired, or does not exist in the system

Resolution 

Verify your OS-REST-AUTH-TOKEN with support

 

403 Forbidden

Response 

403 Forbidden

Reason

This error indicates that something is blocking your connection to the server

Resolution

Open a ticket with the support team with details of your connection so that your access can be verified

 

404 Not Found

Response

404 Not Found

Reason

This error should only occur if the endpoint has been mistyped in some way, which will lead the call to an endpoint that does not exist

Resolution

Verify the endpoint matches the value specified in this article

 

405 Method Not Allowed

Response

405 Method Not Allowed

Reason

This error will occur if an unacceptable method has been used in the call such as GET or DELETE

Resolution

Ensure that you are using a POST call to this endpoint

 

One or more activities are either already assigned or complete or are not linked to specified job

Response

{ 
"result": "fail",
   "result_msg": "REST0001",
   "result_error_msg": "One or more activities are either already assigned
or complete or are not linked to specified job"
}

Reason

This error occurs if the provided activity IDs are already assigned to a resource, are fully complete, or don't belong to the job reference passed

Resolution

Ensure that the job reference and activity IDs match and that the activities are not currently