TestSchedule API

Test sessions are scheduled for particular candidates on a specific date and time. Before scheduling a test, you must have a test and at least one test form and at least one candidate associated with the test’s parent subject.

The TestSchedule API resource is used to schedule and delete test sessions.

This article explains what calls can be made to the Surpass API using the TestSchedule resource.

Import this API into your Postman Workspace

Scheduling a test session

post /api/v2/TestSchedule

Send a request to the endpoint to schedule a candidate for a test session. Successful responses contain the candidate’s keycode and the test session’s PIN.

NOTE: If a candidate is scheduled at the same centre, for the same test, and on the same day as other candidate(s), the PIN generated will be the same as theirs. This differs to the Surpass UI behaviour, where a new PIN is generated for each test session scheduled from the Schedule screen regardless.

Scheduling a test session with newly specified items

post /api/v2/TestSchedule/OverrideItems

Send a request to the endpoint to schedule a candidate for a test session, with a newly specified group of items. Successful responses contain the candidate’s keycode and the test session’s PIN.

NOTE: Although you must specify a test form in a request to this endpoint, the specified test form acts as a "shell" and is replaced by a one section test form that contains the items you specify in the request body, with a 60 minute duration. Once scheduled, this test session behaves as any other test session in the Surpass Platform does after scheduling. No changes to the specified, shell test form are made.

Deleting a scheduled test session

delete /api/v2/TestSchedule/{id}

Send a request to the endpoint to delete a specific test session. No request body is required.

IMPORTANT: Only test sessions in Editable state can be deleted. Test sessions are in Editable state until the test has been downloaded; this is at states 1 (ScheduledButNotCreated) and 2 (ScheduledButNotDownloaded).

Error Codes

Refer to the following table for information on error codes that may be encountered when using this resource.

Further reading

Read the following articles to learn more about similar APIs, how to get started with the Surpass API v2, and how to get the best out of this reference documentation: