ServiceTitan Jobs API

Service jobs (work orders)

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

servicetitan-jobs-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: ServiceTitan Accounting Adjustments Jobs API
  description: 'The Accounting API manages invoices, invoice items, AP credits, payments, payment terms,

    payment types, journal entries, journal entry details, tax zones, and GL accounts.

    Tenant-scoped; OAuth 2.0 + App Key. Integrates with QuickBooks, Sage Intacct, and Acumatica.

    '
  version: 2.0.0
  contact:
    name: ServiceTitan Developer Support
    url: https://developer.servicetitan.io/
    email: integrations@servicetitan.com
  license:
    name: ServiceTitan Terms of Service
    url: https://www.servicetitan.com/legal/terms-of-service
servers:
- url: https://api.servicetitan.io/accounting/v2/{tenant}
  description: Production
  variables:
    tenant:
      default: '0000000'
- url: https://api-integration.servicetitan.io/accounting/v2/{tenant}
  description: Integration (Sandbox)
  variables:
    tenant:
      default: '0000000'
security:
- OAuth2: []
  AppKey: []
tags:
- name: Jobs
  description: Service jobs (work orders)
paths:
  /jobs:
    get:
      summary: List Jobs
      operationId: listJobs
      tags:
      - Jobs
      parameters:
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/ModifiedOnOrAfter'
      - $ref: '#/components/parameters/JobStatus'
      responses:
        '200':
          description: Paginated list of jobs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobPagedResponse'
    post:
      summary: Create Job
      operationId: createJob
      tags:
      - Jobs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobCreateRequest'
      responses:
        '200':
          description: Created job
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Job'
  /jobs/{id}:
    get:
      summary: Get Job
      operationId: getJob
      tags:
      - Jobs
      parameters:
      - $ref: '#/components/parameters/Id'
      responses:
        '200':
          description: Job record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Job'
    patch:
      summary: Update Job
      operationId: updateJob
      tags:
      - Jobs
      parameters:
      - $ref: '#/components/parameters/Id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobUpdateRequest'
      responses:
        '200':
          description: Updated job
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Job'
  /jobs/{id}/cancel:
    put:
      summary: Cancel Job
      operationId: cancelJob
      tags:
      - Jobs
      parameters:
      - $ref: '#/components/parameters/Id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reasonId:
                  type: integer
                memo:
                  type: string
      responses:
        '200':
          description: Job cancelled
  /jobs/{id}/hold:
    put:
      summary: Hold Job
      operationId: holdJob
      tags:
      - Jobs
      parameters:
      - $ref: '#/components/parameters/Id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reasonId:
                  type: integer
                memo:
                  type: string
      responses:
        '200':
          description: Job placed on hold
  /jobs/{id}/history:
    get:
      summary: Get Job History
      operationId: getJobHistory
      tags:
      - Jobs
      parameters:
      - $ref: '#/components/parameters/Id'
      responses:
        '200':
          description: Job history
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobHistory'
  /job-cancel-reasons:
    get:
      summary: List Job Cancel Reasons
      operationId: listJobCancelReasons
      tags:
      - Jobs
      responses:
        '200':
          description: Cancel reasons
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          type: string
                        active:
                          type: boolean
components:
  schemas:
    Job:
      type: object
      properties:
        id:
          type: integer
          format: int64
        jobNumber:
          type: string
        customerId:
          type: integer
          format: int64
        locationId:
          type: integer
          format: int64
        jobStatus:
          type: string
        completedOn:
          type: string
          format: date-time
          nullable: true
        businessUnitId:
          type: integer
        jobTypeId:
          type: integer
        priority:
          type: string
        campaignId:
          type: integer
          nullable: true
        summary:
          type: string
        customFields:
          type: array
          items:
            type: object
            properties:
              typeId:
                type: integer
              name:
                type: string
              value:
                type: string
        appointmentCount:
          type: integer
        firstAppointmentId:
          type: integer
          nullable: true
        lastAppointmentId:
          type: integer
          nullable: true
        recallForId:
          type: integer
          nullable: true
        warrantyId:
          type: integer
          nullable: true
        jobGeneratedLeadSource:
          type: object
          properties:
            jobId:
              type: integer
              nullable: true
            employeeId:
              type: integer
              nullable: true
        noCharge:
          type: boolean
        notificationsEnabled:
          type: boolean
        createdOn:
          type: string
          format: date-time
        modifiedOn:
          type: string
          format: date-time
    JobCreateRequest:
      type: object
      required:
      - customerId
      - locationId
      - businessUnitId
      - jobTypeId
      - priority
      - campaignId
      - appointments
      properties:
        customerId:
          type: integer
        locationId:
          type: integer
        businessUnitId:
          type: integer
        jobTypeId:
          type: integer
        priority:
          type: string
        campaignId:
          type: integer
        appointments:
          type: array
          items:
            type: object
            properties:
              start:
                type: string
                format: date-time
              end:
                type: string
                format: date-time
              arrivalWindowStart:
                type: string
                format: date-time
              arrivalWindowEnd:
                type: string
                format: date-time
              technicianIds:
                type: array
                items:
                  type: integer
        summary:
          type: string
        shouldUpdateInvoiceItems:
          type: boolean
    JobHistory:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              eventType:
                type: string
              date:
                type: string
                format: date-time
              employeeId:
                type: integer
                nullable: true
              usedSchedulingTool:
                type: string
                nullable: true
              usedSchedulingToolVersion:
                type: string
                nullable: true
    JobPagedResponse:
      type: object
      properties:
        page:
          type: integer
        pageSize:
          type: integer
        hasMore:
          type: boolean
        data:
          type: array
          items:
            $ref: '#/components/schemas/Job'
    JobUpdateRequest:
      type: object
      properties:
        summary:
          type: string
        priority:
          type: string
        businessUnitId:
          type: integer
        jobTypeId:
          type: integer
        campaignId:
          type: integer
  parameters:
    Id:
      name: id
      in: path
      required: true
      schema:
        type: integer
        format: int64
    ModifiedOnOrAfter:
      name: modifiedOnOrAfter
      in: query
      schema:
        type: string
        format: date-time
    PageSize:
      name: pageSize
      in: query
      schema:
        type: integer
        default: 50
        maximum: 500
    Page:
      name: page
      in: query
      schema:
        type: integer
        default: 1
    JobStatus:
      name: jobStatus
      in: query
      schema:
        type: string
        enum:
        - Scheduled
        - Dispatched
        - InProgress
        - Hold
        - Completed
        - Canceled
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://auth.servicetitan.io/connect/token
          scopes: {}
    AppKey:
      type: apiKey
      in: header
      name: ST-App-Key