Get a document with a fresh downloadUrl, valid for about 15 minutes.

get/v2/documents/{documentId}

Request

  • Base URL
    https://api.slash.com
  • URL
    https://api.slash.com/v2/documents/{documentId}
  • Auth
    API key in header X-API-Key

Response

The document.

idstring required

Document id with the st_ prefix.

filenamestring required

The filename supplied at upload.

purpose'bill_invoice' | 'accounting_receipt' | 'invoice_logo'

What the document was uploaded for. Absent on files Slash generated.

contentTypestring required

MIME type detected from the file's bytes.

sizeBytesinteger required

Size of the stored file in bytes, or 0 for files Slash generated.

downloadUrlstring uri required

Presigned URL for the file. Valid for about 15 minutes; fetch the document again for a fresh one.

createdAtstring date-time required

When the document was uploaded.

Example response

{
  "id": "st_2rj4l7hmrrrcv",
  "filename": "invoice-4471.pdf",
  "purpose": "bill_invoice",
  "contentType": "application/pdf",
  "sizeBytes": 48213
}

Changes