Get a document
Get a document and a fresh downloadUrl, valid for about 15 minutes. Until a document is attached, only the user who uploaded it can read it.
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; a user API key can act on any 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 uploaded to Slash, owned by the user whose API key uploaded it. Until it's attached, only that user can read it; once attached to a bill or accounting entry, anyone who can see that bill or entry can. 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.
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 stored for something else.
bill_invoice, accounting_receipt "bill_invoice"