Offer type
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 type of the application offer.
URI
/api/v9/applications/ID/offers/ID/typeGET 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
| Header | Value | Description |
|---|---|---|
Content-Type | application/json | Media type of the resource |
Content-Length | 1234 | Size of the response body in bytes |
Response codes
| Response code | Description |
|---|---|
200 OK | The offer type was successfully returned |
404 Not Found | The 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
18Request 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
| Header | Value | Description |
|---|---|---|
Content-Type | text/plain | Media type of the resource |
Content-Length | 0 | Size of the response body in bytes |
Response codes
| Response code | Description |
|---|---|
200 OK | The status was successfully set. |
400 Bad Request | Invalid offer type. |
400 Bad Request | Invalid status. Please make sure that status is a valid JSON string with quotes. |
400 Bad Request | The offer quota is full: $name. |
404 Not Found | The application does not have this offer. |