ServiceTitan Appointments API

Job appointments and visits

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

servicetitan-appointments-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: ServiceTitan Accounting Adjustments Appointments 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: Appointments
  description: Job appointments and visits
paths:
  /appointments:
    get:
      summary: List Appointments
      operationId: listAppointments
      tags:
      - Appointments
      parameters:
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/ModifiedOnOrAfter'
      - name: jobId
        in: query
        schema:
          type: integer
      responses:
        '200':
          description: Paginated list of appointments
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppointmentPagedResponse'
    post:
      summary: Create Appointment
      operationId: createAppointment
      tags:
      - Appointments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppointmentCreateRequest'
      responses:
        '200':
          description: Created appointment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Appointment'
  /appointments/{id}:
    get:
      summary: Get Appointment
      operationId: getAppointment
      tags:
      - Appointments
      parameters:
      - $ref: '#/components/parameters/Id'
      responses:
        '200':
          description: Appointment record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Appointment'
    patch:
      summary: Update Appointment
      operationId: updateAppointment
      tags:
      - Appointments
      parameters:
      - $ref: '#/components/parameters/Id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppointmentUpdateRequest'
      responses:
        '200':
          description: Updated appointment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Appointment'
  /appointments/{id}/reschedule:
    patch:
      summary: Reschedule Appointment
      operationId: rescheduleAppointment
      tags:
      - Appointments
      parameters:
      - $ref: '#/components/parameters/Id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - start
              - end
              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
      responses:
        '200':
          description: Appointment rescheduled
components:
  schemas:
    AppointmentUpdateRequest:
      type: object
      properties:
        specialInstructions:
          type: string
    Appointment:
      type: object
      properties:
        id:
          type: integer
          format: int64
        jobId:
          type: integer
          format: int64
        appointmentNumber:
          type: string
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
        arrivalWindowStart:
          type: string
          format: date-time
        arrivalWindowEnd:
          type: string
          format: date-time
        status:
          type: string
          enum:
          - Scheduled
          - Dispatched
          - InProgress
          - Hold
          - Done
          - Canceled
        specialInstructions:
          type: string
          nullable: true
        createdOn:
          type: string
          format: date-time
        modifiedOn:
          type: string
          format: date-time
        customerId:
          type: integer
        unused:
          type: boolean
    AppointmentCreateRequest:
      type: object
      required:
      - jobId
      - start
      - end
      properties:
        jobId:
          type: integer
        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
        specialInstructions:
          type: string
    AppointmentPagedResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Appointment'
  parameters:
    Id:
      name: id
      in: path
      required: true
      schema:
        type: integer
        format: int64
    PageSize:
      name: pageSize
      in: query
      schema:
        type: integer
        default: 50
        maximum: 500
    Page:
      name: page
      in: query
      schema:
        type: integer
        default: 1
    ModifiedOnOrAfter:
      name: modifiedOnOrAfter
      in: query
      schema:
        type: string
        format: date-time
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://auth.servicetitan.io/connect/token
          scopes: {}
    AppKey:
      type: apiKey
      in: header
      name: ST-App-Key