Browse the docs ▾

Documents API

List, upload and download stored documents. GET /api/v1/documents, POST /api/v1/documents, GET /api/v1/documents/{id}, GET /api/v1/documents/{id}/file.

Generated from the app's endpoint listView as Markdown

4 operations. Each needs an API key with the permission shown; see API keys and permissions.

OperationPermission
GET /api/v1/documentsdocuments:read
POST /api/v1/documentsdocuments:write
GET /api/v1/documents/{id}documents:read
GET /api/v1/documents/{id}/filedocuments:read

#GET /api/v1/documents

Stored documents: uploads and signed records. Deleted files are left out; archived ones only when asked for.

  • Permission: documents:read
  • Returns: a page of records: { data, hasMore, nextCursor }, status 200

Query parameters (all optional)

NameDescription
providerIdOnly this person.
facilityIdOnly this site.
categorytax_form, contract, policy, id or other.
sourceupload or signed.
includeArchivedtrue to include archived documents.
limitRows per page, 1 to 200. Default 50.
cursorThe nextCursor value from the previous page.

Fields in each record: id, providerId, facilityId, title, category, source, fileName, mimeType, sizeBytes, sha256, expiresAt, signRequestId, requirementId, archived, createdAt

curl "https://app.staffedly.com/api/v1/documents?limit=50" \
  -H "Authorization: Bearer $STAFFEDLY_API_KEY"

#POST /api/v1/documents

Upload a file to a person's or a site's record. Send multipart/form-data, not JSON: a file part (PDF, JPG or PNG, up to 10 MB) plus the fields below. Idempotency-Key is not honoured on this one.

  • Permission: documents:write
  • Returns: one record: { data }, status 201

Form fields (multipart/form-data)

FieldDescription
fileRequired. The file itself.
providerIdThe person it belongs to. This or facilityId is required.
facilityIdThe site it belongs to.
titleShown in lists. Default: the file's name.
categorytax_form, contract, policy, id or other. Default other.
expiresAtYYYY-MM-DD, if it expires.
requirementIdThe required document this file satisfies, if any.

Fields in each record: id, providerId, facilityId, title, category, source, fileName, mimeType, sizeBytes, sha256, expiresAt, signRequestId, requirementId, archived, createdAt

curl -X POST "https://app.staffedly.com/api/v1/documents" \
  -H "Authorization: Bearer $STAFFEDLY_API_KEY" \
  -F "[email protected]" \
  -F "providerId=<providerId>" \
  -F "category=contract"

#GET /api/v1/documents/{id}

One stored document.

  • Permission: documents:read
  • Returns: one record: { data }, status 200

Path

NameDescription
idThe record's id.

Fields in each record: id, providerId, facilityId, title, category, source, fileName, mimeType, sizeBytes, sha256, expiresAt, signRequestId, requirementId, archived, createdAt

curl "https://app.staffedly.com/api/v1/documents/<id>" \
  -H "Authorization: Bearer $STAFFEDLY_API_KEY"

#GET /api/v1/documents/{id}/file

The file itself (PDF, JPG or PNG bytes, not JSON). Each download is recorded in the audit trail.

  • Permission: documents:read
  • Returns: one record: { data }, status 200

Path

NameDescription
idThe record's id.
curl "https://app.staffedly.com/api/v1/documents/<id>/file" \
  -H "Authorization: Bearer $STAFFEDLY_API_KEY"

Something missing or wrong on this page? Email [email protected] or book a free call; our team sets up every new customer at no charge.