Skip to content

Query fax status

The service task “Query fax status” retrieves the current status of a fax job. It is used to re-check a previously sent job (see Send fax) at a later point in time, e.g. after a timer event or a user task.

Once the job has reached a terminal status, the per-recipient details are returned alongside the status.

Activation required

Sending faxes is a paid add-on and has to be enabled for the tenant. Please contact Pantarey to request activation.

Input parameters

{
  "jobId": "0d139d2c-4a10-11f1-b04d-001851328a39",
  "test": false
}

Description:

  • jobId: Unique identifier of the fax job, returned by the Send fax task at creation.
  • test (optional, default false): Must match the mode in which the job was created. Sandbox jobs can only be queried via sandbox, live jobs only via live.

Output

{
  "jobId": "0d139d2c-4a10-11f1-b04d-001851328a39",
  "status": "finished",
  "errorCode": null,
  "statistics": {
    "pages": 1,
    "recipientCount": 1,
    "recipientCountSuccessful": 1,
    "recipientCountError": 0
  },
  "recipients": [
    {
      "faxNumber": "0049530000000",
      "resultCode": 0,
      "resultText": "OK"
    }
  ]
}

Description:

  • jobId: Job identifier (same value as in the input).
  • status: Current status. Possible values:
    • scheduling, scheduled, processing – job is still being processed.
    • halted, locked – job is paused; not yet final.
    • finished, error, canceledterminal status; the result will not change anymore.
  • errorCode: null on success, otherwise an error code from the delivery service.
  • statistics: Number of pages and recipients (total, successful, failed).
  • recipients: Filled only when the job has reached a terminal status. Contains per-recipient results (resultCode 0 = delivered successfully).

JSONata example

{
  "jobId": $.faxJob.jobId,
  "test": $.faxJob.test
}

Notes

  • Intermediate states: As long as the job is not finished, the output does not contain recipient details. In that case the task should be re-invoked, e.g. after a timer.
  • Status finished ≠ successful single delivery: Even when the job is complete overall, an individual recipient may have failed. The decisive value is recipients[*].resultCode.
  • Sandbox vs. live: Only jobs created in the same mode can be queried. Querying a test job in live mode (or vice versa) returns "job not found".

Tip

Combine this service task with a timer event when the result should be checked asynchronously – for example, when sending a fax may take a certain amount of time before an escalation is triggered. The send task Send fax itself already waits up to roughly 70 seconds by default.