Connecting to the scheduling system
Requests to the scheduling system must be authenticated using a bearer token. All pre-requisite data must also be created and configured in the Surpass Platform and Scheduler before requests to Scheduler are made. For more information read Preparing to integrate with the scheduling system.
This article explains how to connect to the scheduling system, which permissions are required to successfully call each API, and what data must be created in Surpass.
Import this API into your Postman Workspace
In this section
Authenticating requests to the scheduling system
To authenticate requests sent to Scheduler, first generate a bearer token by calling the token endpoint, and then pass your token in your requests.
Generating a bearer token
Send a request to the endpoint to generate a bearer token.
Parameters
Parameters are passed with the endpoint to influence the response. Header parameters are included in the request header. Path parameters are extensions of the endpoint, and query parameters follow ? after any path parameters.
|
Name |
Parameter |
Input |
Description |
|---|---|---|---|
|
content-type |
header MANDATORY |
application/json |
Determines data format of the request, which must be JSON. |
|
content-length |
header MANDATORY |
{number} |
Determines the number of characters passed in the body of the request, where {number} is a numerical figure. This is usually automatically calculated when the request is sent. |
|
accept |
header OPTIONAL |
application/json |
Determines data format of the response, which must be JSON. |
Sample request
The following request contains the minimum required request body to generate a token.
{
"email": "stuart.fenwick@surpass.com",
"password": "Password1"
}Request body schema
The request body schema contains a description of every property that can be passed with this endpoint.
email string
The user’s email address.
password string
The user’s password.
Sample response
If successful, the HTTP status code will be 200 and the response body will contain the generated token.
{
"id": "fa8d0dcc-3a06-4b8a-9d86-6246c14b1e2f",
"email": "stuart.fenwick@surpass.com",
"token": "eyJhbGciOiJIUzI1NiIsInR4cCI6GkxXVCJ9eyJzYic6ImYtOGQwZGNjLTNhMzYtNGFhLTlkOzYuNjI2dGI0YjE0YyIsInVuaXF1ZV9uYW1lIjoic3R1YXJ0LmZlbndpY2tAc3VycGFzcy5jb20iLCJlbWFpbCI6InN0dWFydC5mZW53aWNrQHN1cnBhc3MuY29tIiwicm9sZSI6IlRpbWV0YWJsZXItQWRtaW5pc3RyYXRvciIsInRlbmFudCI6IjEiLCJqdGkiOiIxNzAxMTQ1Ny1iNDA1LTQ2MGQtYTE3ZS1lN2EwOGE5OGMzNTAiLCJpYXQiOiIxNzQ2MDA1NDE5IiwibmJmIjoxNzQ2MDA1NDE5LCJleHAiOjE3NDYwOTE4MTksImlzcyI6Imh0dHBzOi8ve1NjaGVkdWxlciBpbnN0YW5jZX0iLCJhdWQiOiJodHRwczovL3tTY2hlZHVsZXIgaW5zdGFuY2V9In0j77+9Ty4ZGH0YSBk8EAMnfgwCBA==",
"access_token": "eyJhbGciOiJIUzI1NiIsInR4cCI6GkxXVCJ9eyJzYic6ImYtOGQwZGNjLTNhMzYtNGFhLTlkOzYuNjI2dGI0YjE0YyIsInVuaXF1ZV9uYW1lIjoic3R1YXJ0LmZlbndpY2tAc3VycGFzcy5jb20iLCJlbWFpbCI6InN0dWFydC5mZW53aWNrQHN1cnBhc3MuY29tIiwicm9sZSI6IlRpbWV0YWJsZXItQWRtaW5pc3RyYXRvciIsInRlbmFudCI6IjEiLCJqdGkiOiIxNzAxMTQ1Ny1iNDA1LTQ2MGQtYTE3ZS1lN2EwOGE5OGMzNTAiLCJpYXQiOiIxNzQ2MDA1NDE5IiwibmJmIjoxNzQ2MDA1NDE5LCJleHAiOjE3NDYwOTE4MTksImlzcyI6Imh0dHBzOi8ve1NjaGVkdWxlciBpbnN0YW5jZX0iLCJhdWQiOiJodHRwczovL3tTY2hlZHVsZXIgaW5zdGFuY2V9In0j77+9Ty4ZGH0YSBk8EAMnfgwCBA==",
"expiry_date": "2025-05-01T09:30:19Z",
"expires": "2025-05-01T09:30:19Z",
"issuer": "https://{Scheduler instance}",
"refreshToken": "9Eb0KZvIIESp2AzkEnijtvfHHOgGWchpnwxt8OkCpTiqeFczW/B92ZAu74dQXg+zqoKE4EuuLLybUQiHqtdxIw==",
"refreshTokenExpires": "2025-10-18T12:47:19.742245"
}Response body schema
The response body schema contains a description of every property that is returned by this endpoint.
id string
The token’s unique identifier.
email string
The email address of the user who made the request.
token string
The token string.
access_token string
The token string.
expiry_date string
The token’s expiry date, in YYYY-MM-DDTHH:MM:SS format.
expires string
The token’s expiry date, in YYYY-MM-DDTHH:MM:SS format.
issuer string
The token issuer, which is a Scheduler instance.
refreshToken string
The refresh token’s string.
refreshTokenExpires string
The refresh token’s expiry date, in YYYY-MM-DDTHH:MM:SS format.
Passing a bearer token
Send your bearer token in an authorization header. This is documented in the parameters tables of the reference documentation as follows:
|
Name |
Parameter |
Input |
Description |
|---|---|---|---|
|
authorization |
header MANDATORY |
Bearer {token} |
A bearer token must be passed to authorise the user’s request, where {token} is the token string. |
If using the ‘Scheduling System’ Postman collection, include your token in the Token field in Authorization:

