Summary
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 an optional parameters to filter availability.
Parameters
Available parameters are:
allowSecondary
- Booleantrue
returns results for resources using secondary service cover
zoneCriteria
- CharacterPrimary
- Only allow primary postcode coverageBoth
- Allow primary and secondary postcode coverageAny
- 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 Fields
Field Name
Data Type
Description
available
Array
An array of available appointment slots
date
Date
The date of the appointment slot
slot
Array
An array of available day divisions
Available Response Representations
HTTP Code | Description | Schema |
---|---|---|
200 | Apppointments | available [Array] |
400 | Bad Request | Error |
401 | Unauthorized | Error |
403 | Forbidden | Error |
404 | Address Not Found | Error |
405 | Method Not Allowed | Error |
500 | Internal Server Error | Error |
Example JSON Response
{
"root": {
"available": [
{
"slot": [
"AM",
"All Day",
"PM"
],
"date": "27/07/2020"
},
{
"slot": [
"AM",
"All Day",
"PM"
],
"date": "28/07/2020"
},
{
"slot": [
"AM",
"All Day",
"PM"
],
"date": "29/07/2020"
}
]
}
}
Example XML Response
<root>
<available>
<date>27/07/2020</date>
<slot>AM</slot>
<slot>All Day</slot>
<slot>PM</slot>
</available>
<available>
<date>28/07/2020</date>
<slot>AM</slot>
<slot>All Day</slot>
<slot>PM</slot>
</available>
<available>
<date>29/07/2020</date>
<slot>AM</slot>
<slot>All Day</slot>
<slot>PM</slot>
</available>
</root>
Troubleshooting
This error occurs if the Verify your This error indicates that something is blocking your connection to the server Open a ticket with the support team with details of your connection so that your access can be verified 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 Verify the endpoint matches the value specified in this article This error will occur if an unacceptable method has been used in the call such as Ensure that you are using a 401 Unauthorized
Response
401 Unauthorized
Reason
OS-REST-AUTH-TOKEN
has not been provided, has expired, or does not exist in the systemResolution
OS-REST-AUTH-TOKEN
with support403 Forbidden
Response
403 Forbidden
Reason
Resolution
404 Not Found
Response
404 Not Found
Reason
Resolution
405 Method Not Allowed
Response
405 Method Not Allowed
Reason
POST
or DELETE
Resolution
GET
call to this endpoint