Offer attachments
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 a list of the offer attachments.
/api/v9/applications/ID/offers/ID/attachmentsGET List offer attachments
Get a list of attachments that are currently associated with this offer.
If the attachment was generated from a Letterhead, the relevant ID is also returned. Letterheads are document templates that can be used to generate attachments to offers. In reality, there is also a middle-step in that process — first a Letter is created from the Letterhead (and can be accessed using offer letters. Such a Letter represents a generated (and potentially user-customised) document, where each template marker has already been replaced by actual applicant data. For the purposes of attaching to an offer, the Letter is converted to a PDF and attached to an offer just like a regular uploaded PDF. All of this happens seamlessly in the UI, however, for the API the entire data model is explicitly shown.
This request does not return the attachments themselves, but only the metadata. Each actual blob can be downloaded individually using the offer attachment download.
GET /api/v9/applications/123/offers/321/attachments
Host: apply.example.edu
Authorization: DREAM apikey="..."Example request
curl \
-X GET \
-H "Authorization: DREAM apikey=\"YOUR-API-KEY\"" \
"https://apply.example.edu/api/v9/applications/123/offers/321/attachments"Response headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json | Media type of the resource |
Content-Length | 1456 | Size of the response body in bytes |
X-Count | 2 | Number of attachments for this offer |
Response codes
| Response code | Description |
|---|---|
200 OK | The list of offer attachments was successfully returned |
Example response
{
"1": {
"id": 1,
"download": "/api/v9/applications/123/offers/321/attachments/1/download"
},
"2": {
"id": 2,
"download": "/api/v9/applications/123/offers/321/attachments/2/download"
}
}