All requests in the collection are configured to inherit this token.
Refreshing a bearer token
Send a request to the endpoint to refresh a bearer token.
Parameters
Parameters are passed with the endpoint to influence the response. Header parameters are included in the request header. Path parameters are extensions of the endpoint, and query parameters follow ? after any path parameters.
|
Name |
Parameter |
Input |
Description |
|---|---|---|---|
|
content-type |
header MANDATORY |
application/json |
Determines data format of the request, which must be JSON. |
|
content-length |
header MANDATORY |
{number} |
Determines the number of characters passed in the body of the request, where {number} is a numerical figure. This is usually automatically calculated when the request is sent. |
|
accept |
header OPTIONAL |
application/json |
Determines data format of the response, which must be JSON. |
Sample request
The following request contains the minimum required request body to refresh your token.
{
"token": "9Eb0KZvIIESp2AzkEnijtvfHHOgGWchpnwxt8OkCpTiqeFczW/B92ZAu74dQXg+zqoKE4EuuLLybUQiHqtdxIw=="
}Request body schema
The request body schema contains a description of every property that can be passed with this endpoint.
token string
The refresh token.
Sample response
If successful, the HTTP status code will be 200 and the response body will contain the generated token.
{
"id": "fa8d0dcc-3a06-4b8a-9d86-6246c14b1e2f",
"email": "stuart.fenwick@surpass.com",
"token": "eyJhbGciOiJIUzI1NiIsInR4cCI6GkxXVCJ9eyJzYic6ImYtOGQwZGNjLTNhMzYtNGFhLTlkOzYuNjI2dGI0YjE0YyIsInVuaXF1ZV9uYW1lIjoic3R1YXJ0LmZlbndpY2tAc3VycGFzcy5jb20iLCJlbWFpbCI6InN0dWFydC5mZW53aWNrQHN1cnBhc3MuY29tIiwicm9sZSI6IlRpbWV0YWJsZXItQWRtaW5pc3RyYXRvciIsInRlbmFudCI6IjEiLCJqdGkiOiIxNzAxMTQ1Ny1iNDA1LTQ2MGQtYTE3ZS1lN2EwOGE5OGMzNTAiLCJpYXQiOiIxNzQ2MDA1NDE5IiwibmJmIjoxNzQ2MDA1NDE5LCJleHAiOjE3NDYwOTE4MTksImlzcyI6Imh0dHBzOi8ve1NjaGVkdWxlciBpbnN0YW5jZX0iLCJhdWQiOiJodHRwczovL3tTY2hlZHVsZXIgaW5zdGFuY2V9In0j77+9Ty4ZGH0YSBk8EAMnfgwCBA==",
"access_token": "eyJhbGciOiJIUzI1NiIsInR4cCI6GkxXVCJ9eyJzYic6ImYtOGQwZGNjLTNhMzYtNGFhLTlkOzYuNjI2dGI0YjE0YyIsInVuaXF1ZV9uYW1lIjoic3R1YXJ0LmZlbndpY2tAc3VycGFzcy5jb20iLCJlbWFpbCI6InN0dWFydC5mZW53aWNrQHN1cnBhc3MuY29tIiwicm9sZSI6IlRpbWV0YWJsZXItQWRtaW5pc3RyYXRvciIsInRlbmFudCI6IjEiLCJqdGkiOiIxNzAxMTQ1Ny1iNDA1LTQ2MGQtYTE3ZS1lN2EwOGE5OGMzNTAiLCJpYXQiOiIxNzQ2MDA1NDE5IiwibmJmIjoxNzQ2MDA1NDE5LCJleHAiOjE3NDYwOTE4MTksImlzcyI6Imh0dHBzOi8ve1NjaGVkdWxlciBpbnN0YW5jZX0iLCJhdWQiOiJodHRwczovL3tTY2hlZHVsZXIgaW5zdGFuY2V9In0j77+9Ty4ZGH0YSBk8EAMnfgwCBA==",
"expiry_date": "2025-05-01T09:30:19Z",
"expires": "2025-05-01T09:30:19Z",
"issuer": "https://{Scheduler instance}",
"refreshToken": "9Eb0KZvIIESp2AzkEnijtvfHHOgGWchpnwxt8OkCpTiqeFczW/B92ZAu74dQXg+zqoKE4EuuLLybUQiHqtdxIw==",
"refreshTokenExpires": "2025-10-18T12:47:19.742245"
}Response body schema
The response body schema contains a description of every property that is returned by this endpoint.
id string
The token’s unique identifier.
email string
The email address of the user who made the request.
token string
The token string.
access_token string
The token string.
expiry_date string
The token’s expiry date, in YYYY-MM-DDTHH:MM:SS format.
expires string
The token’s expiry date, in YYYY-MM-DDTHH:MM:SS format.
issuer string
The token issuer, which is a Scheduler instance.
refreshToken string
The refresh token’s string.
refreshTokenExpires string
The refresh token’s expiry date, in YYYY-MM-DDTHH:MM:SS format.
Authorising requests to the scheduling system
As the Surpass Test Centre Network team will set up the necessary Scheduler configurations, any requisite user permissions impacting the authorisation of requests is already handled. For more information, read Preparing to integrate with the scheduling system.
Further reading
Now you know how to connect to the scheduling system, read the following articles to learn more: