Web service endpoint to attach a list of vouchers (identified by voucher codes) to an Atlas Eligibility record specified by the atlas_eligibility_code. Voucher Codes are pre-agreed discount codes between PSI and the customer (identified by account_code). Post this operation any previously attached vouchers to the eligibility record but not listed in the payload will be unlinked from the eligibility and the new ones will be linked.

API Authentication

HTTPS requests to PSI REST APIs are protected with oAuth2 based authentication. To learn more about how PSI handles authentication, please refer to our authentication section

Request

PUT https:///accounts/{account_code}/candidates/{candidate_id}/tests/{test_code}/vouchers

Path parameters

Parameter name Value Description Additional
account_code string

Account code or the customer code. This is the unique, randomly generated alphanumeric identifier for the client Account.

Required
candidate_id string

Candidate Id

Required
test_code string

The test code is the code provided by the client for an exam.

Required

Request body

The request body takes an array of String Array resources, containing the following writable properties:

[
    {}
]

Properties

Name Type Description Additional

Authorisation

This request requires the use of one of following authorisation methods: OAuth2.

Response

The following HTTP status codes may be returned, optionally with a response resource.

Status code Description Resource
204 No Content

Vouchers Codes successfully attached to the candidate eligibility record

400 Bad Request


Below is the list of possible error descriptions in case of bad request or error.

scenario : Invalid account code.
error_description : Unable to get the account details for the given accountCode.

scenario : Invalid test code.
error_description : No mapping found for the given test code.

scenario : Invalid candidate id.
error_description : Candidate details not found for the given candidate id.

scenario : Empty voucher code array passed.
error_description : Error, Atleast one Voucher code should be passed to update the vouchers for eligibility.

Error Model
401 Unauthorized

You are not authorized to access this resource.

Error Model
403 Forbidden

Forbidden operation.

Error Model
404 Not Found

The specified Eligibility or Registration Record could not be located in PSI ATLAS system

Error Model
500 Internal Server Error

Error in case of server errors.

Error Model

Explore this API

account_code

Account code or the customer code. This is the unique, randomly generated alphanumeric identifier for the client Account.

candidate_id

Candidate Id

test_code

The test code is the code provided by the client for an exam.

payload

Voucher Codes to be applied to the candidate's specified exam record

Request Content-Type
Response Content-Type

Choose an authorisation method:

Access Token Access token to be used for request
Try it out!