Offer attachment download
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 single offer attachment (the binary blob).
/api/v9/applications/ID/offers/ID/attachments/ID/download
Host: apply.example.edu
Authorization: DREAM apikey="..."GET Download an offer attachment
Download a specific attachment.
There are two major ways that an attachment can be created:
- Uploading a file when composing the offer letter (this request returns the uploaded bytes verbatim)
- Generating a PDF attachment from a letterhead [1].
In addition:
- An attachment can be specified as part of an offer type, in which case it is attached automatically
- An attachment can be posted from the API
Notes
Note [1]: 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 GET /api/v9/applications/ID/offers/ID/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 o 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.
GET /api/v9/applications/123/offers/234/attachments/1001/download
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/1001/download"Response headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/octet-stream | Media type of the resource |
Response codes
| Response code | Description |
|---|---|
200 OK | The attachment was downloaded |