Reference code
API version
Select a version to change the base URI
in syntax and code examples. Learn about versions:
in syntax and code examples. Learn about versions
Represents the reference code of an applicant.
URI
/api/v10/applicants/ID/referenceGET 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
| Header | Value | Description |
|---|---|---|
Content-Type | application/json; charset=utf-8 | The media type of the resource |
Response codes
| Response code | Description |
|---|---|
200 OK | The 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", notABC123. - 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 Requesterror.
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
| Header | Value | Description |
|---|---|---|
Content-Type | text/plain | The media type of the resource |
Content-Length | 0 | The size of the response body in bytes |
Response codes
| Response code | Description |
|---|---|
204 No Content | The reference code was successfully updated |
400 Bad Request | This reference is already assigned to another applicant |
400 Bad Request | The reference code is invalid, see the error description for details |