Skip to main content
This is the complete intake flow. You’ll create a validation Task with a document, poll it until it finishes, handle the case where it needs more input, and read the structured decision back out. Every request is grounded in the public API — there are no intake-specific endpoints.
Base URLs
  • Production: https://app.synthpop.ai/public/v1
  • Staging: https://stage.synthpop.ai/public/v1
The examples use production and assume $SYNTHPOP_JWT_TOKEN holds a valid bearer token. If you don’t have one yet, see the Quickstart and Authentication.
Example task type. These examples use hst_validation_bin — validating a sleep-study (HST) referral packet — as a concrete, real value. Your organization’s validation task types are provisioned during onboarding; swap in the one you were given. There is no endpoint that lists them.
1

Create the validation Task

POST /task/create is a multipart/form-data request. Set task_type to your provisioned validation type and attach the referral or order document(s) under uploads. You can attach several files in one request — a whole packet at once.
The response is a TaskDetails object. It comes back right away with status: "pending" and empty verdicts — nothing has been evaluated yet:
Hold onto uuid. If you passed an external_id, you can also read the Task by that instead.
external_id is a correlation key — a handle from your own system you can later read the Task by. It does not make creates idempotent. Deduplication is content-based: uploading identical bytes again is a no-op.
2

Poll until the Task reaches a terminal status

GET /task/get returns the current TaskDetails. Supply exactly one of uuid or external_id (neither or both returns 400). Poll until the Task settles.The terminal statuses are completed, failed, and invalid. A Task can also stop at waiting, which means it needs more input from you (next step); pending and processing both mean “keep polling.”
Prefer not to poll? If your organization has callbacks enabled, pass a callback_template URL on create and Synthpop issues a GET to it when the Task finishes. Callbacks are opt-in and gated per organization — see Working with async results.
3

Handle a Task that stops at `waiting`

Validation often finds a required document missing. Instead of failing, the Task stops at status: "waiting" and lists what it needs in issues — here, a missing face-to-face visit note and insurance carrier:
Add the missing files with POST /task/{uuid}/upload (the Task must be in waiting to accept them), then go back to polling. The Task resumes on its own.
For the full resume loop — including what to do when the Task keeps asking for more — see Responding to waiting tasks.
4

Interpret the completed result

Once the Task is completed, read the decision from three fields. Here is a completed validation result for our example packet:
Read the three fields together:
  • verdict_summaries — the plain-English conclusion per code. Show this to a human reviewer.
  • verdicts — the machine-readable decision per code: approved true or false, and an issues list.
  • issues — the flat list of everything flagged. Each entry has a key (its type) and a human-readable message.
A verdict’s issues are indices into the top-level issues array, not the issues themselves. When a code is not approved, resolve each index to explain why:
For a not-approved code, this prints the exact blocking reasons — for example:
A completed Task is not necessarily an approved one. Always check each verdict.approved — a Task can reach completed with unmet criteria and a false verdict. completed means “Synthpop finished evaluating,” not “the order is supported.”
That’s the full intake loop: create, poll, resolve waiting, and interpret the verdict. Wire the same pattern behind your own intake queue.

Intake overview

How the capability maps to the API and what a result contains.

Multi-patient submissions

When one packet holds several patients and splits into child Tasks.

Results: verdicts & issues

Every issue key and the full verdict shape.

Working with async results

Polling versus callbacks, and load backpressure.