/api/applications/ID/offers/ID/attachments

HEAD, GET

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 /api/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.

Note that this will not return the attachments themselves, but only the metadata. Each actual blob can be downloaded individually using /api/applications/ID/offers/ID/attachments/ID/download

Syntax

GET /api/applications/123/offers/321/attachments
Host: apply.example.edu
Authorization: DREAM apikey="..."

Response headers

Content-Type: application/json
Content-Length: 1234
X-Count: 2

Response example

{
  "1001": {
      "id": 1001,
      "download": "/api/applications/123/offers/321/attachments/1001/download"
  },
  "1002": {
      "id": 1002,
      "letterhead": "/api/letterheads/1",
      "download": "/api/applications/123/offers/321/attachments/1002/download"
  }
}