> ## Documentation Index
> Fetch the complete documentation index at: https://docs.valiancehealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Batch job status and progressive results

> 
Status of a batch job with per-case results as they complete. Poll this —
a job in `queued`/`running` will keep gaining `done`/`failed` cases; terminal
job states are `done` (at least one case succeeded), `failed` (every case
failed), and `parked` (the organization hit its spend limit; the job resumes
automatically when the limit clears).

Case results carry your `case_ref`, so you can join them back to your
records. Failed cases carry an `error` string; they were not billed as
successful classifications.
    



## OpenAPI

````yaml /api/openapi-commercial.yaml get /api/v1/drg/batch/{job_id}/
openapi: 3.0.3
info:
  title: Healthproximate API
  version: 1.0.0
  description: >-
    DRG classification, OMOP vocabulary services and a PHI-safe LLM gateway.


    Generated by `manage.py export_commercial_openapi` from an explicit
    operation allowlist (`app/openapi_commercial.py`). An endpoint appears here
    because someone published it, never because it exists.
  contact:
    email: admin@valiancehealth.ai
servers:
  - url: https://api.v2.healthproximate.com
security: []
tags:
  - name: DRG
    description: MS-DRG classification from coded input, free clinical text, or FHIR.
  - name: Vocabulary
    description: OMOP concept search, coding, translation and hierarchy resolution.
  - name: Gateway
    description: >-
      PHI-safe LLM access. Text is redacted before any model sees it and
      re-hydrated in the answer, and every response carries a receipt.
paths:
  /api/v1/drg/batch/{job_id}/:
    get:
      tags:
        - DRG
      summary: Batch job status and progressive results
      description: >-

        Status of a batch job with per-case results as they complete. Poll this
        —

        a job in `queued`/`running` will keep gaining `done`/`failed` cases;
        terminal

        job states are `done` (at least one case succeeded), `failed` (every
        case

        failed), and `parked` (the organization hit its spend limit; the job
        resumes

        automatically when the limit clears).


        Case results carry your `case_ref`, so you can join them back to your

        records. Failed cases carry an `error` string; they were not billed as

        successful classifications.
            
      operationId: v1_drg_batch_retrieve
      parameters:
        - in: path
          name: job_id
          schema:
            type: string
            format: uuid
          required: true
      responses:
        '200':
          description: Job status
        '401':
          description: Authentication required
        '404':
          description: No such job in your organization
      security:
        - api_key_auth: []
        - jwt_auth: []
components:
  securitySchemes:
    api_key_auth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key for organization authentication. Obtain from the organization
        settings or API key management endpoint.
    jwt_auth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT access token obtained from /login/ endpoint

````