Skip to main content

The waiting/resume loop

A Task does not always run straight to a terminal status. When Synthpop determines it needs more from you — a missing document, an additional field — the Task pauses at status: "waiting". This is a normal, expected state, not a failure. Your integration’s job is to supply what’s missing and let the Task continue:
1

Detect waiting

While polling GET /task/get (or on a callback), you see status: "waiting". Inspect the Task’s issues to understand what is needed — for example a task.medical_record.missing or task.data.missing entry.
2

Supply the missing input

Add files with POST /task/{uuid}/upload, or add structured JSON with PATCH /task/{uuid}/update. Both are covered below.
3

Resume and keep polling

Uploading resumes the Task automatically. Updating resumes it only when you pass ?should_resume=true. The Task moves back to processing and continues toward a terminal status (or pauses at waiting again if more is still needed).
A Task only accepts additional input while it is waiting. Sending files or a resume to a Task in any other status is rejected with 409 — see Frozen and non-waiting Tasks.

Add files: POST /task/{uuid}/upload

Use this when the missing input is one or more documents. It is a multipart/form-data request with one or more uploads parts — the same shape as the files you passed to POST /task/create. The Task must be in waiting. The response is an UploadDataResponse:
Uploads are deduplicated by content: re-sending the identical bytes is a no-op rather than a duplicate data item. external_id is a correlation key, not an idempotency key — it does not affect dedup. If all files in an upload are duplicates, the upload returns 409 instead.

Add structured data: PATCH /task/{uuid}/update

Use this when the missing input is structured data rather than a file, or when you want to change Task metadata. The request body is a TaskUpdateRequest; set only the fields you want to change and omit the rest. To actually resume a waiting Task after adding data, pass the query parameter ?should_resume=true. It defaults to false, so an update alone changes metadata without restarting processing.
Metadata-only changes (renaming, setting cleared, changing external_id) are valid on a Task in any status and do not require should_resume. Use should_resume=true only when you have added the input the Task was waiting for.

Frozen and non-waiting Tasks

Two situations return 409 Conflict from POST /task/{uuid}/upload:
  1. The Task is not waiting. It is not accepting additional input.
  2. The Task is frozen. A newer, patient-matched Task has superseded this one. The 409 body is a TaskFrozenError, which names the Task you should be working with instead:
When you receive a TaskFrozenError, redirect your upload to current_task_uuid — do not retry against the frozen Task. Fetch that Task with GET /task/get?uuid=<current_task_uuid>, confirm it is waiting, and add your input there. Retrying the frozen UUID will only return 409 again.

Working with async results

How to detect the waiting status while polling or via callback.

Errors

Every status code the API returns, with real error bodies.