Attachments are files that are attached to a document. PSPDFKit Server provides the following endpoints for working with attachments:
To fetch an attachment in a given document, the following endpoint is provided:
GET /api/documents/:document_id/attachments/:attachment_id Authorization: Token token="<secret token>"
$ curl http://localhost:5000/api/documents/abc/attachments/8 \ -H "Authorization: Token token=<secret token>"
HTTP/1.1 200 OK Content-Type: image/jpeg; charset=utf-8 <Attachment data>