Offer type

Represents the type of the application offer.

URI
/api/v9/applications/ID/offers/ID/type

GET Get the offer type

A request with the GET verb returns the offer type about the application offer in question.

Syntax
GET /api/v9/applications/123/offers/321/type
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/v9/applications/123/offers/321/type"

Response headers

HeaderValueDescription
Content-Typeapplication/jsonMedia type of the resource
Content-Length1234Size of the response body in bytes

Response codes

Response codeDescription
200 OKThe offer type was successfully returned
404 Not FoundThe application does not have this offer

Example response

Response
{
    "id": 12,
    "type": "/api/v4/applications/offers/types/12"
}
Response
"Conditionally accepted"

PUT Set the offer type

Set the offer type to the application offer (identified by its ID) in question. This will check if the given type is a valid offer type that can be used in the system. On successful validation of the given type, it will be assigned as the type of the application offer in question.

Syntax
PUT /api/v9/applications/123/offers/321/type
Host: apply.example.edu
Authorization: DREAM apikey="..."

Raw request body

This will be set as the type of the application offer in question, upon successful validation.

Request body
18
Request body
"Conditionally accepted"

Example request

Request
curl
curl \
  -X PUT \
  -H "Authorization: DREAM apikey=\"YOUR-API-KEY\"" \
  -d '18' \
  "https://apply.example.edu/api/v4/applications/123/offers/321/type"

Response headers

HeaderValueDescription
Content-Typetext/plainMedia type of the resource
Content-Length0Size of the response body in bytes

Response codes

Response codeDescription
200 OKThe status was successfully set.
400 Bad RequestInvalid offer type.
400 Bad RequestInvalid status.
Please make sure that status is a valid JSON string with quotes.
400 Bad RequestThe offer quota is full: $name.
404 Not FoundThe application does not have this offer.