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

# List jobs

> POST request to retrieve a list of jobs. Jobs are ordered in ascending scheduledStartDateTime order.



## OpenAPI

````yaml /api-reference/job-management.json post /job/listJobs
openapi: 3.0.1
info:
  title: Job Management API
  description: Jobs - API Documentation
  contact:
    url: http://www.masternaut.com
  version: 1.0.0
servers:
  - url: https://ontime-api.masternautconnect.com/jobs
security: []
paths:
  /job/listJobs:
    post:
      tags:
        - /job
      summary: List jobs
      description: >-
        POST request to retrieve a list of jobs. Jobs are ordered in ascending
        scheduledStartDateTime order.
      operationId: listJobs
      parameters:
        - name: x-connect-token
          in: header
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobListRequestDto'
        required: true
      responses:
        '200':
          description: listJobs 200 response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobListResponseDto'
components:
  schemas:
    JobListRequestDto:
      type: object
      properties:
        groupName:
          type: string
          description: >-
            Name of a group. Must be specified if a value for either personName
            or vehicleName is not specified
        scheduledStartDateTimeFrom:
          type: string
          description: >-
            Start of the period of scheduled fulfilment date, in UTC, in the
            format of either YYYY-MM-DD or YYYY-MM-DDThh:mmZ.
        scheduledStartDateTimeTo:
          type: string
          description: >-
            End of the period of scheduled fulfilment date, in UTC, in the
            format of either YYYY-MM-DD or YYYY-MM-DDThh:mmZ.
        personId:
          type: string
          description: ID of the person
        personName:
          type: string
          description: >-
            Name of a driver that has been assigned a job. Must be specified if
            a value for either vehicleName or groupName is not specified.
        vehicleId:
          type: string
          description: ID of the vehicle
        vehicleName:
          type: string
          description: >-
            Name of a vehicle that has been assigned a job. Must be specified if
            a value for either personName or groupName is not specified.
        statuses:
          type: array
          description: >-
            Jobs with the specified status will be included in the response e.g.
            NEW, ASSIGNED, IN_PROGRESS, ACCEPTED, VISITED.
          items:
            $ref: '#/components/schemas/JobStatus'
        jobTypeIds:
          type: array
          description: Jobs with the specified job type will be included in the response.
          items:
            type: string
        limit:
          type: integer
          description: >-
            The number of jobs to include in the output. If not specified, it
            will default to 20.  Advise this is not set to greater than 1000 to
            avoid any issues with response size.
          format: int32
        nextToken:
          type: string
          description: >-
            Token returned in a previous call to this endpoint to get the next
            set of details.
    JobListResponseDto:
      type: object
      properties:
        jobs:
          type: array
          items:
            $ref: '#/components/schemas/JobDto'
        nextToken:
          type: string
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorDto'
        count:
          type: integer
          format: int32
    JobStatus:
      type: string
      enum:
        - NEW
        - ASSIGNED
        - RECEIVED
        - IN_PROGRESS
        - VISITED
        - CANCELLED
        - MISSED
        - ACCEPTED
        - INCOMPLETE
        - $UNKNOWN
    JobDto:
      type: object
      properties:
        jobId:
          type: string
        jobNumber:
          type: string
        jobTitle:
          type: string
        clientName:
          type: string
        accountNumber:
          type: string
        contactName:
          type: string
        contactEmail:
          type: string
        contactPhone:
          type: string
        notes:
          type: string
        lat:
          type: number
          format: double
        lng:
          type: number
          format: double
        address:
          type: string
        statusChangeTimestamp:
          type: string
        statusChangeId:
          type: string
        scheduledStartDateTime:
          type: string
          description: Date format yyyy-MM-dd'T'HH:mm'Z' or yyyy-MM-dd
        jobDuration:
          type: string
        arrivalWindowStart:
          type: string
          description: Date format yyyy-MM-dd'T'HH:mm'Z'
        arrivalWindowEnd:
          type: string
          description: Date format yyyy-MM-dd'T'HH:mm'Z'
        personId:
          type: string
        vehicleId:
          type: string
        groupName:
          type: string
        personName:
          type: string
        vehicleName:
          type: string
        orderNumbers:
          type: array
          items:
            type: string
        status:
          $ref: '#/components/schemas/JobStatus'
        driverNotes:
          type: string
        statusHistory:
          type: array
          items:
            $ref: '#/components/schemas/JobStatusHistoryDto'
        actualStart:
          type: string
        actualEnd:
          type: string
        overrideLat:
          type: number
          format: double
        overrideLng:
          type: number
          format: double
        jobHistory:
          type: array
          items:
            $ref: '#/components/schemas/JobHistoryDto'
        jobRadius:
          type: integer
          format: int32
        eta:
          type: string
        etaDistanceKms:
          type: number
          format: double
        lastEtaCalcTime:
          type: string
        primaryResource:
          $ref: '#/components/schemas/PrimaryResource'
        jobTypeId:
          type: string
        jobType:
          $ref: '#/components/schemas/JobType'
        jobPhotos:
          type: array
          items:
            $ref: '#/components/schemas/JobPhotoDto'
        jobSignature:
          $ref: '#/components/schemas/JobSignatureDto'
        linkingId:
          type: string
        linkedJobDescription:
          type: string
        linkedJobIndex:
          type: string
        resources:
          type: array
          items:
            $ref: '#/components/schemas/ResourceDto'
        subStatus:
          $ref: '#/components/schemas/JobSubStatusDTO'
        lastServerTime:
          type: string
        visitResults:
          type: array
          items:
            $ref: '#/components/schemas/VisitResultDto'
        subStatusLabel:
          type: string
        statusLabel:
          type: string
    ValidationErrorDto:
      type: object
      properties:
        field:
          type: string
        message:
          type: string
    JobStatusHistoryDto:
      type: object
      properties:
        date:
          type: string
        personId:
          type: string
        name:
          type: string
        status:
          $ref: '#/components/schemas/JobStatus'
        statusChangeId:
          type: string
    JobHistoryDto:
      type: object
      properties:
        date:
          type: string
        personId:
          type: string
        name:
          type: string
        assignedPersonName:
          type: string
        assignedAssetName:
          type: string
    PrimaryResource:
      type: string
      enum:
        - DRIVER
        - VEHICLE
        - $UNKNOWN
    JobType:
      type: object
      properties:
        id:
          type: string
        label:
          type: string
        description:
          type: string
        global:
          type: boolean
        used:
          type: boolean
        disabled:
          type: boolean
        key:
          type: string
        earliestStartTime:
          type: integer
          format: int32
        latestStartTime:
          type: integer
          format: int32
        duration:
          type: string
        notes:
          type: string
        resources:
          type: array
          items:
            $ref: '#/components/schemas/ResourceDto'
        sendJobReportOnCompletion:
          type: boolean
        workflowId:
          type: string
    JobPhotoDto:
      type: object
      properties:
        date:
          type: string
          description: Date format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
        downloadUrl:
          type: string
    JobSignatureDto:
      type: object
      properties:
        date:
          type: string
          description: Date format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
        downloadUrl:
          type: string
        signeeName:
          type: string
    ResourceDto:
      type: object
      properties:
        name:
          type: string
        status:
          $ref: '#/components/schemas/ResourceStatus'
        fileType:
          type: string
        storageUrl:
          type: string
        uploadUrl:
          type: string
        presignedGetUrl:
          type: string
    JobSubStatusDTO:
      type: object
      properties:
        key:
          type: string
        value:
          type: string
    VisitResultDto:
      type: object
      properties:
        jobScheduledStart:
          type: string
        taskAnswers:
          type: array
          items:
            $ref: '#/components/schemas/TaskAnswerDto'
    ResourceStatus:
      type: string
      enum:
        - NONE
        - AVAILABLE
        - UPLOADING
        - $UNKNOWN
    TaskAnswerDto:
      type: object
      properties:
        title:
          type: string
        description:
          type: string
        key:
          type: string
        statusChangeId:
          type: string
        timestamp:
          type: string
        nextTaskKey:
          type: string
        taskHandler:
          $ref: '#/components/schemas/TaskHandler'
        onTransitionTo:
          type: string
        mandatory:
          type: boolean
        includeInReport:
          type: boolean
        value:
          $ref: '#/components/schemas/TaskAnswerValueDto'
        onTransitionToLabel:
          type: string
        personId:
          type: string
        personName:
          type: string
    TaskHandler:
      type: string
      enum:
        - TEXT_INFO_DISPLAY
        - IMAGE_INFO_DISPLAY
        - PDF_INFO_DISPLAY
        - FREE_TEXT_INFO_INPUT
        - TEXT_INFO_INPUT
        - INTEGER_INFO_INPUT
        - DOUBLE_INFO_INPUT
        - IMAGE_INFO_INPUT
        - SIGNATURE_INFO_INPUT
        - SINGLE_CHOICE_INPUT
        - MULTIPLE_CHOICE_INPUT
        - PROCESS_ITEMS
        - $UNKNOWN
    TaskAnswerValueDto:
      type: object
      properties:
        stringValues:
          type: array
          items:
            type: string
        integerValue:
          type: integer
          format: int32
        doubleValue:
          type: number
          format: double
        blobValues:
          type: array
          items:
            type: string

````