Reference code

Represents the reference code of an applicant.

URI
/api/v10/applicants/ID/reference

GET Get a reference code

Retrieve the reference code of an applicant as a JSON-encoded string. The value is enclosed in double quotes and formatted as a JSON string literal. If no reference code is defined, the request returns null.

The reference code is an external identifier associated with the applicant. Common examples include the applicant ID, code or student ID from an external system, such as a Study Information System (SIS).

Syntax
GET /api/v10/applicants/123/reference
Host: apply.example.edu
Authorization: DREAM apikey="..."

Example request

Request
curl
curl \
  -X GET \
  -H "Authorization: DREAM apikey=\"YOUR-API-KEY\"" \
  "https://apply.example.edu/api/v10/applicants/123/reference"

Response headers

HeaderValueDescription
Content-Typeapplication/json; charset=utf-8The media type of the resource

Response codes

Response codeDescription
200 OKThe reference code was successfully returned

Example response

Response
curl
"ABC123"

PUT Set a reference code

Update the applicant’s reference code with the value provided in the request body.

The request body must contain a JSON-encoded string literal that meets the following requirements:

  • The value must be enclosed in double quotes, for example, "ABC123", not ABC123.
  • The allowed length is 3 to 16 characters.
  • Allowed characters include uppercase letters (A-Z), numbers (0-9), periods (.), hyphens (-) and forward slashes (/).
  • The reference code must be unique. If the specified code is already assigned to another applicant, the request returns the 400 Bad Request error.
Syntax
PUT /api/v10/applicants/123/reference
Host: apply.example.edu
Authorization: DREAM apikey="..."

Example request

Request
curl
curl \
  -X PUT \
  -d '"ABC123"' \
  -H "Authorization: DREAM apikey=\"YOUR-API-KEY\"" \
  "https://apply.example.edu/api/v10/applicants/123/reference"

Response headers

HeaderValueDescription
Content-Typetext/plainThe media type of the resource
Content-Length0The size of the response body in bytes

Response codes

Response codeDescription
204 No ContentThe reference code was successfully updated
400 Bad RequestThis reference is already assigned to another applicant
400 Bad RequestThe reference code is invalid, see the error description for details