---
title: "Check the status of a job"
method: GET
path: "/patient-history/jobs/{job-id}"
tags: ["Patient History Retrieval"]
---

# Check the status of a job

`GET /patient-history/jobs/{job-id}`

## Request

- Base URL: `https://api.sandbox.zusapi.com`
- URL: `https://api.sandbox.zusapi.com/patient-history/jobs/{job-id}`
- Auth: HTTP bearer

This endpoint returns information about the given job, including current status.

## Path parameters

- `job-id` string, uuid, required: The ID of a patient history job.

## Headers

- `Zus-Account` string, uuid: The Builder ID of another builder on whose behalf the caller is acting. This requires that the provider builder has a cross-builder grant allowing access to the caller.

## Response `200`

Status of a job is returned.

- GetJobResponse
  - `data` object, required
    - `type` string, required: Type name of the request.
    - `id` string, uuid, required: The ID of a patient history job.
    - `attributes` object, required
      - `targetDate` string, date-time: Possible formats: "2023-01-20", "2023-01-20T12:18:46.970516-08:00", "2023-01-20T12:18:46.970516Z".
      - `createdAt` string, required: The epoch string indicating creation/update time.
      - `jobStatus` 'in_progress' | 'done' | 'error' | 'scheduled' | 'queued': Status of the top-level job.
      - `lastUpdatedAt` string, required: The epoch string indicating creation/update time.
      - `providers` object[], required: Array of providers name and job statuses.
        - `service` 'commonwell' | 'surescripts' | 'carequality', required: Name of provider
        - `status` 'initialize' | 'in_progress' | 'done' | 'error' | 'unset' | 'queued' | 'skipped', required: Status of the single provider job.
      - `provider` JsonApiProvider: Required if the practitioner relation is not passed. Will appear on the response if passed in request body.
        - `npi` string, required: The NPI number of the user/organization making the request.
        - `role` string, required: The SNOMED CT value representing the role that the user/organization is playing when making the request.
        - `name` string, required: The user/organization who has a treatment relationship with the patient
      - `practitioner` JsonApiPractitioner, required: Required if the practitioner relation is not passed. Will appear on the response if passed in request body. Note: this field is deprecated, please use `provider` field.
        - `npi` string, required: The NPI number of the user/organization making the request. Note: this field is deprecated, pleasue use `provider` field.
        - `role` string, required: The SNOMED CT value representing the role that the user/organization is playing when making the request. Note: this field is deprecated, pleasue use `provider` field.
        - `name` string, required: The user/organization who has a treatment relationship with the patient. Note: this field is deprecated, pleasue use `provider` field.
    - `relationships` JsonApiBaseRelationship, required
      - `patient` PatientRelation, required
        - `data` object, required
          - `type` string, required
          - `id` string, uuid, required: The FHIR ID of a Patient resource

## Other responses

- `401`: Status of a job is not returned because the request is not authorized.
- `403`: Status of a job is not returned because caller is not permitted to retrieve this information.
- `404`: Status of a job is not returned because the job was not found.
- `500`: Status of a job is not returned because an unknown error occurred.

---

[API](https://skmtc.dev/zushealth/apis/patient-history-api.md) - [All operations](https://skmtc.dev/zushealth/apis/patient-history-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zushealth/apis/patient-history-api/revisions/83a1f3de69af?raw)
