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

# Get job status

> Check the current status of an optimization job.

Poll this endpoint after submitting a route via `POST /planner/v2`. Status values:
- `queued` — waiting to be processed
- `running` — optimization in progress
- `succeeded` — route optimized, retrieve result with `GET /planner/optimizations/{optimization_id}/result`
- `not_drivable` — route cannot be completed with the given parameters
- `failed` — an error occurred
- `canceled` — job was canceled



## OpenAPI

````yaml /openapi.json get /planner/jobs/{job_id}
openapi: 3.1.0
info:
  title: FRYTE Planner API
  version: 2.0.0
servers:
  - url: https://api.fryte.eu
security: []
paths:
  /planner/jobs/{job_id}:
    get:
      tags:
        - planner
      summary: Get job status
      description: >-
        Check the current status of an optimization job.


        Poll this endpoint after submitting a route via `POST /planner/v2`.
        Status values:

        - `queued` — waiting to be processed

        - `running` — optimization in progress

        - `succeeded` — route optimized, retrieve result with `GET
        /planner/optimizations/{optimization_id}/result`

        - `not_drivable` — route cannot be completed with the given parameters

        - `failed` — an error occurred

        - `canceled` — job was canceled
      operationId: get_job_status_planner_jobs__job_id__get
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: string
            description: Job identifier returned by POST /planner/v2.
            title: Job Id
          description: Job identifier returned by POST /planner/v2.
        - name: tenant_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Tenant ID
            title: Tenant Id
          description: Tenant ID
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HybridAuthBearer: []
        - HTTPBearer: []
components:
  schemas:
    JobStatusResponse:
      properties:
        job_id:
          type: string
          title: Job Id
          description: Job identifier (UUID).
        optimization_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Optimization Id
          description: Optimization identifier.
        status:
          type: string
          title: Status
          description: >-
            Job status: queued, running, succeeded, not_drivable, failed,
            canceled.
        tour_id:
          type: integer
          title: Tour Id
          description: Tour identifier.
        vehicle_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Vehicle Id
          description: Vehicle identifier.
      type: object
      required:
        - job_id
        - status
        - tour_id
      title: JobStatusResponse
      example:
        job_id: c3f1c944-a44c-4c07-ab52-7df7ba94024a
        optimization_id: 7658
        status: succeeded
        tour_id: 7615
        vehicle_id: '010160700001'
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HybridAuthBearer:
      type: http
      scheme: bearer
    HTTPBearer:
      type: http
      scheme: bearer

````