Docs
API referencePeople and H R

Download a document

Preview· P9
GET
/hr-documents/{document_id}/file

Returns the file itself once its virus scan has passed, checked against its SHA-256 (sent as Repr-Digest). Each download through the API is recorded in the organisation's audit trail. Responses are never cached. 409 while it's still being checked.

Scope: documents:read · Plan: Pro and Enterprise in live mode; every plan in test mode.

Authorization

headerAuthorizationBearer <token>

Send Authorization: Bearer <token> on every request. The token is one of:

PrefixWhat it isWhere it may be used
agoo_sk_live_Secret key, live modeYour servers only
agoo_sk_test_Secret key, test modeYour servers only
agoo_pk_live_Publishable key, live modeBrowsers and apps: create pre-registrations and bookings, read public booking types (with their intake questions) and their free slots, read the visit types open for pre-registration with their public forms. Never lists people.
agoo_pk_test_Publishable key, test modeAs above, in test mode

Admins create keys in Console → Developers → API keys and choose each key's scopes. A key is shown once. Never put a secret key in a URL, a browser or a mobile app.

Scope: documents:read

Path Parameters

document_id*string

The document's ID.

Match^hrdoc_[0-7][0-9a-hjkmnp-tv-z]{25}$
Example"hrdoc_01m6k2a4c6e8g0j2r4n6q8s0tv"

Query Parameters

download?boolean

true: as an attachment to save; otherwise to show.

Defaultfalse

Response Body

The file.

response?file
Formatbinary
curl -X GET 'https://api.agoohq.com/v1/hr-documents/hrdoc_01m6k2a4c6e8g0j2r4n6q8s0tv/file'
"string"