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

# Get a job

> Returns the full Job with child Tasks and steps. Use `?expand=runs` for a flattened per-file summary with proof and download URLs.



## OpenAPI

````yaml /openapi.json get /jobs/{id}
openapi: 3.1.0
info:
  title: Filecheck API
  version: 1.0.0
  description: >-
    The Filecheck REST API. Submit files as jobs, fetch results, and read your
    workflows, rules, connectors, profiles, and optimize presets. All requests
    are authenticated server-side with your secret key (`sk_live_…`).
servers:
  - url: https://api.filecheck.io
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Jobs
    description: >-
      Submit files for preflight, fixing, optimization, validation, and
      previews.
  - name: Uploads
    description: Mint presigned credentials to upload large files directly.
  - name: Orders
    description: Attach jobs to commerce orders.
  - name: Workflows
  - name: Connectors
  - name: Rules
  - name: Profiles
  - name: OptimizePresets
paths:
  /jobs/{id}:
    get:
      tags:
        - Jobs
      summary: Get a job
      description: >-
        Returns the full Job with child Tasks and steps. Use `?expand=runs` for
        a flattened per-file summary with proof and download URLs.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: expand
          in: query
          required: false
          schema:
            type: string
            enum:
              - runs
          description: >-
            Set to `runs` to return a flattened per-file summary instead of the
            full job.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/JobResponse'
                  - $ref: '#/components/schemas/RunsResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Job not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    JobResponse:
      type: object
      properties:
        job:
          $ref: '#/components/schemas/Job'
    RunsResponse:
      type: object
      properties:
        runs:
          type: array
          items:
            $ref: '#/components/schemas/Run'
    Error:
      type: object
      properties:
        error:
          type: boolean
        message:
          type: string
    Job:
      type: object
      properties:
        id:
          type: string
        createdAt:
          type:
            - string
            - 'null'
        modifiedAt:
          type:
            - string
            - 'null'
        status:
          type: string
          description: idle, incomplete, uploading, processing, ready, partial, rejected
        outcome:
          type:
            - string
            - 'null'
        channel:
          type:
            - string
            - 'null'
          enum:
            - api
            - store
            - admin
            - null
        ruleId:
          type:
            - string
            - 'null'
        workflowId:
          type:
            - string
            - 'null'
        metaData:
          type:
            - object
            - 'null'
        tasks:
          type: array
          items:
            $ref: '#/components/schemas/Task'
        orderId:
          type:
            - string
            - 'null'
        customerId:
          type:
            - string
            - 'null'
        customerEmail:
          type:
            - string
            - 'null'
        summary:
          type: object
          description: Present on non-lean responses.
        results:
          type: object
          description: >-
            Aggregated validate / preflight / optimize results on non-lean
            responses.
    Run:
      type: object
      description: A flattened per-file view returned by ?expand=runs.
      properties:
        id:
          type: string
        name:
          type: string
        outcome:
          type:
            - string
            - 'null'
          enum:
            - pass
            - warn
            - fail
            - null
        status:
          type:
            - string
            - 'null'
        hasOutput:
          type: boolean
        proofs:
          type: array
          items:
            type: object
            properties:
              url:
                type: string
        downloadUrl:
          type:
            - string
            - 'null'
    Task:
      type: object
      properties:
        id:
          type: string
        createdAt:
          type:
            - string
            - 'null'
        updatedAt:
          type:
            - string
            - 'null'
        status:
          type: string
        outcome:
          type:
            - string
            - 'null'
        fileType:
          type:
            - string
            - 'null'
        mimeType:
          type:
            - string
            - 'null'
        source:
          type:
            - string
            - 'null'
        fileRef:
          type:
            - string
            - 'null'
        clientRef:
          type:
            - string
            - 'null'
        jobId:
          type:
            - string
            - 'null'
        originalArtifact:
          type:
            - object
            - 'null'
        outputArtifacts:
          type: array
          items:
            $ref: '#/components/schemas/OutputArtifact'
        steps:
          type: array
          items:
            $ref: '#/components/schemas/Step'
    OutputArtifact:
      type: object
      properties:
        kind:
          type: string
        role:
          type: string
        bucket:
          type: string
        key:
          type: string
        downloadUrl:
          type:
            - string
            - 'null'
        expiresIn:
          type:
            - integer
            - 'null'
    Step:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          description: preflight, repreflight, autofix, optimize, validate, previews, proof
        status:
          type: string
        outcome:
          type:
            - string
            - 'null'
          enum:
            - pass
            - warn
            - fail
            - null
        reason:
          type:
            - string
            - 'null'
        params:
          type:
            - object
            - 'null'
        runtimeParams:
          type:
            - object
            - 'null'
        started:
          type:
            - string
            - 'null'
        ended:
          type:
            - string
            - 'null'
        duration:
          type:
            - number
            - 'null'
        outputs:
          type: array
          items:
            type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your secret key as a bearer token, e.g. `Authorization: Bearer
        sk_live_…`. Secret keys are server-side only.

````