You are here:
InsPolicyService:getPolicyAsyncJobStatus
Use this service to fetch the status of the asynchronous batch job.
Class: InsPolicyService
Method: getPolicyAsyncJobStatus
How It Works
-
The service takes
jobId,policyId, orreferencePolicyNumberas an input parameter. When you pass more than one input parameter in the request, thejobIdtakes precedence, followed bypolicyId, and thenreferencePolicyNumber. -
The service first validates field-level permissions and then retrieves the status of the asynchronous process. The possible values are:
-
WaitingToProcess—The job is in the queue. -
InProgress—The job is in progress. -
Success—The job is successful. -
Failed—The job failed. -
Aborted—The admin aborted the operation.
-
-
The service returns the status of the latest
jobIdfor a given policy based on thecreatedDate.
Inputs
You must pass one of these inputs.
| Input | Description |
|---|---|
jobId
|
The asynchronous job ID that’s returned by the asynchronous batch job. |
policyId
|
The policy ID being monitored by the asynchronous job. |
referencePolicyNumber
|
The reference number of the policy. This option isn’t supported for multi-root services. |
Input JSON
Here's the sample input JSON.
{
"jobId": "7075j00004uK6GjAAK"
or
"policyId": "0YT5w000000Y8MNGA0"
or
"referencePolicyNumber": "0YT5w000000Y8MNGA0"
}
Output
| Option | Description |
|---|---|
jobId
|
The asynchronous job ID for the process. If you didn't provide the
jobId as input and must know it, you can retrieve it from the
output. |
status
|
The status of the asynchronous process. Possible values include: WaitingToProcess, InProgress, Success, Failed, and Aborted. |
error
|
The error message that’s returned when a job succeeds, fails, or is aborted. |

