Authorising API Requests

To call the API, you will need two components - the endpoint base address and an API key.

Access to the API

The base endpoint address for all API requests is https://api.updatedge.com. You need to specify this url before any endpoint call.

Request Authorisation

To access the API, you will need an API key. If you do not have one, you can get an evaluation key by contacting us. This key needs to be supplied in the headers of every call.

X-UE-Api-Subscription-Key: <yourkeyhere>

Specifying this key allows the API to identify your subscription and the access rights you have to the workers stored on the platform.

IMPORTANT

If you fail to supply the header key or supply an incorrect key value, you will receive a 401 Unauthorised response.

Resource Access

When you send requests to retrieve data for resources, updatedge will only return data for those resources if they have permitted your company to do so. An example of this would a worker who has added a contact within your company to their contact list.

If you attempt to access resources you do not have access to or that do not exist in the context of request:

  • You will receive an empty 204 No Content if you have no access to all resources either or they do not exist or;
  • when multiple resources are requested, only data for those resources you have access to will be returned, along with a list of resources to which you were denied access.

IMPORTANT

If you request access to a resource and it does not exist or you have no access to all resources, you will receive a 204 No Content response.

Example

To retrieve availability for a list of workers, you would POST the following to the Create endpoint.

[
"xxxx-xxxx-xxxx-xxxx",
"yyyy-yyyy-yyyy-yyyy"
]

If your company had no access to the "yyyy-yyyy-yyyy-yyyy" Worker or they did not exist, you would receive similar to the following:

{
"data": [
{
"workerId": "xxxx-xxxx-xxxx-xxxx",
"unavailableIntervals": [
{
"start": "2019-11-04T00:00:00+00:00",
"end": "2019-11-04T23:59:59+00:00",
"intervalMinutes": 1439
}
],
"availableNowIntervals": []
}
],
"errors": [
{
"title": "Attempted access to unauthorised resource(s).",
"type": "https://apidocs.updatedge.com/docs/errors#unauthorised-resource-access",
"detail": "Access to some of the resources in your request were unauthorised or the resources do not exist.",
"status": 401,
"errors": {
"workerIds": [
"yyyy-yyyy-yyyy-yyyy"
]
}
}
]
}