Documents

Get a document

Reads one document of a Brand. The answer has the document data and the URL to read the file from. The bytes never come back in the body: fetch url for them. A reservation whose bytes never arrived answers 404, because there is no file behind it.

get/context/brands/{slug}/documents/{documentId}

Request

  • Base URL: https://api.adcrunch.dev
  • URL: https://api.adcrunch.dev/context/brands/{slug}/documents/{documentId}
  • Auth: HTTP bearer

Path parameters

documentIdstring required
slugstring required

Response

The Document. url is public: anybody holding it can read the file.

createdAtnumber required

Milliseconds since the Unix epoch, UTC.

filenamestring required
idstring required
mimeTypestring required
namestring required

The display name. Falls back to the filename.

sizeBytesnumber required

Read off the stored object at finalize, never from the client.

targetIdstring required
targetTypestring required

What the Document is attached to. brand today.

urlstring required

Example response

{
  "createdAt": 1790000000000,
  "filename": "acme-brand-guidelines.pdf",
  "id": "doc_5e2b41",
  "mimeType": "application/pdf",
  "name": "acme-brand-guidelines.pdf",
  "sizeBytes": 1482064,
  "targetId": "brd_6a9c33",
  "targetType": "brand",
  "url": "https://documents.adcrunch.dev/org_3a7f10/doc_5e2b41"
}

Changes

No recorded changes to this operation across all 1 revision of this API.