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 an application offer.
URI
/api/v10/applications/ID/offers/ID/typeGET Get the offer type
Retrieve the type of an offer created for an application.
Syntax
GET /api/v10/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/v10/applications/123/offers/321/type"Response headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json | The media type of the resource |
Content-Length | 1234 | The 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 type for a specific offer created for an application.
The API request first checks if the specified type is a valid offer type configured in DreamApply. Upon successful validation, the specified type is assigned to the application offer.
Syntax
PUT /api/v10/applications/123/offers/321/type
Host: apply.example.edu
Authorization: DREAM apikey="..."Raw request body
Depending on the API version, the request body must contain an integer (offer ID) or a JSON string in double quotes indicating the offer type.
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 | The media type of the resource |
Content-Length | 0 | The size of the response body in bytes |
Response codes
| Response code | Description |
|---|---|
200 OK | The status was successfully set. |
400 Bad Request | An invalid offer type. |
400 Bad Request | An 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. |