ServiceM8 Jobs API

Jobs - the central record for a piece of work.

OpenAPI Specification

servicem8-jobs-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: ServiceM8 REST Attachments Jobs API
  description: 'ServiceM8 is field service and job management software for trade and home-service businesses. The REST API is plain JSON over HTTP and closely follows REST principles: every resource (Job, Company, JobActivity, Attachment, and so on) has its own URL and is manipulated in isolation using GET, POST, and DELETE. The base URL is https://api.servicem8.com/api_1.0 and each object type is exposed as a `.json` collection - for example GET /company.json lists companies and GET /company/{uuid}.json retrieves one. Creating a record is a POST to the collection; updating a record is a POST to the record URL; deleting is a DELETE to the record URL.


    Private integrations authenticate with an API key sent in the `X-API-Key` header. Public add-ons authenticate with OAuth 2.0 (authorize at https://go.servicem8.com/oauth/authorize, exchange the code at https://go.servicem8.com/oauth/access_token) and send a Bearer access token.


    Naming note: the ServiceM8 user interface term "Client" or "Customer" maps to the "Company" object in the API. Only a subset of ServiceM8 functionality is modeled here; ServiceM8 documents 60+ objects. Object endpoint filenames other than company.json, jobcontact.json, and companycontact.json (which are confirmed in ServiceM8''s own documentation) are modeled from ServiceM8''s documented resource index and its consistent lowercase object naming convention.'
  version: '1.0'
  contact:
    name: ServiceM8 Developer
    url: https://developer.servicem8.com
  license:
    name: ServiceM8 API Terms
    url: https://www.servicem8.com/terms
servers:
- url: https://api.servicem8.com/api_1.0
  description: ServiceM8 REST API (object endpoints)
- url: https://api.servicem8.com
  description: ServiceM8 webhook subscription endpoints
security:
- apiKeyAuth: []
- oauth2: []
tags:
- name: Jobs
  description: Jobs - the central record for a piece of work.
paths:
  /job.json:
    get:
      operationId: listJobs
      tags:
      - Jobs
      summary: List jobs
      description: Lists jobs in the account. Supports OData-style $filter on fields.
      parameters:
      - $ref: '#/components/parameters/Filter'
      responses:
        '200':
          description: An array of job records.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Job'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/Throttled'
    post:
      operationId: createJob
      tags:
      - Jobs
      summary: Create a job
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Job'
      responses:
        '200':
          description: Job created. The new record UUID is returned in the x-record-uuid header.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/Throttled'
  /job/{uuid}.json:
    parameters:
    - $ref: '#/components/parameters/Uuid'
    get:
      operationId: getJob
      tags:
      - Jobs
      summary: Retrieve a job
      responses:
        '200':
          description: A single job record.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Job'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      operationId: updateJob
      tags:
      - Jobs
      summary: Update a job
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Job'
      responses:
        '200':
          description: Job updated.
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteJob
      tags:
      - Jobs
      summary: Delete a job
      responses:
        '200':
          description: Job deleted.
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    Job:
      type: object
      properties:
        uuid:
          type: string
        active:
          type: integer
          description: 1 for active, 0 for deleted.
        created_by_staff_uuid:
          type: string
        date:
          type: string
        company_uuid:
          type: string
          description: UUID of the client Company this job is for.
        generated_job_id:
          type: string
        status:
          type: string
          description: Quote, Work Order, Invoice, Complete, or Unsuccessful.
        job_address:
          type: string
        job_description:
          type: string
        work_done_description:
          type: string
        queue_uuid:
          type: string
        total_invoice_amount:
          type: string
        edit:
          type: string
          description: Last edit timestamp.
  parameters:
    Uuid:
      name: uuid
      in: path
      required: true
      description: The UUID of the record.
      schema:
        type: string
    Filter:
      name: $filter
      in: query
      required: false
      description: OData-style filter expression, e.g. `$filter=active eq 1` or `edit gt '2026-01-01'`. Filtering is supported on indexed fields.
      schema:
        type: string
  responses:
    NotFound:
      description: The requested record does not exist.
    Unauthorized:
      description: Missing or invalid API key / access token.
    Throttled:
      description: Rate limit exceeded (180 requests/minute or 20,000 requests/day). Body is the text "Number of allowed API requests per minute exceeded".
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for private/single-account integrations.
    oauth2:
      type: oauth2
      description: OAuth 2.0 for public add-ons. Access tokens expire after 3600 seconds.
      flows:
        authorizationCode:
          authorizationUrl: https://go.servicem8.com/oauth/authorize
          tokenUrl: https://go.servicem8.com/oauth/access_token
          refreshUrl: https://go.servicem8.com/oauth/access_token
          scopes:
            manage_jobs: Read and write jobs
            read_jobs: Read jobs
            manage_customers: Read and write customers (companies)
            read_customers: Read customers (companies)
            manage_staff: Read and write staff
            read_staff: Read staff
            manage_inventory: Read and write materials and inventory
            manage_schedule: Read and write scheduling and job activities
            publish_sms: Send SMS messages
            publish_email: Send email messages
            vendor_logo: Read vendor account information