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/availability/getAppSlots/{jobRef}/{startDate}/{params}
GET
Returns a list of available appointment slots for the given job reference, taking the start date as an optional parameter to filter availability.
Parameters
Available parameters are:
- allowSecondary - Boolean
- true returns results for resources using secondary service cover
- zoneCriteria - Character
- Primary - Only allow primary postcode coverage
- Both - Allow primary and secondary postcode coverage
- Any - Postcode coverage is not used as a determining factor
- teamId - Integer
Example request
https://app.oneserve.co.uk/siteUrl/rest/availability/getAppSlots/J01234/24-Jul-2020/?allowSecondary=true&zoneCriteria=Both&teamId=1
Response Format Spec
Available Response Representations
Example JSON response
Example XML Response
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 POST or DELETE
Resolution
Ensure that you are using a GET call to this endpoint