docling-inference / docs /backend-callbacks.md
mc0117's picture
init push
415196f
|
Raw
History Blame Contribute Delete
1.11 kB

Backend endpoints (upload service β†’ your backend)

Your backend implements two endpoints. The upload service calls them.


POST /update (progress, multiple times per job)

Headers: Content-Type: application/json; optional Authorization: <task_auth_token>

Body:

{
  "doc_id": "string",
  "finished": 1,
  "total": 4,
  "message": "string",
  "project_id": "string"
}
  • doc_id – document/job id
  • finished – current step (1–4)
  • total – always 4
  • message – e.g. "Downloading...", "Parsing document...", "Upload complete"
  • project_id – optional, if client sent it

Respond: 200


POST /finish (once per job)

Headers: Content-Type: application/json; optional Authorization: <task_auth_token>

Body (success):

{
  "status": "complete",
  "doc_id": "string",
  "project_id": "string"
}

Body (failure):

{
  "status": "failure",
  "doc_id": "string",
  "message": "string",
  "project_id": "string"
}
  • doc_id – same as the doc_id used to start the job
  • project_id – optional

Respond: 200