Get a document
Get a document with a fresh downloadUrl, valid for about 15 minutes.
Authorizations
User API key authentication. Create a key under Settings → API keys in the Slash dashboard (https://app.slash.com/global-settings/api-keys) and send the x-legal-entity header naming the legal entity to act on with every request. Keys scoped to a legal entity are rejected with 403 user_api_key_required.
Headers
The legal entity to act on. Required on every request except GET /v2/legal-entities, which lists the ids a user API key can send here: those of every legal entity its user has access to.
^le_[a-zA-Z0-9]+$Path Parameters
Document id with the st_ prefix.
Response
The document.
A file stored on Slash, uploaded through the API or generated by Slash. Attach it by id where its purpose is accepted; the file itself is fetched through downloadUrl.
Document id with the st_ prefix.
"st_2rj4l7hmrrrcv"
The filename supplied at upload.
"invoice-4471.pdf"
MIME type detected from the file's bytes.
"application/pdf"
Size of the stored file in bytes, or 0 for files Slash generated.
48213
Presigned URL for the file. Valid for about 15 minutes; fetch the document again for a fresh one.
When the document was uploaded.
What the document was uploaded for. Absent on files Slash generated.
bill_invoice, accounting_receipt, invoice_logo "bill_invoice"