Quickstart
From a packet to filed documents in three curl commands.
You need an API key in SHEAF_API_KEY and a PDF.
1. Run a workflow on a packet
curl -X POST "https://sheaf.us/api/workflows/standard-intake/runs" \
-H "Authorization: Bearer $SHEAF_API_KEY" \
-F "files=@packet.pdf" \
-F "applicant=Jane Doe" \
-F "expectedDocList=home-loan"
It returns 201 with the case:
{ "id": "euw8ydHxTW", "applicantName": "Jane Doe", "run": { "state": "running", "kind": "parse" } }
Every organization has the workflow standard-intake and can use the official lists general, home-loan and knowledge-base. GET /workflows lists your workflows. GET /expected-doc-lists lists the official lists and your own.
2. Poll until the run lands
curl "https://sheaf.us/api/applications/euw8ydHxTW" \
-H "Authorization: Bearer $SHEAF_API_KEY"
Poll as reading results says. A run takes minutes. When run.state is report, the run has landed and the workflow has filed what it could.
3. Read what was filed
curl "https://sheaf.us/api/applications/euw8ydHxTW/documents" \
-H "Authorization: Bearer $SHEAF_API_KEY"
Each entry is a document: its pages, the line of the list it was filed under, and the decision. Reading results has the full shape.
If the first call answers 409
Pre-flight flagged a file. Sheaf does not override a flag for you. The case exists and waits for a person. See run a workflow.
Sheaf