Finalize a batch job
/lang2fhir/batch/{job_id}/finalizeSeals the job's item set and starts processing. Takes no request body. Finalize is idempotent: a retried finalize succeeds again.
If a previous upload did not complete, finalize returns a 409; re-send
the missing upload (with the same request_id), then finalize.
Finalizing a job with no items is a 400.
Path parameters
job_idstringrequiredJob finalized and processing started
Response fields
job_idstringrequiredServer-assigned job identifier.
request_idstringoptionalThe idempotency token supplied at create, if any.
statusstringrequiredJob status. completed means every item has finished — some may have
failed, so check counts for the split. failed is a whole-job
failure (the job could not run at all), distinct from individual item
failures, which never fail the job.
pendingprocessingcompletedfailedfinalizedbooleanrequiredWhether the job's item set has been sealed.
total_itemsintegerrequiredThe sealed item count. It is 0 until the job is finalized, so an upload response always reports 0; poll the job after finalize for the real count.
errorobjectoptionalA whole-job failure. Present only on a failed job.
created_atstring (date-time)requiredupdated_atstring (date-time)requiredcompleted_atstring (date-time)optionalWhen the job finished. Absent until then.
expires_atstring (date-time)requiredWhen the job and its stored inputs and results are deleted. Set 7
days out, with the clock restarting when the job reaches completed
or failed. At expiry the job's request_id is freed for reuse.