Categories

Create a new Category

Changed on

OAuth Scope

This endpoint requires the following OAuth scope manage_job_categories.

Record UUID

UUID is optional for record creation. If no UUID is supplied, a UUID will be automatically generated for the new record and returned in the x-record-uuid response header.

post/category.json

Request

  • Base URL
    https://api.servicem8.com/api_1.0
  • URL
    https://api.servicem8.com/api_1.0/category.json
  • Auth
    • API key in header X-Api-Key
    • or OAuth 2
      Authorization code: https://api.servicem8.com/oauth/authorize
      Token URL: https://api.servicem8.com/oauth/access_token scopes: manage_job_categories

Request body

namestring required

The name of the job category. Used to classify and organize jobs.

colourstring

The colour associated with this job category. This colour is used to visually identify the category on the dispatch board and in calendar views. The value is a hexadecimal colour code (6 characters 0-9a-f).

uuidstring uuid

Unique identifier for this record

Example request

{
  "uuid": "123e4567-571a-4e0f-95c8-23f948619b8b"
}

Response

Success

errorCodenumber
messagestring

Example response

{
  "message": "OK"
}

Changes

    • warning

      removed the request property

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status