/api/applicants

HEAD, GET

List applicants using the filters set as parameters. The number of applicants is represented in the X-Count header - use the HEAD request to simply count the number of applicants matching the filters. Use the GET request to actually fetch them.

Syntax

GET /api/applicants
Host: apply.example.edu
Authorization: DREAM apikey="..."

Parameters

Name Description Notes
byCitizenships Optional List of ISO 3166-1 alpha-2 country codes [1]
byEmails Optional List of emails [1]
byTrackerIDs Optional List of tracker ID-s [1] [2] 
byTrackerCodes Optional List of tracker codes [1] [2]
  • Note [1]: Lists can be either comma or space separated. All list items are combined with logical OR operators - in other words an application is considered matching if it matches to any of the values in the list.
  • Note [2]: you may use either tracker ID-s or codes to reference trackers. However ID-s are guaranteed not to change while the tracker codes offer no such guarantee.

Response headers

Content-Type: application/json
Content-Length: 1456
X-Count: 15

Response codes

400 Bad Request One of the filters has bad parameters (see error description)

Response example

{
  "123": {
      "registered": "2014-06-20T08:13:41+00:00",
      "name": {
          "given": "Joe",
          "middle": "",
          "family": "Smith"
      },
      "email": "[email protected]",
      "skype": null,
      "phone": "+372 123456789",
      "citizenship": "US",
      "trackers": "/api/applicants/123/trackers",
      "photo": "/api/applicants/123/photo",
      "documents": "/api/applicants/123/documents"
  }
}

POST

Create a new applicant/lead. The owner of the new account will be notified via email, using the applicant-welcome-api template. The welcome letter will also contain the account credentials needed for the applicant to start using his/her new account. Please include any additional instructions in the template - you can configure all templates using the admin interface (look for the “Settings” → “Templates” menu).

The URI for the new applicant account that was created is returned in the Location header.

Note that since this API call will send an email before returning, it is slightly slower than other API calls. This is a deliberate choice to avoid storing the (secrets-containing) email in more intermediate queues than required, while also guaranteeing that if the call succeeds, the email was accepted upstream.

If an applicant/lead with this email address exists, a 409 Conflict will be returned, along with the URI of the offending applicant in the Location header.

Syntax

POST /api/applicants
Host: apply.example.edu
Authorization: DREAM apikey="..."

Parameters

Name Description
email Required A valid email address. Must be unique (see above).
citizenship Optional This is optional, but highly recommended. The citizenship affect all deadlines/fees display for the applicant. If not provided, it will be asked when applicant is logging in. Accepts an ISO 3166-1 alpha-2 country code
name_given Required Given name of the lead/applicant. 1 to 50 characters.
name_middle Optional Middle name of the lead/applicant. 1 to 50 characters.
name_family Required Family name of the lead/applicant. 1 to 50 characters.
phone Optional Phone number of the lead/applicant, for example “+372 123456789”. Up to 30 characters.
notes Optional Any notes accompanying the lead/applicant. Up to 2048 characters.

Response headers

Content-Type: application/json
Content-Length: 0
Location: /api/applicants/12345

Response codes

201 Created New applicant/lead was created
409 Conflict An applicant with this email address already exists