Custom Field Answer (String)

A custom field answer stores arbitrary data about an applicant, answering the question posed by a custom field.

Attributes

Name Type Description Example
custom_field_answer:custom_field_id integer Unique identifier of the custom field that this answers. 4
custom_field_answer:field_type string Type of data that the custom field stores.
one of:"string"
"string"
custom_field_answer:href string Hypertext reference to this resource.
pattern: /api/v1/user_identities/\d+/programs/\d+/applicants_by_cas_id/\d+/custom_field_answers/\d+
"/api/v1/user_identities/1/programs/2/applicants_by_cas_id/3/custom_field_answers/4"
custom_field_answer:label string Human-readable label of the custom field that this answers. "Hogwarts ID"
custom_field_answer:value nullable string The string value stored as an answer to the custom field. "000-0-0768"

Custom Field Answer (String) Show

Display an existing custom field answer.

GET /api/v1/user_identities/:user_identity_id/programs/:program_id/applicants_by_cas_id/:applicant_cas_id/custom_field_answers/:custom_field_id

Curl Example

$ curl -n https://api.webadmit.org/api/v1/user_identities/:user_identity_id/programs/:program_id/applicants_by_cas_id/:applicant_cas_id/custom_field_answers/:custom_field_id \
  -H "x-api-key: 0123456789abcdef0123456789abcdef"

Response Example

HTTP/1.1 200 OK
{
  "custom_field_answer": {
    "href": "/api/v1/user_identities/1/programs/2/applicants_by_cas_id/3/custom_field_answers/4",
    "custom_field_id": 4,
    "label": "Hogwarts ID",
    "field_type": "string",
    "value": "000-0-0768"
  }
}

Custom Field Answer (String) Store

Store a custom field value. If a value has not previously been stored, this creates an answer. Otherwise, this updates an existing answer.

PUT /api/v1/user_identities/:user_identity_id/programs/:program_id/applicants_by_cas_id/:applicant_cas_id/custom_field_answers/:custom_field_id

Required Parameters

Name Type Description Example
custom_field_answer:field_type string Type of data that the custom field stores.
one of:"string"
"string"
custom_field_answer:value nullable string The string value to be stored as an answer to the custom field. "000-0-0768"

Curl Example

$ curl -n -X PUT https://api.webadmit.org/api/v1/user_identities/:user_identity_id/programs/:program_id/applicants_by_cas_id/:applicant_cas_id/custom_field_answers/:custom_field_id \
  -d '{
  "custom_field_answer": {
    "field_type": "string",
    "value": "000-0-0768"
  }
}' \
  -H "Content-Type: application/json" \
  -H "x-api-key: 0123456789abcdef0123456789abcdef"

Response Example

HTTP/1.1 200 OK
{
  "custom_field_answer": {
    "href": "/api/v1/user_identities/1/programs/2/applicants_by_cas_id/3/custom_field_answers/4",
    "custom_field_id": 4,
    "label": "Hogwarts ID",
    "field_type": "string",
    "value": "000-0-0768"
  }
}

Custom Field Answer (String) Destroy

Clear an existing custom field answer. (Same semantics as PUT with "value": null.) This is a "soft delete" that tracks who made the change.

DELETE /api/v1/user_identities/:user_identity_id/programs/:program_id/applicants_by_cas_id/:applicant_cas_id/custom_field_answers/:custom_field_id

Curl Example

$ curl -n -X DELETE https://api.webadmit.org/api/v1/user_identities/:user_identity_id/programs/:program_id/applicants_by_cas_id/:applicant_cas_id/custom_field_answers/:custom_field_id \
  -H "Content-Type: application/json" \
  -H "x-api-key: 0123456789abcdef0123456789abcdef"

Response Example

HTTP/1.1 200 OK
{
  "custom_field_answer": {
    "href": "/api/v1/user_identities/1/programs/2/applicants_by_cas_id/3/custom_field_answers/4",
    "custom_field_id": 4,
    "label": "Hogwarts ID",
    "field_type": "string",
    "value": null
  }
}

Not Found

Response Example

HTTP/1.1 404 Not Found
{
  "message": "Not Found"
}

While 404 Not Found is most often associated with resources that don't exist when making a GET request, please note that 404 Not Found is also the response during POST, PUT, and PATCH requests if any resources specified by parameters cannot be found.

Unauthorized

Response Example

HTTP/1.1 401 Unauthorized

(Empty response body.)