{ "openapi": "3.1.0", "info": { "title": "ServiceM8 API", "description": "Move your app forward with the ServiceM8 API\n\n\n\n## Limits and Throttling\nTo ensure continuous quality of service, API usage can be subject to throttling. The throttle will be applied once an API consumer reaches a certain \nthreshold in terms of a maximum number of requests per minute. Most clients will never hit this threshold, but those that do, will get met by a \nHTTP 429 Too Many Requests response code. \n \nThere is a limit of 180 requests per minute, if you reach this you will receive a HTTP 429 with a text body of \"Number of allowed API requests per minute exceeded\".\nThere is a limit of 20000 requests per day, if you reach this you will receive a HTTP 429 with a text body of \"Number of allowed API requests per day exceeded\".\n\nWe encourage all API developers to anticipate this error, and take appropriate measures like e.g. using a cached value from a previous call, or passing on a message to the end user that gets subjected to this behaviour (if any).\n\nLimits are per Addon per account.\n", "termsOfService": "https://www.servicem8.com/terms-of-service", "version": "1.0.0" }, "servers": [ { "url": "https://api.servicem8.com/api_1.0" } ], "security": [ { "apiKey": [] }, { "oauth2": [] } ], "paths": { "/allocationwindow.json": { "get": { "tags": [ "Allocation Windows" ], "operationId": "listAllocationWindows", "summary": "List all Allocation Windows", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_schedule**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_schedule" ] } ], "responses": { "200": { "description": "An array of Allocation Windows", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AllocationWindow" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-0368-41bd-b678-23f941d9dacb", "active": 1, "edit_date": "2026-03-01 12:00:00", "name": "string", "start_time": "string", "end_time": "string", "sort_priority": "string" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Allocation Windows" ], "operationId": "createAllocationWindows", "summary": "Create a new Allocation Window", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_schedule**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_schedule" ] } ], "parameters": [], "requestBody": { "description": "Allocation Window record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AllocationWindowCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Allocation Window record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/allocationwindow/{uuid}.json": { "get": { "tags": [ "Allocation Windows" ], "operationId": "getAllocationWindows", "summary": "Retrieve an Allocation Window", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_schedule**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_schedule" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Allocation Window", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Allocation Window record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AllocationWindow" }, "examples": { "success": { "value": { "uuid": "123e4567-0caa-47c2-ad43-23f9456c8b2b", "active": 1, "edit_date": "2026-03-01 12:00:00", "name": "string", "start_time": "string", "end_time": "string", "sort_priority": "string" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Allocation Windows" ], "operationId": "updateAllocationWindows", "summary": "Update an Allocation Window", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_schedule**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_schedule" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Allocation Window", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Allocation Window fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AllocationWindowCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Allocation Windows" ], "operationId": "deleteAllocationWindows", "summary": "Delete an Allocation Window", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_schedule**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_schedule" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Allocation Window", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Allocation Window successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/asset.json": { "get": { "tags": [ "Assets" ], "operationId": "listAssets", "summary": "List all Assets", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_assets**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_assets" ] } ], "responses": { "200": { "description": "An array of Assets", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Asset" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-c6b5-47ba-927b-23f948322d1b", "active": 1, "edit_date": "2026-03-01 12:00:00", "company_uuid": "123e4567-0595-438d-a0f5-23f94ed2b8db", "asset_code": "string", "asset_type_uuid": "123e4567-cc13-4320-b381-23f943d425ab", "name": "string", "lat": "number", "lng": "number", "geo_timestamp": "2026-03-01 12:00:00", "altitude": "number", "field_data": [ { "uuid": "string", "fieldType": "string", "fieldName": "string", "fieldValue": "string", "sortOrder": "number" } ] } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/asset/{uuid}.json": { "get": { "tags": [ "Assets" ], "operationId": "getAssets", "summary": "Retrieve an Asset", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_assets**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_assets" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Asset", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Asset record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Asset" }, "examples": { "success": { "value": { "uuid": "123e4567-f491-4eba-9199-23f9479b29ab", "active": 1, "edit_date": "2026-03-01 12:00:00", "company_uuid": "123e4567-ac67-484f-85f3-23f94c24231b", "asset_code": "string", "asset_type_uuid": "123e4567-2193-4ca7-8602-23f94f06febb", "name": "string", "lat": "number", "lng": "number", "geo_timestamp": "2026-03-01 12:00:00", "altitude": "number", "field_data": [ { "uuid": "string", "fieldType": "string", "fieldName": "string", "fieldValue": "string", "sortOrder": "number" } ] } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Assets" ], "operationId": "updateAssets", "summary": "Update an Asset", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_assets**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_assets" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Asset", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Asset fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Assets" ], "operationId": "deleteAssets", "summary": "Delete an Asset", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_assets**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_assets" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Asset", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Asset successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/assettype.json": { "get": { "tags": [ "Asset Types" ], "operationId": "listAssetTypes", "summary": "List all Asset Types", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_assets**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_assets" ] } ], "responses": { "200": { "description": "An array of Asset Types", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AssetType" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-6645-4ad4-a20a-23f94faf53fb", "active": 1, "edit_date": "2026-03-01 12:00:00", "name": "string" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Asset Types" ], "operationId": "createAssetTypes", "summary": "Create a new Asset Type", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_assets**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_assets" ] } ], "parameters": [], "requestBody": { "description": "Asset Type record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetTypeCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Asset Type record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/assettype/{uuid}.json": { "get": { "tags": [ "Asset Types" ], "operationId": "getAssetTypes", "summary": "Retrieve an Asset Type", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_assets**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_assets" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Asset Type", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Asset Type record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetType" }, "examples": { "success": { "value": { "uuid": "123e4567-f7d0-48ab-9203-23f9463b56ab", "active": 1, "edit_date": "2026-03-01 12:00:00", "name": "string" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Asset Types" ], "operationId": "updateAssetTypes", "summary": "Update an Asset Type", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_assets**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_assets" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Asset Type", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Asset Type fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetTypeCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Asset Types" ], "operationId": "deleteAssetTypes", "summary": "Delete an Asset Type", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_assets**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_assets" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Asset Type", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Asset Type successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/assettypefield.json": { "get": { "tags": [ "Asset Type Fields" ], "operationId": "listAssetTypeFields", "summary": "List all Asset Type Fields", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_assets**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_assets" ] } ], "responses": { "200": { "description": "An array of Asset Type Fields", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AssetTypeField" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-13ff-4f4f-a8d8-23f949c007cb", "active": 1, "edit_date": "2026-03-01 12:00:00", "asset_type_uuid": "123e4567-8222-42e7-988b-23f94bb7e8eb", "name": "string", "field_data": { "fieldType": "string", "mandatory": "string", "choices": [ "string" ] }, "sort_order": "string" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Asset Type Fields" ], "operationId": "createAssetTypeFields", "summary": "Create a new Asset Type Field", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_assets**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_assets" ] } ], "parameters": [], "requestBody": { "description": "Asset Type Field record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetTypeFieldCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Asset Type Field record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/assettypefield/{uuid}.json": { "get": { "tags": [ "Asset Type Fields" ], "operationId": "getAssetTypeFields", "summary": "Retrieve an Asset Type Field", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_assets**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_assets" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Asset Type Field", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Asset Type Field record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetTypeField" }, "examples": { "success": { "value": { "uuid": "123e4567-75d8-4495-97b2-23f94b21167b", "active": 1, "edit_date": "2026-03-01 12:00:00", "asset_type_uuid": "123e4567-a76f-4e70-a988-23f942f4badb", "name": "string", "field_data": { "fieldType": "string", "mandatory": "string", "choices": [ "string" ] }, "sort_order": "string" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Asset Type Fields" ], "operationId": "updateAssetTypeFields", "summary": "Update an Asset Type Field", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_assets**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_assets" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Asset Type Field", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Asset Type Field fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetTypeFieldCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Asset Type Fields" ], "operationId": "deleteAssetTypeFields", "summary": "Delete an Asset Type Field", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_assets**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_assets" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Asset Type Field", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Asset Type Field successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/attachment.json": { "get": { "tags": [ "Attachments" ], "operationId": "listAttachments", "summary": "List all Attachments", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_attachments**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_attachments" ] } ], "responses": { "200": { "description": "An array of Attachments", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Attachment" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-afbc-4750-b3dd-23f94597a94b", "active": 1, "edit_date": "2026-03-01 12:00:00", "related_object": "string", "related_object_uuid": "123e4567-449b-41d5-86d0-23f9477e981b", "attachment_name": "string", "file_type": "string", "created_by_staff_uuid": "123e4567-6138-488e-9818-23f9471d6cbb", "timestamp": "string", "attachment_source": "string", "tags": "string", "lng": "number", "lat": "number", "photo_width": "string", "photo_height": "string", "extracted_info": "string", "is_favourite": "string", "metadata": "string" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Attachments" ], "operationId": "createAttachments", "summary": "Create a new Attachment", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_attachments**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_attachments" ] } ], "parameters": [], "requestBody": { "description": "Attachment record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AttachmentCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Attachment record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/dboattachment/{uuid}.json": { "get": { "tags": [ "Attachments" ], "operationId": "getAttachments", "summary": "Retrieve an Attachment", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_attachments**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_attachments" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Attachment", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Attachment record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Attachment" }, "examples": { "success": { "value": { "uuid": "123e4567-705f-4392-bcaf-23f9433ec3cb", "active": 1, "edit_date": "2026-03-01 12:00:00", "related_object": "string", "related_object_uuid": "123e4567-f1ed-4eaa-9d40-23f94fc4fe3b", "attachment_name": "string", "file_type": "string", "created_by_staff_uuid": "123e4567-2fcd-4f80-9b48-23f94935a61b", "timestamp": "string", "attachment_source": "string", "tags": "string", "lng": "number", "lat": "number", "photo_width": "string", "photo_height": "string", "extracted_info": "string", "is_favourite": "string", "metadata": "string" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Attachments" ], "operationId": "updateAttachments", "summary": "Update an Attachment", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_attachments**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_attachments" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Attachment", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Attachment fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AttachmentCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Attachments" ], "operationId": "deleteAttachments", "summary": "Delete an Attachment", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_attachments**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_attachments" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Attachment", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Attachment successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/badge.json": { "get": { "tags": [ "Badges" ], "operationId": "listBadges", "summary": "List all Badges", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_badges**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_badges" ] } ], "responses": { "200": { "description": "An array of Badges", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Badge" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-5c7e-43bb-b3a7-23f949a19dbb", "active": 1, "edit_date": "2026-03-01 12:00:00", "name": "string", "automatically_allocated": "string", "file_name": "string", "regarding_form_uuid": "123e4567-297c-4917-941a-23f943041d8b", "regarding_asset_type_uuid": "123e4567-da7c-492c-a2d1-23f94fc1c93b" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Badges" ], "operationId": "createBadges", "summary": "Create a new Badge", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_badges**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_badges" ] } ], "parameters": [], "requestBody": { "description": "Badge record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BadgeCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Badge record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/badge/{uuid}.json": { "get": { "tags": [ "Badges" ], "operationId": "getBadges", "summary": "Retrieve a Badge", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_badges**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_badges" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Badge", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Badge record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Badge" }, "examples": { "success": { "value": { "uuid": "123e4567-4850-44c7-b5dc-23f9444241cb", "active": 1, "edit_date": "2026-03-01 12:00:00", "name": "string", "automatically_allocated": "string", "file_name": "string", "regarding_form_uuid": "123e4567-d305-4a09-be5a-23f94fdec99b", "regarding_asset_type_uuid": "123e4567-e66b-4127-b862-23f943fa578b" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Badges" ], "operationId": "updateBadges", "summary": "Update a Badge", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_badges**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_badges" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Badge", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Badge fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BadgeCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Badges" ], "operationId": "deleteBadges", "summary": "Delete a Badge", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_badges**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_badges" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Badge", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Badge successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/category.json": { "get": { "tags": [ "Categories" ], "operationId": "listCategories", "summary": "List all Categories", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_job_categories**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_job_categories" ] } ], "responses": { "200": { "description": "An array of Categories", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Category" } }, "examples": { "success": { "value": [ { "name": "string", "colour": "string", "uuid": "123e4567-e668-444e-95a9-23f947e8a5bb", "active": 1, "edit_date": "2026-03-01 12:00:00" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Categories" ], "operationId": "createCategories", "summary": "Create a new Category", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_job_categories**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_job_categories" ] } ], "parameters": [], "requestBody": { "description": "Category record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CategoryCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Category record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/category/{uuid}.json": { "get": { "tags": [ "Categories" ], "operationId": "getCategories", "summary": "Retrieve a Category", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_job_categories**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_job_categories" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Category", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Category record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Category" }, "examples": { "success": { "value": { "name": "string", "colour": "string", "uuid": "123e4567-3c2d-4fd3-bc50-23f943560edb", "active": 1, "edit_date": "2026-03-01 12:00:00" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Categories" ], "operationId": "updateCategories", "summary": "Update a Category", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_job_categories**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_job_categories" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Category", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Category fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CategoryCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Categories" ], "operationId": "deleteCategories", "summary": "Delete a Category", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_job_categories**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_job_categories" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Category", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Category successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/company.json": { "get": { "tags": [ "Clients" ], "operationId": "listClients", "summary": "List all Clients", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_customers**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_customers" ] } ], "responses": { "200": { "description": "An array of Clients", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Company" } }, "examples": { "success": { "value": [ { "name": "string", "abn_number": "string", "address": "string", "billing_address": "string", "is_individual": "string", "parent_company_uuid": "string", "uuid": "123e4567-7509-4568-abba-23f94c40ad4b", "active": 1, "edit_date": "2026-03-01 12:00:00", "website": "string", "address_street": "string", "address_city": "string", "address_state": "string", "address_postcode": "string", "address_country": "string", "fax_number": "string", "badges": "string", "tax_rate_uuid": "123e4567-e639-4b95-a09c-23f943851e8b", "billing_attention": "string", "payment_terms": "string" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Clients" ], "operationId": "createClients", "summary": "Create a new Client", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_customers**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_customers" ] } ], "parameters": [], "requestBody": { "description": "Client record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompanyCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Client record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/company/{uuid}.json": { "get": { "tags": [ "Clients" ], "operationId": "getClients", "summary": "Retrieve a Client", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_customers**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_customers" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Client", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Client record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Company" }, "examples": { "success": { "value": { "name": "string", "abn_number": "string", "address": "string", "billing_address": "string", "is_individual": "string", "parent_company_uuid": "string", "uuid": "123e4567-14ec-4a5b-a450-23f94656b22b", "active": 1, "edit_date": "2026-03-01 12:00:00", "website": "string", "address_street": "string", "address_city": "string", "address_state": "string", "address_postcode": "string", "address_country": "string", "fax_number": "string", "badges": "string", "tax_rate_uuid": "123e4567-7f96-417a-8a7d-23f94e8406eb", "billing_attention": "string", "payment_terms": "string" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Clients" ], "operationId": "updateClients", "summary": "Update a Client", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_customers**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_customers" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Client", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Client fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompanyCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Clients" ], "operationId": "deleteClients", "summary": "Delete a Client", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_customers**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_customers" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Client", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Client successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/companycontact.json": { "get": { "tags": [ "Company Contacts" ], "operationId": "listCompanyContacts", "summary": "List all Company Contacts", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_customer_contacts**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_customer_contacts" ] } ], "responses": { "200": { "description": "An array of Company Contacts", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CompanyContact" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-308e-4979-b506-23f945cb33bb", "active": 1, "edit_date": "2026-03-01 12:00:00", "company_uuid": "123e4567-e9aa-406d-9ccd-23f94237c95b", "is_primary_contact": "string", "first": "string", "last": "string", "phone": "string", "mobile": "string", "email": "string", "type": "string" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Company Contacts" ], "operationId": "createCompanyContacts", "summary": "Create a new Company Contact", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_customer_contacts**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_customer_contacts" ] } ], "parameters": [], "requestBody": { "description": "Company Contact record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompanyContactCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Company Contact record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/companycontact/{uuid}.json": { "get": { "tags": [ "Company Contacts" ], "operationId": "getCompanyContacts", "summary": "Retrieve a Company Contact", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_customer_contacts**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_customer_contacts" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Company Contact", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Company Contact record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompanyContact" }, "examples": { "success": { "value": { "uuid": "123e4567-262c-4506-852e-23f944f6a65b", "active": 1, "edit_date": "2026-03-01 12:00:00", "company_uuid": "123e4567-263f-472a-ab20-23f949bb738b", "is_primary_contact": "string", "first": "string", "last": "string", "phone": "string", "mobile": "string", "email": "string", "type": "string" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Company Contacts" ], "operationId": "updateCompanyContacts", "summary": "Update a Company Contact", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_customer_contacts**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_customer_contacts" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Company Contact", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Company Contact fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompanyContactCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Company Contacts" ], "operationId": "deleteCompanyContacts", "summary": "Delete a Company Contact", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_customer_contacts**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_customer_contacts" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Company Contact", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Company Contact successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/documenttemplate.json": { "get": { "tags": [ "Document Templates" ], "operationId": "listDocumentTemplates", "summary": "List all Document Templates", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_templates**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_templates" ] } ], "responses": { "200": { "description": "An array of Document Templates", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DocumentTemplate" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-0fda-4b96-a8f9-23f941a08a2b", "active": 1, "edit_date": "2026-03-01 12:00:00", "template_type": "string", "related_object": "string", "name": "string" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Document Templates" ], "operationId": "createDocumentTemplates", "summary": "Create a new Document Template", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_templates**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_templates" ] } ], "parameters": [], "requestBody": { "description": "Document Template record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DocumentTemplateCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Document Template record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/documenttemplate/{uuid}.json": { "get": { "tags": [ "Document Templates" ], "operationId": "getDocumentTemplates", "summary": "Retrieve a Document Template", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_templates**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_templates" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Document Template", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Document Template record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DocumentTemplate" }, "examples": { "success": { "value": { "uuid": "123e4567-5f59-49d4-9853-23f949193dcb", "active": 1, "edit_date": "2026-03-01 12:00:00", "template_type": "string", "related_object": "string", "name": "string" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Document Templates" ], "operationId": "updateDocumentTemplates", "summary": "Update a Document Template", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_templates**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_templates" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Document Template", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Document Template fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DocumentTemplateCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Document Templates" ], "operationId": "deleteDocumentTemplates", "summary": "Delete a Document Template", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_templates**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_templates" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Document Template", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Document Template successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/emailtemplate.json": { "get": { "tags": [ "Email Templates" ], "operationId": "listEmailTemplates", "summary": "List all Email Templates", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_templates**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_templates" ] } ], "responses": { "200": { "description": "An array of Email Templates", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EmailTemplate" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-dc22-41b7-9d37-23f94f1a504b", "active": 1, "edit_date": "2026-03-01 12:00:00", "name": "string", "subject": "string", "message": "string" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Email Templates" ], "operationId": "createEmailTemplates", "summary": "Create a new Email Template", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_templates**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_templates" ] } ], "parameters": [], "requestBody": { "description": "Email Template record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmailTemplateCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Email Template record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/emailtemplate/{uuid}.json": { "get": { "tags": [ "Email Templates" ], "operationId": "getEmailTemplates", "summary": "Retrieve an Email Template", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_templates**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_templates" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Email Template", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Email Template record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmailTemplate" }, "examples": { "success": { "value": { "uuid": "123e4567-5ba4-406a-b583-23f94f8eb03b", "active": 1, "edit_date": "2026-03-01 12:00:00", "name": "string", "subject": "string", "message": "string" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Email Templates" ], "operationId": "updateEmailTemplates", "summary": "Update an Email Template", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_templates**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_templates" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Email Template", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Email Template fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmailTemplateCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Email Templates" ], "operationId": "deleteEmailTemplates", "summary": "Delete an Email Template", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_templates**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_templates" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Email Template", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Email Template successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/feedback.json": { "get": { "tags": [ "Feedback" ], "operationId": "listFeedback", "summary": "List all Feedback", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_feedback**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_feedback" ] } ], "responses": { "200": { "description": "An array of Feedback", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Feedback" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-13a3-4295-a007-23f943a7650b", "active": 1, "edit_date": "2026-03-01 12:00:00", "timestamp": "string", "related_object": "string", "related_object_uuid": "123e4567-fbd7-4995-b868-23f94676b6fb", "rating": "string", "comment": "string" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Feedback" ], "operationId": "createFeedback", "summary": "Create a new Feedback", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_feedback**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_feedback" ] } ], "parameters": [], "requestBody": { "description": "Feedback record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FeedbackCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Feedback record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/feedback/{uuid}.json": { "get": { "tags": [ "Feedback" ], "operationId": "getFeedback", "summary": "Retrieve a Feedback", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_feedback**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_feedback" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Feedback", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Feedback record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Feedback" }, "examples": { "success": { "value": { "uuid": "123e4567-0be1-4603-9b74-23f94a70ee8b", "active": 1, "edit_date": "2026-03-01 12:00:00", "timestamp": "string", "related_object": "string", "related_object_uuid": "123e4567-3f12-4092-a511-23f94863a9db", "rating": "string", "comment": "string" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Feedback" ], "operationId": "updateFeedback", "summary": "Update a Feedback", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_feedback**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_feedback" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Feedback", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Feedback fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FeedbackCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Feedback" ], "operationId": "deleteFeedback", "summary": "Delete a Feedback", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_feedback**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_feedback" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Feedback", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Feedback successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/form.json": { "get": { "tags": [ "Forms" ], "operationId": "listForms", "summary": "List all Forms", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_forms**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_forms" ] } ], "responses": { "200": { "description": "An array of Forms", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Form" } }, "examples": { "success": { "value": [ { "name": "string", "document_template_uuid": "123e4567-46d9-4223-a346-23f942e342ab", "can_be_used_independently": "string", "badge_mandatory_state": "string", "template_fields": [ { "name": "string", "fieldType": "string", "value": "string", "sortOrder": "string" } ], "uuid": "123e4567-9fdc-4a3d-a28f-23f94b968d5b", "active": 1, "edit_date": "2026-03-01 12:00:00", "badge_name": "string" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Forms" ], "operationId": "createForms", "summary": "Create a new Form", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_forms**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_forms" ] } ], "parameters": [], "requestBody": { "description": "Form record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FormCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Form record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/form/{uuid}.json": { "get": { "tags": [ "Forms" ], "operationId": "getForms", "summary": "Retrieve a Form", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_forms**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_forms" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Form", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Form record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Form" }, "examples": { "success": { "value": { "name": "string", "document_template_uuid": "123e4567-22d4-47d7-9484-23f94d00513b", "can_be_used_independently": "string", "badge_mandatory_state": "string", "template_fields": [ { "name": "string", "fieldType": "string", "value": "string", "sortOrder": "string" } ], "uuid": "123e4567-6f02-4c9f-ab6c-23f94e8b881b", "active": 1, "edit_date": "2026-03-01 12:00:00", "badge_name": "string" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Forms" ], "operationId": "updateForms", "summary": "Update a Form", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_forms**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_forms" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Form", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Form fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FormCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Forms" ], "operationId": "deleteForms", "summary": "Delete a Form", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_forms**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_forms" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Form", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Form successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/formfield.json": { "get": { "tags": [ "Form Fields" ], "operationId": "listFormFields", "summary": "List all Form Fields", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_forms**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_forms" ] } ], "responses": { "200": { "description": "An array of Form Fields", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/FormField" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-937e-46e0-8c07-23f94bdc17ab", "active": 1, "edit_date": "2026-03-01 12:00:00", "form_uuid": "123e4567-c0f9-48f3-9b27-23f9492638fb", "name": "string", "field_data_json": "string", "sort_order": "string" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Form Fields" ], "operationId": "createFormFields", "summary": "Create a new Form Field", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_forms**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_forms" ] } ], "parameters": [], "requestBody": { "description": "Form Field record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FormFieldCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Form Field record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/formfield/{uuid}.json": { "get": { "tags": [ "Form Fields" ], "operationId": "getFormFields", "summary": "Retrieve a Form Field", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_forms**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_forms" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Form Field", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Form Field record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FormField" }, "examples": { "success": { "value": { "uuid": "123e4567-6104-41a5-bb3b-23f94d269a1b", "active": 1, "edit_date": "2026-03-01 12:00:00", "form_uuid": "123e4567-d07c-47d9-9ecd-23f94019a2db", "name": "string", "field_data_json": "string", "sort_order": "string" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Form Fields" ], "operationId": "updateFormFields", "summary": "Update a Form Field", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_forms**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_forms" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Form Field", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Form Field fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FormFieldCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Form Fields" ], "operationId": "deleteFormFields", "summary": "Delete a Form Field", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_forms**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_forms" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Form Field", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Form Field successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/formresponse.json": { "get": { "tags": [ "Form Responses" ], "operationId": "listFormResponses", "summary": "List all Form Responses", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_forms**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_forms" ] } ], "responses": { "200": { "description": "An array of Form Responses", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/FormResponse" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-af16-4618-80c7-23f940cc449b", "active": 1, "edit_date": "2026-03-01 12:00:00", "form_uuid": "123e4567-f8b2-4802-a8db-23f94cf50e1b", "staff_uuid": "123e4567-5c89-4cb3-8dc0-23f94d75521b", "regarding_object": "string", "regarding_object_uuid": "123e4567-016e-482c-a3f7-23f943f6d72b", "field_data": "string", "timestamp": "2026-03-01 12:00:00", "form_by_staff_uuid": "123e4567-44e8-448d-925c-23f9435b205b", "document_attachment_uuid": "123e4567-2f15-479f-8791-23f94c0fbbbb", "asset_uuid": "123e4567-89f4-4183-ae1e-23f94832e59b" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Form Responses" ], "operationId": "createFormResponses", "summary": "Create a new Form Response", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_forms**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_forms" ] } ], "parameters": [], "requestBody": { "description": "Form Response record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FormResponseCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Form Response record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/formresponse/{uuid}.json": { "get": { "tags": [ "Form Responses" ], "operationId": "getFormResponses", "summary": "Retrieve a Form Response", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_forms**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_forms" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Form Response", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Form Response record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FormResponse" }, "examples": { "success": { "value": { "uuid": "123e4567-a64a-486e-a52f-23f94ecaef1b", "active": 1, "edit_date": "2026-03-01 12:00:00", "form_uuid": "123e4567-96d4-40a7-a504-23f947f5b6eb", "staff_uuid": "123e4567-6df1-483b-bcf6-23f94088425b", "regarding_object": "string", "regarding_object_uuid": "123e4567-98c0-47ef-b4f8-23f94ef050eb", "field_data": "string", "timestamp": "2026-03-01 12:00:00", "form_by_staff_uuid": "123e4567-55b8-43d3-8ad7-23f94044ab0b", "document_attachment_uuid": "123e4567-da19-4bf9-951a-23f946b6065b", "asset_uuid": "123e4567-ee56-4fb1-a65d-23f9452ba74b" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Form Responses" ], "operationId": "updateFormResponses", "summary": "Update a Form Response", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_forms**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_forms" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Form Response", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Form Response fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FormResponseCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Form Responses" ], "operationId": "deleteFormResponses", "summary": "Delete a Form Response", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_forms**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_forms" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Form Response", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Form Response successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/inboxmessage.json": { "get": { "tags": [ "Inbox" ], "operationId": "listInboxMessages", "summary": "List inbox messages", "description": "Retrieves a paginated list of inbox messages with optional filtering", "security": [ { "apiKey": [] }, { "oauth2": [ "read_inbox" ] } ], "parameters": [ { "name": "limit", "in": "query", "description": "Maximum number of messages to return (1-500)", "schema": { "type": "integer", "minimum": 1, "maximum": 500, "default": 50 } }, { "name": "offset", "in": "query", "description": "Number of messages to skip for pagination", "schema": { "type": "integer", "minimum": 0, "default": 0 } }, { "name": "filter", "in": "query", "description": "Filter messages by status", "schema": { "type": "string", "enum": [ "all", "unread", "archived", "snoozed" ], "default": "all" } }, { "name": "search", "in": "query", "description": "Search messages by subject, from name, or from email", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboxMessagesResponse" } } } }, "403": { "description": "Forbidden - Missing permission or OAuth scope", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "400": { "description": "Service Unavailable - Inbox not enabled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "post": { "tags": [ "Inbox" ], "operationId": "createInboxMessage", "summary": "Create a new inbox message", "description": "Creates a new inbox message that will appear in the inbox", "security": [ { "apiKey": [] }, { "oauth2": [ "publish_inbox" ] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInboxMessageRequest" } } } }, "responses": { "201": { "description": "Message created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboxMessageDetail" } } } }, "400": { "description": "Bad request - Invalid input", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "Forbidden - Missing permission or OAuth scope", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Not found - Related entity not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/inboxmessage/{uuid}.json": { "get": { "tags": [ "Inbox" ], "operationId": "getInboxMessage", "summary": "Get inbox message details", "description": "Retrieves detailed information about a specific inbox message including attachments and conversation history", "security": [ { "apiKey": [] }, { "oauth2": [ "read_inbox" ] } ], "parameters": [ { "name": "uuid", "in": "path", "required": true, "description": "UUID of the inbox message", "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboxMessageDetail" } } } }, "404": { "description": "Message not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/job.json": { "get": { "tags": [ "Jobs" ], "operationId": "listJobs", "summary": "List all Jobs", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_jobs**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_jobs" ] } ], "responses": { "200": { "description": "An array of Jobs", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Job" } }, "examples": { "success": { "value": [ { "created_by_staff_uuid": "123e4567-19a3-4568-8337-23f940cbf86b", "date": "YYYY-MM-DD", "company_uuid": "123e4567-60da-4083-b525-23f949573fdb", "billing_address": "string", "status": "string", "lng": "number", "lat": "number", "payment_date": "2026-03-01 12:00:00", "payment_actioned_by_uuid": "123e4567-85d4-4621-92ed-23f947cc405b", "payment_method": "string", "payment_amount": "string", "category_uuid": "123e4567-5ead-41b2-b699-23f9454f3a8b", "payment_note": "string", "geo_is_valid": "string", "purchase_order_number": "string", "invoice_sent": "string", "invoice_sent_stamp": "2026-03-01 12:00:00", "ready_to_invoice": "string", "ready_to_invoice_stamp": "string", "geo_country": "string", "geo_postcode": "string", "geo_state": "string", "geo_city": "string", "geo_street": "string", "geo_number": "string", "queue_uuid": "123e4567-ec45-4fb4-a8be-23f9441be02b", "queue_expiry_date": "2026-03-01 12:00:00", "queue_assigned_staff_uuid": "123e4567-caae-4973-a977-23f941e95b0b", "badges": "string", "quote_date": "2026-03-01 12:00:00", "quote_sent": "string", "quote_sent_stamp": "2026-03-01 12:00:00", "work_order_date": "2026-03-01 12:00:00", "active_network_request_uuid": "string", "related_knowledge_articles": "string", "uuid": "123e4567-998c-45c6-8dcb-23f946a3aceb", "active": 1, "edit_date": "2026-03-01 12:00:00", "job_address": "string", "job_description": "string", "work_done_description": "string", "generated_job_id": "string", "total_invoice_amount": "string", "payment_processed": "string", "payment_processed_stamp": "2026-03-01 12:00:00", "payment_received": "string", "payment_received_stamp": "2026-03-01 12:00:00", "completion_date": "2026-03-01 12:00:00", "completion_actioned_by_uuid": "123e4567-66e4-4f23-a5ee-23f9402403cb", "unsuccessful_date": "2026-03-01 12:00:00", "job_is_scheduled_until_stamp": "2026-03-01 12:00:00" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Jobs" ], "operationId": "createJobs", "summary": "Create a new Job", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **create_jobs**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "create_jobs" ] } ], "parameters": [], "requestBody": { "description": "Job record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Job record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/job/{uuid}.json": { "get": { "tags": [ "Jobs" ], "operationId": "getJobs", "summary": "Retrieve a Job", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_jobs**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_jobs" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Job record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Job" }, "examples": { "success": { "value": { "created_by_staff_uuid": "123e4567-cfae-47bd-8501-23f94608521b", "date": "YYYY-MM-DD", "company_uuid": "123e4567-a74c-4c4d-8102-23f94645565b", "billing_address": "string", "status": "string", "lng": "number", "lat": "number", "payment_date": "2026-03-01 12:00:00", "payment_actioned_by_uuid": "123e4567-4ac5-439d-9e29-23f9497c917b", "payment_method": "string", "payment_amount": "string", "category_uuid": "123e4567-135d-4eda-9c30-23f9439ab09b", "payment_note": "string", "geo_is_valid": "string", "purchase_order_number": "string", "invoice_sent": "string", "invoice_sent_stamp": "2026-03-01 12:00:00", "ready_to_invoice": "string", "ready_to_invoice_stamp": "string", "geo_country": "string", "geo_postcode": "string", "geo_state": "string", "geo_city": "string", "geo_street": "string", "geo_number": "string", "queue_uuid": "123e4567-7677-49f2-b85f-23f946c0f0bb", "queue_expiry_date": "2026-03-01 12:00:00", "queue_assigned_staff_uuid": "123e4567-9b3a-4720-8f27-23f94b79908b", "badges": "string", "quote_date": "2026-03-01 12:00:00", "quote_sent": "string", "quote_sent_stamp": "2026-03-01 12:00:00", "work_order_date": "2026-03-01 12:00:00", "active_network_request_uuid": "string", "related_knowledge_articles": "string", "uuid": "123e4567-8944-4763-8b13-23f9477acddb", "active": 1, "edit_date": "2026-03-01 12:00:00", "job_address": "string", "job_description": "string", "work_done_description": "string", "generated_job_id": "string", "total_invoice_amount": "string", "payment_processed": "string", "payment_processed_stamp": "2026-03-01 12:00:00", "payment_received": "string", "payment_received_stamp": "2026-03-01 12:00:00", "completion_date": "2026-03-01 12:00:00", "completion_actioned_by_uuid": "123e4567-5acd-4f56-a123-23f94e9c86fb", "unsuccessful_date": "2026-03-01 12:00:00", "job_is_scheduled_until_stamp": "2026-03-01 12:00:00" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Jobs" ], "operationId": "updateJobs", "summary": "Update a Job", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_jobs**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_jobs" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Job fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Jobs" ], "operationId": "deleteJobs", "summary": "Delete a Job", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_jobs**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_jobs" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Job successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/jobactivity.json": { "get": { "tags": [ "Job Activities" ], "operationId": "listJobActivities", "summary": "List all Job Activities", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_schedule**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_schedule" ] } ], "responses": { "200": { "description": "An array of Job Activities", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/JobActivity" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-2a57-4dde-86f1-23f94278136b", "active": 1, "edit_date": "2026-03-01 12:00:00", "job_uuid": "123e4567-38cc-4a55-9f27-23f94ac03d6b", "staff_uuid": "123e4567-ed69-4563-975a-23f94220c58b", "start_date": "2026-03-01 12:00:00", "end_date": "2026-03-01 12:00:00", "activity_was_scheduled": "string", "activity_was_recorded": "string", "activity_was_automated": "string", "has_been_opened": "string", "has_been_opened_timestamp": "2026-03-01 12:00:00", "travel_time_in_seconds": "string", "travel_distance_in_meters": "string", "allocated_by_staff_uuid": "123e4567-2785-482a-a4c2-23f944456cab", "allocated_timestamp": "2026-03-01 12:00:00", "material_uuid": "123e4567-662a-40f5-bd64-23f94e3d416b", "edit_by_staff_uuid": "123e4567-ab4e-497d-8897-23f94c036c8b" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Job Activities" ], "operationId": "createJobActivities", "summary": "Create a new Job Activity", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_schedule**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_schedule" ] } ], "parameters": [], "requestBody": { "description": "Job Activity record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobActivityCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Job Activity record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/jobactivity/{uuid}.json": { "get": { "tags": [ "Job Activities" ], "operationId": "getJobActivities", "summary": "Retrieve a Job Activity", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_schedule**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_schedule" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Activity", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Job Activity record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobActivity" }, "examples": { "success": { "value": { "uuid": "123e4567-acb2-47c2-b566-23f947492d6b", "active": 1, "edit_date": "2026-03-01 12:00:00", "job_uuid": "123e4567-8572-49db-aac1-23f94041a85b", "staff_uuid": "123e4567-cbeb-4bea-8469-23f9435954bb", "start_date": "2026-03-01 12:00:00", "end_date": "2026-03-01 12:00:00", "activity_was_scheduled": "string", "activity_was_recorded": "string", "activity_was_automated": "string", "has_been_opened": "string", "has_been_opened_timestamp": "2026-03-01 12:00:00", "travel_time_in_seconds": "string", "travel_distance_in_meters": "string", "allocated_by_staff_uuid": "123e4567-5bce-4560-8b55-23f94ba0706b", "allocated_timestamp": "2026-03-01 12:00:00", "material_uuid": "123e4567-6f06-4c8e-b155-23f94cbca4fb", "edit_by_staff_uuid": "123e4567-6b02-4756-be68-23f94aa7b40b" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Job Activities" ], "operationId": "updateJobActivities", "summary": "Update a Job Activity", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_schedule**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_schedule" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Activity", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Job Activity fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobActivityCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Job Activities" ], "operationId": "deleteJobActivities", "summary": "Delete a Job Activity", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_schedule**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_schedule" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Activity", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Job Activity successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/joballocation.json": { "get": { "tags": [ "Job Allocations" ], "operationId": "listJobAllocations", "summary": "List all Job Allocations", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_schedule**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_schedule" ] } ], "responses": { "200": { "description": "An array of Job Allocations", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/JobAllocation" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-aa11-4415-ac38-23f94bc904db", "active": 1, "edit_date": "2026-03-01 12:00:00", "job_uuid": "123e4567-ef33-4570-9929-23f945326d1b", "queue_uuid": "123e4567-e495-4a8d-a253-23f9408ba0db", "staff_uuid": "123e4567-e0d8-481f-b4bb-23f944e9c86b", "allocation_date": "2026-03-01 12:00:00", "allocation_window_uuid": "123e4567-0f0c-48b9-8570-23f94fcc00db", "allocated_by_staff_uuid": "123e4567-ab70-4071-8066-23f94537066b", "allocated_timestamp": "2026-03-01 12:00:00", "expiry_timestamp": "2026-03-01 12:00:00", "read_timestamp": "2026-03-01 12:00:00", "completion_timestamp": "2026-03-01 12:00:00", "estimated_duration": "string", "revised_duration": "string", "sort_priority": "string", "requires_acceptance": "string", "acceptance_status": "string", "acceptance_timestamp": "2026-03-01 12:00:00" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Job Allocations" ], "operationId": "createJobAllocations", "summary": "Create a new Job Allocation", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_schedule**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_schedule" ] } ], "parameters": [], "requestBody": { "description": "Job Allocation record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobAllocationCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Job Allocation record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/joballocation/{uuid}.json": { "get": { "tags": [ "Job Allocations" ], "operationId": "getJobAllocations", "summary": "Retrieve a Job Allocation", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_schedule**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_schedule" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Allocation", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Job Allocation record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobAllocation" }, "examples": { "success": { "value": { "uuid": "123e4567-200e-4ac7-b12c-23f94866565b", "active": 1, "edit_date": "2026-03-01 12:00:00", "job_uuid": "123e4567-10bd-415a-8e04-23f942e7039b", "queue_uuid": "123e4567-95d4-480c-bed2-23f9406a7e4b", "staff_uuid": "123e4567-6f1e-4767-93a1-23f941e6636b", "allocation_date": "2026-03-01 12:00:00", "allocation_window_uuid": "123e4567-0f30-4e72-ba34-23f942a2f85b", "allocated_by_staff_uuid": "123e4567-386b-4f30-ab52-23f9499fce3b", "allocated_timestamp": "2026-03-01 12:00:00", "expiry_timestamp": "2026-03-01 12:00:00", "read_timestamp": "2026-03-01 12:00:00", "completion_timestamp": "2026-03-01 12:00:00", "estimated_duration": "string", "revised_duration": "string", "sort_priority": "string", "requires_acceptance": "string", "acceptance_status": "string", "acceptance_timestamp": "2026-03-01 12:00:00" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Job Allocations" ], "operationId": "updateJobAllocations", "summary": "Update a Job Allocation", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_schedule**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_schedule" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Allocation", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Job Allocation fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobAllocationCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Job Allocations" ], "operationId": "deleteJobAllocations", "summary": "Delete a Job Allocation", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_schedule**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_schedule" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Allocation", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Job Allocation successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/jobchecklist.json": { "get": { "tags": [ "Job Checklists" ], "operationId": "listJobChecklists", "summary": "List all Job Checklists", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_job_checklists**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_job_checklists" ] } ], "responses": { "200": { "description": "An array of Job Checklists", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/JobChecklist" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-e14f-4be4-a611-23f942260ccb", "active": 1, "edit_date": "2026-03-01 12:00:00", "job_uuid": "123e4567-096f-4012-a46e-23f948f06ffb", "name": "string", "section_name": "string", "item_type": "string", "sort_order": "string", "completed_timestamp": "2026-03-01 12:00:00", "completed_by_staff_uuid": "123e4567-2eab-4c43-899d-23f94ebb628b", "completed_during_checkin_uuid": "123e4567-184a-4edf-9482-23f941f9e02b", "reminder_type": "string", "reminder_data": "string", "regarding_object": "string", "regarding_object_uuid": "123e4567-85d7-414f-826b-23f94952f43b", "fulfilled_by_object_name": "string", "fulfilled_by_object_uuid": "123e4567-95a6-4ec9-91bb-23f9411181fb", "assigned_to_staff_uuids": "123e4567-eca4-4a40-95ea-23f94b5bb82b", "is_locked": "string", "assigned_timestamp": "2026-03-01 12:00:00", "assigned_by_staff_uuid": "123e4567-db60-4ab1-b24b-23f9428f3a2b" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Job Checklists" ], "operationId": "createJobChecklists", "summary": "Create a new Job Checklist", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_job_checklists**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_job_checklists" ] } ], "parameters": [], "requestBody": { "description": "Job Checklist record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobChecklistCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Job Checklist record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/jobchecklist/{uuid}.json": { "get": { "tags": [ "Job Checklists" ], "operationId": "getJobChecklists", "summary": "Retrieve a Job Checklist", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_job_checklists**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_job_checklists" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Checklist", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Job Checklist record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobChecklist" }, "examples": { "success": { "value": { "uuid": "123e4567-ef02-43fd-9c94-23f94cd59c0b", "active": 1, "edit_date": "2026-03-01 12:00:00", "job_uuid": "123e4567-085a-4e9e-b401-23f94f35494b", "name": "string", "section_name": "string", "item_type": "string", "sort_order": "string", "completed_timestamp": "2026-03-01 12:00:00", "completed_by_staff_uuid": "123e4567-19b6-454c-bd95-23f943b1f87b", "completed_during_checkin_uuid": "123e4567-ea85-4c0e-8ff3-23f948b75e6b", "reminder_type": "string", "reminder_data": "string", "regarding_object": "string", "regarding_object_uuid": "123e4567-b771-4a70-8c33-23f94bc3673b", "fulfilled_by_object_name": "string", "fulfilled_by_object_uuid": "123e4567-3d4a-4e8d-807e-23f94ac5946b", "assigned_to_staff_uuids": "123e4567-f9b2-4189-a51e-23f94300e7bb", "is_locked": "string", "assigned_timestamp": "2026-03-01 12:00:00", "assigned_by_staff_uuid": "123e4567-8b34-498e-8221-23f941de1e8b" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Job Checklists" ], "operationId": "updateJobChecklists", "summary": "Update a Job Checklist", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_job_checklists**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_job_checklists" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Checklist", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Job Checklist fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobChecklistCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Job Checklists" ], "operationId": "deleteJobChecklists", "summary": "Delete a Job Checklist", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_job_checklists**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_job_checklists" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Checklist", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Job Checklist successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/jobcontact.json": { "get": { "tags": [ "Job Contacts" ], "operationId": "listJobContacts", "summary": "List all Job Contacts", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_job_contacts**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_job_contacts" ] } ], "responses": { "200": { "description": "An array of Job Contacts", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/JobContact" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-ea79-439e-8ccd-23f9412b198b", "active": 1, "edit_date": "2026-03-01 12:00:00", "job_uuid": "123e4567-a9a8-4d1d-b8de-23f9473ad6bb", "first": "string", "last": "string", "phone": "string", "mobile": "string", "email": "string", "type": "string" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Job Contacts" ], "operationId": "createJobContacts", "summary": "Create a new Job Contact", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_job_contacts**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_job_contacts" ] } ], "parameters": [], "requestBody": { "description": "Job Contact record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobContactCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Job Contact record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/jobcontact/{uuid}.json": { "get": { "tags": [ "Job Contacts" ], "operationId": "getJobContacts", "summary": "Retrieve a Job Contact", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_job_contacts**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_job_contacts" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Contact", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Job Contact record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobContact" }, "examples": { "success": { "value": { "uuid": "123e4567-a84d-446f-8129-23f9436c321b", "active": 1, "edit_date": "2026-03-01 12:00:00", "job_uuid": "123e4567-91e9-4479-a5bf-23f94b513a2b", "first": "string", "last": "string", "phone": "string", "mobile": "string", "email": "string", "type": "string" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Job Contacts" ], "operationId": "updateJobContacts", "summary": "Update a Job Contact", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_job_contacts**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_job_contacts" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Contact", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Job Contact fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobContactCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Job Contacts" ], "operationId": "deleteJobContacts", "summary": "Delete a Job Contact", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_job_contacts**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_job_contacts" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Contact", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Job Contact successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/jobmaterial.json": { "get": { "tags": [ "Job Materials" ], "operationId": "listJobMaterials", "summary": "List all Job Materials", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_job_materials**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_job_materials" ] } ], "responses": { "200": { "description": "An array of Job Materials", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/JobMaterial" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-3d48-4b63-b3de-23f941b2cd9b", "active": 1, "edit_date": "2026-03-01 12:00:00", "job_uuid": "123e4567-753c-489e-ac37-23f944ea19db", "material_uuid": "123e4567-6560-4d46-ba4d-23f946712ceb", "name": "string", "quantity": "string", "price": "string", "displayed_amount": "string", "displayed_amount_is_tax_inclusive": "string", "tax_rate_uuid": "123e4567-9191-4380-b40b-23f94405515b", "sort_order": "string", "cost": "string", "displayed_cost": "string", "job_material_bundle_uuid": "123e4567-8392-4c56-89c4-23f94210084b" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Job Materials" ], "operationId": "createJobMaterials", "summary": "Create a new Job Material", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_job_materials**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_job_materials" ] } ], "parameters": [], "requestBody": { "description": "Job Material record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobMaterialCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Job Material record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/jobmaterial/{uuid}.json": { "get": { "tags": [ "Job Materials" ], "operationId": "getJobMaterials", "summary": "Retrieve a Job Material", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_job_materials**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_job_materials" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Material", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Job Material record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobMaterial" }, "examples": { "success": { "value": { "uuid": "123e4567-74e3-4f64-b22f-23f94bbf232b", "active": 1, "edit_date": "2026-03-01 12:00:00", "job_uuid": "123e4567-baf5-48ae-813e-23f9401800cb", "material_uuid": "123e4567-f19c-4dc5-8229-23f948ed0d6b", "name": "string", "quantity": "string", "price": "string", "displayed_amount": "string", "displayed_amount_is_tax_inclusive": "string", "tax_rate_uuid": "123e4567-dbcd-485a-8ae8-23f946e8852b", "sort_order": "string", "cost": "string", "displayed_cost": "string", "job_material_bundle_uuid": "123e4567-6328-4b87-baa7-23f948a1827b" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Job Materials" ], "operationId": "updateJobMaterials", "summary": "Update a Job Material", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_job_materials**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_job_materials" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Material", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Job Material fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobMaterialCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Job Materials" ], "operationId": "deleteJobMaterials", "summary": "Delete a Job Material", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_job_materials**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_job_materials" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Material", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Job Material successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/jobmaterialbundle.json": { "get": { "tags": [ "Job Material Bundles" ], "operationId": "listJobMaterialBundles", "summary": "List all Job Material Bundles", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_job_materials**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_job_materials" ] } ], "responses": { "200": { "description": "An array of Job Material Bundles", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/JobMaterialBundle" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-99ad-4d22-a76a-23f94aa1876b", "active": 1, "edit_date": "2026-03-01 12:00:00", "item_number": "string", "name": "string", "quantity": "string", "sort_order": "string", "material_bundle_uuid": "123e4567-dab3-4fd7-b872-23f94f8d584b", "job_uuid": "123e4567-be80-4199-9473-23f94828569b" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Job Material Bundles" ], "operationId": "createJobMaterialBundles", "summary": "Create a new Job Material Bundle", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_job_materials**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_job_materials" ] } ], "parameters": [], "requestBody": { "description": "Job Material Bundle record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobMaterialBundleCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Job Material Bundle record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/jobmaterialbundle/{uuid}.json": { "get": { "tags": [ "Job Material Bundles" ], "operationId": "getJobMaterialBundles", "summary": "Retrieve a Job Material Bundle", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_job_materials**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_job_materials" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Material Bundle", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Job Material Bundle record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobMaterialBundle" }, "examples": { "success": { "value": { "uuid": "123e4567-9dd8-4c00-b96e-23f944bbaf8b", "active": 1, "edit_date": "2026-03-01 12:00:00", "item_number": "string", "name": "string", "quantity": "string", "sort_order": "string", "material_bundle_uuid": "123e4567-c258-40d0-b572-23f94c331b8b", "job_uuid": "123e4567-df28-4c1b-83e4-23f9480db30b" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Job Material Bundles" ], "operationId": "updateJobMaterialBundles", "summary": "Update a Job Material Bundle", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_job_materials**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_job_materials" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Material Bundle", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Job Material Bundle fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobMaterialBundleCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Job Material Bundles" ], "operationId": "deleteJobMaterialBundles", "summary": "Delete a Job Material Bundle", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_job_materials**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_job_materials" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Material Bundle", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Job Material Bundle successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/jobpayment.json": { "get": { "tags": [ "Job Payments" ], "operationId": "listJobPayments", "summary": "List all Job Payments", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_job_payments**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_job_payments" ] } ], "responses": { "200": { "description": "An array of Job Payments", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/JobPayment" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-8619-4e30-8af2-23f9420a23fb", "active": 1, "edit_date": "2026-03-01 12:00:00", "job_uuid": "123e4567-ba4f-4f1d-84a7-23f9457f4edb", "actioned_by_uuid": "123e4567-c7bc-4809-98ef-23f9432512eb", "timestamp": "2026-03-01 12:00:00", "amount": "string", "method": "string", "note": "string", "attachment_uuid": "123e4567-8156-4166-9de4-23f94e8918fb", "is_deposit": "string" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Job Payments" ], "operationId": "createJobPayments", "summary": "Create a new Job Payment", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_job_payments**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_job_payments" ] } ], "parameters": [], "requestBody": { "description": "Job Payment record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobPaymentCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Job Payment record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/jobpayment/{uuid}.json": { "get": { "tags": [ "Job Payments" ], "operationId": "getJobPayments", "summary": "Retrieve a Job Payment", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_job_payments**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_job_payments" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Payment", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Job Payment record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobPayment" }, "examples": { "success": { "value": { "uuid": "123e4567-788f-4151-9b0a-23f946fbaa1b", "active": 1, "edit_date": "2026-03-01 12:00:00", "job_uuid": "123e4567-505e-4f5d-804a-23f940d0516b", "actioned_by_uuid": "123e4567-9f4e-4747-a1d7-23f94abb4a6b", "timestamp": "2026-03-01 12:00:00", "amount": "string", "method": "string", "note": "string", "attachment_uuid": "123e4567-c054-471b-83d8-23f94c91be3b", "is_deposit": "string" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Job Payments" ], "operationId": "updateJobPayments", "summary": "Update a Job Payment", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_job_payments**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_job_payments" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Payment", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Job Payment fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobPaymentCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Job Payments" ], "operationId": "deleteJobPayments", "summary": "Delete a Job Payment", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_job_payments**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_job_payments" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Payment", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Job Payment successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/jobtemplate.json": { "get": { "tags": [ "Job Templates" ], "operationId": "listJobTemplates", "summary": "List all Job Templates", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_jobs**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_jobs" ] } ], "responses": { "200": { "description": "An array of Job Templates", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/JobTemplate" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-70bc-4e4d-af97-23f94c23d8eb", "active": 1, "edit_date": "2026-03-01 12:00:00", "name": "string" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/jobtemplate/{uuid}.json": { "get": { "tags": [ "Job Templates" ], "operationId": "getJobTemplates", "summary": "Retrieve a Job Template", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_jobs**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_jobs" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Template", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Job Template record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobTemplate" }, "examples": { "success": { "value": { "uuid": "123e4567-c20b-4e26-8092-23f94455734b", "active": 1, "edit_date": "2026-03-01 12:00:00", "name": "string" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/knowledgearticle.json": { "get": { "tags": [ "Knowledge Articles" ], "operationId": "listKnowledgeArticles", "summary": "List all Knowledge Articles", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_knowledge**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_knowledge" ] } ], "responses": { "200": { "description": "An array of Knowledge Articles", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/KnowledgeArticle" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-4a01-4b34-a06a-23f9400edd6b", "active": 1, "edit_date": "2026-03-01 12:00:00", "name": "string", "content": "string", "article_type": "string", "tags": "string", "relationships": [ { "object_name": "string", "object_uuid": "string", "object_description": "string", "create_date": "string" } ] } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Knowledge Articles" ], "operationId": "createKnowledgeArticles", "summary": "Create a new Knowledge Article", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_knowledge**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_knowledge" ] } ], "parameters": [], "requestBody": { "description": "Knowledge Article record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeArticleCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Knowledge Article record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/knowledgearticle/{uuid}.json": { "get": { "tags": [ "Knowledge Articles" ], "operationId": "getKnowledgeArticles", "summary": "Retrieve a Knowledge Article", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_knowledge**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_knowledge" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Knowledge Article", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Knowledge Article record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeArticle" }, "examples": { "success": { "value": { "uuid": "123e4567-50c7-45af-8cad-23f94e46067b", "active": 1, "edit_date": "2026-03-01 12:00:00", "name": "string", "content": "string", "article_type": "string", "tags": "string", "relationships": [ { "object_name": "string", "object_uuid": "string", "object_description": "string", "create_date": "string" } ] } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Knowledge Articles" ], "operationId": "updateKnowledgeArticles", "summary": "Update a Knowledge Article", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_knowledge**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_knowledge" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Knowledge Article", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Knowledge Article fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeArticleCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Knowledge Articles" ], "operationId": "deleteKnowledgeArticles", "summary": "Delete a Knowledge Article", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_knowledge**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_knowledge" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Knowledge Article", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Knowledge Article successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/location.json": { "get": { "tags": [ "Locations" ], "operationId": "listLocations", "summary": "List all Locations", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_locations**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_locations" ] } ], "responses": { "200": { "description": "An array of Locations", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Location" } }, "examples": { "success": { "value": [ { "name": "string", "line1": "string", "line2": "string", "line3": "string", "city": "string", "country": "string", "post_code": "string", "phone_1": "string", "state": "string", "lng": "number", "lat": "number", "uuid": "123e4567-765a-44fc-882e-23f949e331cb", "active": 1, "edit_date": "2026-03-01 12:00:00" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Locations" ], "operationId": "createLocations", "summary": "Create a new Location", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_locations**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_locations" ] } ], "parameters": [], "requestBody": { "description": "Location record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Location record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/location/{uuid}.json": { "get": { "tags": [ "Locations" ], "operationId": "getLocations", "summary": "Retrieve a Location", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_locations**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_locations" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Location", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Location record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Location" }, "examples": { "success": { "value": { "name": "string", "line1": "string", "line2": "string", "line3": "string", "city": "string", "country": "string", "post_code": "string", "phone_1": "string", "state": "string", "lng": "number", "lat": "number", "uuid": "123e4567-c621-47eb-a5ef-23f94e2240bb", "active": 1, "edit_date": "2026-03-01 12:00:00" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Locations" ], "operationId": "updateLocations", "summary": "Update a Location", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_locations**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_locations" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Location", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Location fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Locations" ], "operationId": "deleteLocations", "summary": "Delete a Location", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_locations**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_locations" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Location", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Location successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/material.json": { "get": { "tags": [ "Materials" ], "operationId": "listMaterials", "summary": "List all Materials", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_inventory**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_inventory" ] } ], "responses": { "200": { "description": "An array of Materials", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Material" } }, "examples": { "success": { "value": [ { "name": "string", "item_number": "string", "price": "string", "cost": "string", "quantity_in_stock": "number", "price_includes_taxes": "string", "barcode": "string", "item_is_inventoried": "string", "uuid": "123e4567-1211-44da-bf61-23f94719894b", "active": 1, "edit_date": "2026-03-01 12:00:00", "item_description": "string", "use_description_for_invoicing": "string", "tax_rate_uuid": "123e4567-b6f5-4eb5-bf29-23f942c47dab" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Materials" ], "operationId": "createMaterials", "summary": "Create a new Material", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_inventory**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_inventory" ] } ], "parameters": [], "requestBody": { "description": "Material record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MaterialCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Material record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/material/{uuid}.json": { "get": { "tags": [ "Materials" ], "operationId": "getMaterials", "summary": "Retrieve a Material", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_inventory**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_inventory" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Material", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Material record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Material" }, "examples": { "success": { "value": { "name": "string", "item_number": "string", "price": "string", "cost": "string", "quantity_in_stock": "number", "price_includes_taxes": "string", "barcode": "string", "item_is_inventoried": "string", "uuid": "123e4567-5afc-460e-b886-23f94042554b", "active": 1, "edit_date": "2026-03-01 12:00:00", "item_description": "string", "use_description_for_invoicing": "string", "tax_rate_uuid": "123e4567-c9f8-4b96-9421-23f94992e2eb" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Materials" ], "operationId": "updateMaterials", "summary": "Update a Material", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_inventory**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_inventory" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Material", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Material fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MaterialCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Materials" ], "operationId": "deleteMaterials", "summary": "Delete a Material", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_inventory**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_inventory" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Material", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Material successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/materialbundle.json": { "get": { "tags": [ "Bundles" ], "operationId": "listBundles", "summary": "List all Bundles", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_inventory**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_inventory" ] } ], "responses": { "200": { "description": "An array of Bundles", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MaterialBundle" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-dafa-4973-8a9f-23f94abd4f2b", "active": 1, "edit_date": "2026-03-01 12:00:00", "item_number": "string", "name": "string", "material_list": [ { "uuid": "string", "quantity": "number", "sort_order": "string" } ] } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Bundles" ], "operationId": "createBundles", "summary": "Create a new Bundle", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_inventory**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_inventory" ] } ], "parameters": [], "requestBody": { "description": "Bundle record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MaterialBundleCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Bundle record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/materialbundle/{uuid}.json": { "get": { "tags": [ "Bundles" ], "operationId": "getBundles", "summary": "Retrieve a Bundle", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_inventory**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_inventory" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Bundle", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Bundle record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MaterialBundle" }, "examples": { "success": { "value": { "uuid": "123e4567-8fb9-4c92-a098-23f94fbfdb8b", "active": 1, "edit_date": "2026-03-01 12:00:00", "item_number": "string", "name": "string", "material_list": [ { "uuid": "string", "quantity": "number", "sort_order": "string" } ] } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Bundles" ], "operationId": "updateBundles", "summary": "Update a Bundle", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_inventory**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_inventory" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Bundle", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Bundle fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MaterialBundleCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Bundles" ], "operationId": "deleteBundles", "summary": "Delete a Bundle", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_inventory**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_inventory" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Bundle", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Bundle successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/note.json": { "get": { "tags": [ "Notes" ], "operationId": "listNotes", "summary": "List all Notes", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_job_notes**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_job_notes" ] } ], "responses": { "200": { "description": "An array of Notes", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Note" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-6514-4dbd-a86e-23f9456a4d3b", "active": 1, "edit_date": "2026-03-01 12:00:00", "related_object": "string", "related_object_uuid": "123e4567-7a1d-46ad-9f41-23f94779ab8b", "note": "string", "action_required": "string", "action_completed_by_staff_uuid": "123e4567-a750-4fe5-ac0e-23f94f58ffeb", "edit_by_staff_uuid": "123e4567-995c-4d4f-be9c-23f9471d95ab", "create_date": "2026-03-01 12:00:00" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Notes" ], "operationId": "createNotes", "summary": "Create a new Note", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **publish_job_notes**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "publish_job_notes" ] } ], "parameters": [], "requestBody": { "description": "Note record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoteCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Note record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/dbonote/{uuid}.json": { "get": { "tags": [ "Notes" ], "operationId": "getNotes", "summary": "Retrieve a Note", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_job_notes**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_job_notes" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Note", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Note record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Note" }, "examples": { "success": { "value": { "uuid": "123e4567-7ffc-4b1e-86ea-23f94505b78b", "active": 1, "edit_date": "2026-03-01 12:00:00", "related_object": "string", "related_object_uuid": "123e4567-1ec8-4cb5-8fc5-23f947a828cb", "note": "string", "action_required": "string", "action_completed_by_staff_uuid": "123e4567-5313-4201-b9c9-23f9479bb58b", "edit_by_staff_uuid": "123e4567-35cf-41c8-82ae-23f947a0825b", "create_date": "2026-03-01 12:00:00" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Notes" ], "operationId": "updateNotes", "summary": "Update a Note", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **publish_job_notes**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "publish_job_notes" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Note", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Note fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoteCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Notes" ], "operationId": "deleteNotes", "summary": "Delete a Note", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **publish_job_notes**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "publish_job_notes" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Note", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Note successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/queue.json": { "get": { "tags": [ "Job Queues" ], "operationId": "listJobQueues", "summary": "List all Job Queues", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_job_queues**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_job_queues" ] } ], "responses": { "200": { "description": "An array of Job Queues", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Queue" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-2645-4191-9bba-23f942da7b0b", "active": 1, "edit_date": "2026-03-01 12:00:00", "name": "string", "default_timeframe": "string", "subscribed_staff": "string", "requires_assignment": "string" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Job Queues" ], "operationId": "createJobQueues", "summary": "Create a new Job Queue", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_job_queues**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_job_queues" ] } ], "parameters": [], "requestBody": { "description": "Job Queue record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueueCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Job Queue record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/queue/{uuid}.json": { "get": { "tags": [ "Job Queues" ], "operationId": "getJobQueues", "summary": "Retrieve a Job Queue", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_job_queues**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_job_queues" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Queue", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Job Queue record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Queue" }, "examples": { "success": { "value": { "uuid": "123e4567-bbe8-41d3-830b-23f94c49a99b", "active": 1, "edit_date": "2026-03-01 12:00:00", "name": "string", "default_timeframe": "string", "subscribed_staff": "string", "requires_assignment": "string" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Job Queues" ], "operationId": "updateJobQueues", "summary": "Update a Job Queue", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_job_queues**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_job_queues" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Queue", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Job Queue fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueueCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Job Queues" ], "operationId": "deleteJobQueues", "summary": "Delete a Job Queue", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_job_queues**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_job_queues" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Job Queue", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Job Queue successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/securityrole.json": { "get": { "tags": [ "Security Roles" ], "operationId": "listSecurityRoles", "summary": "List all Security Roles", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_security_roles**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_security_roles" ] } ], "responses": { "200": { "description": "An array of Security Roles", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SecurityRole" } }, "examples": { "success": { "value": [ { "name": "string", "role_description": "string", "uuid": "123e4567-c63d-417e-a190-23f946764a6b", "active": 1, "edit_date": "2026-03-01 12:00:00" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/securityrole/{uuid}.json": { "get": { "tags": [ "Security Roles" ], "operationId": "getSecurityRoles", "summary": "Retrieve a Security Role", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_security_roles**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_security_roles" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Security Role", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Security Role record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SecurityRole" }, "examples": { "success": { "value": { "name": "string", "role_description": "string", "uuid": "123e4567-d1b4-4319-948f-23f94e2087eb", "active": 1, "edit_date": "2026-03-01 12:00:00" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/smstemplate.json": { "get": { "tags": [ "SMS Templates" ], "operationId": "listSMSTemplates", "summary": "List all SMS Templates", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_templates**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_templates" ] } ], "responses": { "200": { "description": "An array of SMS Templates", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SmsTemplate" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-d30b-480d-b61c-23f94d01de3b", "active": 1, "edit_date": "2026-03-01 12:00:00", "name": "string", "message": "string" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "SMS Templates" ], "operationId": "createSMSTemplates", "summary": "Create a new SMS Template", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_templates**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_templates" ] } ], "parameters": [], "requestBody": { "description": "SMS Template record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SmsTemplateCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created SMS Template record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/smstemplate/{uuid}.json": { "get": { "tags": [ "SMS Templates" ], "operationId": "getSMSTemplates", "summary": "Retrieve a SMS Template", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_templates**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_templates" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the SMS Template", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "SMS Template record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SmsTemplate" }, "examples": { "success": { "value": { "uuid": "123e4567-a070-4cba-ab99-23f94ca01dcb", "active": 1, "edit_date": "2026-03-01 12:00:00", "name": "string", "message": "string" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "SMS Templates" ], "operationId": "updateSMSTemplates", "summary": "Update a SMS Template", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_templates**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_templates" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the SMS Template", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "SMS Template fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SmsTemplateCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "SMS Templates" ], "operationId": "deleteSMSTemplates", "summary": "Delete a SMS Template", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_templates**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_templates" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the SMS Template", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "SMS Template successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/staff.json": { "get": { "tags": [ "Staff Members" ], "operationId": "listStaffMembers", "summary": "List all Staff Members", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_staff**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_staff" ] } ], "responses": { "200": { "description": "An array of Staff Members", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Staff" } }, "examples": { "success": { "value": [ { "first": "string", "last": "string", "email": "string", "mobile": "string", "lng": "number", "lat": "number", "geo_timestamp": "2026-03-01 12:00:00", "job_title": "string", "navigating_to_job_uuid": "123e4567-ed86-4242-b22f-23f949021d4b", "navigating_timestamp": "2026-03-01 12:00:00", "navigating_expiry_timestamp": "2026-03-01 12:00:00", "color": "string", "custom_icon_url": "string", "status_message": "string", "status_message_timestamp": "2026-03-01 12:00:00", "hide_from_schedule": "string", "uuid": "123e4567-ce52-4b1f-8564-23f94e82d3cb", "active": 1, "edit_date": "2026-03-01 12:00:00", "can_receive_push_notification": "string", "security_role_uuid": "123e4567-873a-46dc-b21b-23f9497ac49b", "labour_material_uuid": "123e4567-bd3b-4d18-af43-23f941752a7b" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Staff Members" ], "operationId": "createStaffMembers", "summary": "Create a new Staff Member", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_staff**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_staff" ] } ], "parameters": [], "requestBody": { "description": "Staff Member record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StaffCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Staff Member record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/staff/{uuid}.json": { "get": { "tags": [ "Staff Members" ], "operationId": "getStaffMembers", "summary": "Retrieve a Staff Member", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_staff**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_staff" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Staff Member", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Staff Member record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Staff" }, "examples": { "success": { "value": { "first": "string", "last": "string", "email": "string", "mobile": "string", "lng": "number", "lat": "number", "geo_timestamp": "2026-03-01 12:00:00", "job_title": "string", "navigating_to_job_uuid": "123e4567-23e3-435c-8a0a-23f9444ec90b", "navigating_timestamp": "2026-03-01 12:00:00", "navigating_expiry_timestamp": "2026-03-01 12:00:00", "color": "string", "custom_icon_url": "string", "status_message": "string", "status_message_timestamp": "2026-03-01 12:00:00", "hide_from_schedule": "string", "uuid": "123e4567-1879-47c5-ae03-23f94beafa5b", "active": 1, "edit_date": "2026-03-01 12:00:00", "can_receive_push_notification": "string", "security_role_uuid": "123e4567-2075-4a4f-b644-23f94bbe92ab", "labour_material_uuid": "123e4567-75c4-4987-8651-23f940c48a5b" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Staff Members" ], "operationId": "updateStaffMembers", "summary": "Update a Staff Member", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_staff**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_staff" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Staff Member", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Staff Member fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StaffCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Staff Members" ], "operationId": "deleteStaffMembers", "summary": "Delete a Staff Member", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_staff**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_staff" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Staff Member", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Staff Member successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/staffmessage.json": { "get": { "tags": [ "Staff Messages" ], "operationId": "listStaffMessages", "summary": "List all Staff Messages", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_messages**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_messages" ] } ], "responses": { "200": { "description": "An array of Staff Messages", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/StaffMessage" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-fc75-42a9-82f5-23f94b0b3abb", "active": 1, "edit_date": "2026-03-01 12:00:00", "from_staff_uuid": "123e4567-3e65-470f-ab5e-23f94422970b", "to_staff_uuid": "123e4567-f5f7-415e-83ef-23f944d711cb", "sent_timestamp": "2026-03-01 12:00:00", "delivered_timestamp": "2026-03-01 12:00:00", "read_timestamp": "2026-03-01 12:00:00", "message": "string", "regarding_job_uuid": "123e4567-299d-4892-8257-23f941cfe9db", "attached_json": "string" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Staff Messages" ], "operationId": "createStaffMessages", "summary": "Create a new Staff Message", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **publish_messages**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "publish_messages" ] } ], "parameters": [], "requestBody": { "description": "Staff Message record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StaffMessageCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Staff Message record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/staffmessage/{uuid}.json": { "get": { "tags": [ "Staff Messages" ], "operationId": "getStaffMessages", "summary": "Retrieve a Staff Message", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_messages**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_messages" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Staff Message", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Staff Message record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StaffMessage" }, "examples": { "success": { "value": { "uuid": "123e4567-aaea-474a-b301-23f94019ec7b", "active": 1, "edit_date": "2026-03-01 12:00:00", "from_staff_uuid": "123e4567-89cc-448f-afbf-23f946ff00db", "to_staff_uuid": "123e4567-e5bd-4116-8755-23f94c0c012b", "sent_timestamp": "2026-03-01 12:00:00", "delivered_timestamp": "2026-03-01 12:00:00", "read_timestamp": "2026-03-01 12:00:00", "message": "string", "regarding_job_uuid": "123e4567-a6bd-40ff-9303-23f9458a9beb", "attached_json": "string" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Staff Messages" ], "operationId": "updateStaffMessages", "summary": "Update a Staff Message", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **publish_messages**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "publish_messages" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Staff Message", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Staff Message fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StaffMessageCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Staff Messages" ], "operationId": "deleteStaffMessages", "summary": "Delete a Staff Message", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **publish_messages**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "publish_messages" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Staff Message", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Staff Message successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/supplier.json": { "get": { "tags": [ "Suppliers" ], "operationId": "listSuppliers", "summary": "List all Suppliers", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_suppliers**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_suppliers" ] } ], "responses": { "200": { "description": "An array of Suppliers", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Supplier" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-8385-4c76-9ac2-23f94b558adb", "active": 1, "edit_date": "2026-03-01 12:00:00", "name": "string", "business_number": "string", "address": "string", "email": "string", "phone": "string", "account_number": "string", "lng": "number", "lat": "number", "geo_is_valid": "string", "geo_country": "string", "geo_postcode": "string", "geo_state": "string", "geo_city": "string", "geo_street": "string", "geo_number": "string" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Suppliers" ], "operationId": "createSuppliers", "summary": "Create a new Supplier", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_suppliers**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_suppliers" ] } ], "parameters": [], "requestBody": { "description": "Supplier record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SupplierCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Supplier record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/supplier/{uuid}.json": { "get": { "tags": [ "Suppliers" ], "operationId": "getSuppliers", "summary": "Retrieve a Supplier", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_suppliers**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_suppliers" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Supplier", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Supplier record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Supplier" }, "examples": { "success": { "value": { "uuid": "123e4567-75f3-4b3c-83e7-23f94e708d1b", "active": 1, "edit_date": "2026-03-01 12:00:00", "name": "string", "business_number": "string", "address": "string", "email": "string", "phone": "string", "account_number": "string", "lng": "number", "lat": "number", "geo_is_valid": "string", "geo_country": "string", "geo_postcode": "string", "geo_state": "string", "geo_city": "string", "geo_street": "string", "geo_number": "string" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Suppliers" ], "operationId": "updateSuppliers", "summary": "Update a Supplier", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_suppliers**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_suppliers" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Supplier", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Supplier fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SupplierCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Suppliers" ], "operationId": "deleteSuppliers", "summary": "Delete a Supplier", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_suppliers**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_suppliers" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Supplier", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Supplier successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/task.json": { "get": { "tags": [ "Tasks" ], "operationId": "listTasks", "summary": "List all Tasks", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_tasks**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_tasks" ] } ], "responses": { "200": { "description": "An array of Tasks", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Task" } }, "examples": { "success": { "value": [ { "due_date": "YYYY-MM-DD", "task_details": "string", "name": "string", "related_object": "string", "related_object_uuid": "123e4567-31bc-40a5-9781-23f94f6086eb", "task_complete": "string", "completed_timestamp": "2026-03-01 12:00:00", "completed_by_staff_uuid": "123e4567-9fea-45a1-a044-23f948a8e6fb", "assigned_to_staff_uuid": "123e4567-1858-431d-bc65-23f94a22b9cb", "lng": "string", "lat": "string", "uuid": "123e4567-e5f1-43f5-bbe2-23f9426b04cb", "active": 1, "edit_date": "2026-03-01 12:00:00", "created_by_staff_uuid": "123e4567-838f-4083-9df7-23f9430098fb", "create_date": "2026-03-01 12:00:00" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Tasks" ], "operationId": "createTasks", "summary": "Create a new Task", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_tasks**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_tasks" ] } ], "parameters": [], "requestBody": { "description": "Task record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Task record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/task/{uuid}.json": { "get": { "tags": [ "Tasks" ], "operationId": "getTasks", "summary": "Retrieve a Task", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_tasks**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_tasks" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Task", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Task record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Task" }, "examples": { "success": { "value": { "due_date": "YYYY-MM-DD", "task_details": "string", "name": "string", "related_object": "string", "related_object_uuid": "123e4567-d0d7-481b-88d3-23f9475ce44b", "task_complete": "string", "completed_timestamp": "2026-03-01 12:00:00", "completed_by_staff_uuid": "123e4567-39cf-450e-bfeb-23f9432e412b", "assigned_to_staff_uuid": "123e4567-50db-4325-b57c-23f94f883f8b", "lng": "string", "lat": "string", "uuid": "123e4567-da9c-4420-b199-23f944b02eab", "active": 1, "edit_date": "2026-03-01 12:00:00", "created_by_staff_uuid": "123e4567-39dc-4bed-9f49-23f94c38146b", "create_date": "2026-03-01 12:00:00" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Tasks" ], "operationId": "updateTasks", "summary": "Update a Task", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_tasks**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_tasks" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Task", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Task fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Tasks" ], "operationId": "deleteTasks", "summary": "Delete a Task", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_tasks**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_tasks" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Task", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Task successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/taxrate.json": { "get": { "tags": [ "Tax Rates" ], "operationId": "listTaxRates", "summary": "List all Tax Rates", "description": "\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_tax_rates**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_tax_rates" ] } ], "responses": { "200": { "description": "An array of Tax Rates", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TaxRate" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-ae81-43f6-9950-23f94fa9a1ab", "active": 1, "edit_date": "2026-03-01 12:00:00", "name": "string", "amount": "string", "is_default_tax_rate": "string" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Tax Rates" ], "operationId": "createTaxRates", "summary": "Create a new Tax Rate", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_tax_rates**.\n\n\t\t\t\n\t\t\t\n#### Record UUID\nUUID 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.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_tax_rates" ] } ], "parameters": [], "requestBody": { "description": "Tax Rate record to create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaxRateCreate" } } } }, "responses": { "200": { "headers": { "x-record-uuid": { "description": "UUID of newly created Tax Rate record", "schema": { "type": "string", "format": "uuid" } } }, "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to create this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/taxrate/{uuid}.json": { "get": { "tags": [ "Tax Rates" ], "operationId": "getTaxRates", "summary": "Retrieve a Tax Rate", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **read_tax_rates**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "read_tax_rates" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Tax Rate", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Tax Rate record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaxRate" }, "examples": { "success": { "value": { "uuid": "123e4567-d849-401e-9494-23f946f784fb", "active": 1, "edit_date": "2026-03-01 12:00:00", "name": "string", "amount": "string", "is_default_tax_rate": "string" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "post": { "tags": [ "Tax Rates" ], "operationId": "updateTaxRates", "summary": "Update a Tax Rate", "description": "\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_tax_rates**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_tax_rates" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Tax Rate", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Tax Rate fields to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaxRateCreate" } } } }, "responses": { "200": { "description": "Success - The record was updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to update this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to update does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } }, "delete": { "tags": [ "Tax Rates" ], "operationId": "deleteTaxRates", "summary": "Delete a Tax Rate", "description": "\n\t\t\t\nIn ServiceM8, deleting a record sets its `active` field to `0`. Inactive records are still accessible on the API, but are hidden in the UI. Inactive records can be restored by setting their `active` field to `1`.\n\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **manage_tax_rates**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "manage_tax_rates" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Tax Rate", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Tax Rate successfully archived (soft deleted)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Result" }, "examples": { "success": { "value": { "errorCode": "0", "message": "OK" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to delete this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The record to delete does not exist or has already been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/vendor.json": { "get": { "tags": [ "Vendors" ], "operationId": "listVendors", "summary": "List all Vendors", "description": "Vendor account information\n\n\n\t\t\t\n#### Filtering\nThis endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).\n\t\t\t\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **vendor**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "vendor" ] } ], "responses": { "200": { "description": "An array of Vendors", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Vendor" } }, "examples": { "success": { "value": [ { "uuid": "123e4567-ab4c-453d-8a4e-23f9435d970b", "active": 1, "edit_date": "2026-03-01 12:00:00", "name": "string", "abn_number": "string", "business_number": "string", "website": "string", "email": "string", "email_accounts": "string", "billing_address": "string", "accepted_payment_methods": "string", "default_region": "string", "currency": "string", "opening_time_monday": "string", "closing_time_monday": "string", "opening_time_tuesday": "string", "closing_time_tuesday": "string", "opening_time_wednesday": "string", "closing_time_wednesday": "string", "opening_time_thursday": "string", "closing_time_thursday": "string", "opening_time_friday": "string", "closing_time_friday": "string", "opening_time_saturday": "string", "closing_time_saturday": "string", "opening_time_sunday": "string", "closing_time_sunday": "string", "timezone_name": "string", "invoice_terms": "string", "job_default_status": "string" } ] } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/vendor/{uuid}.json": { "get": { "tags": [ "Vendors" ], "operationId": "getVendors", "summary": "Retrieve a Vendor", "description": "Vendor account information\n\n\n\t\t\t\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **vendor**.\n\n\t\t\t", "security": [ { "apiKey": [] }, { "oauth2": [ "vendor" ] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "UUID of the Vendor", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Vendor record retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Vendor" }, "examples": { "success": { "value": { "uuid": "123e4567-08f3-4768-85d5-23f94a6fe46b", "active": 1, "edit_date": "2026-03-01 12:00:00", "name": "string", "abn_number": "string", "business_number": "string", "website": "string", "email": "string", "email_accounts": "string", "billing_address": "string", "accepted_payment_methods": "string", "default_region": "string", "currency": "string", "opening_time_monday": "string", "closing_time_monday": "string", "opening_time_tuesday": "string", "closing_time_tuesday": "string", "opening_time_wednesday": "string", "closing_time_wednesday": "string", "opening_time_thursday": "string", "closing_time_thursday": "string", "opening_time_friday": "string", "closing_time_friday": "string", "opening_time_saturday": "string", "closing_time_saturday": "string", "opening_time_sunday": "string", "closing_time_sunday": "string", "timezone_name": "string", "invoice_terms": "string", "job_default_status": "string" } } } } } }, "400": { "description": "Bad Request - The request is malformed or contains invalid parameters", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "badRequest": { "value": { "errorCode": "1000", "message": "An error occurred completing your request" } } } } } }, "401": { "description": "Unauthorized - Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationError" }, "examples": { "unauthorized": { "value": { "errorCode": "401", "message": "Authentication failed. Please check your API key or OAuth token." } } } } } }, "403": { "description": "Forbidden - You don't have permission to access this resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" }, "examples": { "forbidden": { "value": { "errorCode": "403", "message": "Access forbidden. You don't have permission to access this resource." } } } } } }, "404": { "description": "Not Found - The requested record does not exist or has been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" }, "examples": { "notFound": { "value": { "errorCode": "404", "message": "Resource not found. The requested record does not exist or has been deleted." } } } } } }, "429": { "description": "Too Many Requests - You have exceeded the rate limit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateLimitError" }, "examples": { "rateLimitMinute": { "value": { "errorCode": 429, "message": "Number of allowed API requests per minute exceeded" } }, "rateLimitDay": { "value": { "errorCode": 429, "message": "Number of allowed API requests per day exceeded" } } } } } }, "500": { "description": "Internal Server Error - An unexpected error occurred on the server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "value": { "errorCode": 500, "message": "An unexpected error occurred. Please try again later." } } } } } } } } }, "/inboxmessage/{uuid}/read.json": { "put": { "tags": [ "Inbox" ], "operationId": "markInboxMessageAsRead", "summary": "Mark message as read", "description": "Marks an inbox message as read", "security": [ { "apiKey": [] }, { "oauth2": [ "publish_inbox" ] } ], "parameters": [ { "name": "uuid", "in": "path", "required": true, "description": "UUID of the inbox message", "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Message marked as read", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } }, "404": { "description": "Message not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/inboxmessage/{uuid}/archive.json": { "put": { "tags": [ "Inbox" ], "operationId": "archiveInboxMessage", "summary": "Archive or unarchive message", "description": "Archives or unarchives an inbox message", "security": [ { "apiKey": [] }, { "oauth2": [ "publish_inbox" ] } ], "parameters": [ { "name": "uuid", "in": "path", "required": true, "description": "UUID of the inbox message", "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ArchiveRequest" } } } }, "responses": { "200": { "description": "Message archived/unarchived", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } } } }, "/inboxmessage/{uuid}/snooze.json": { "put": { "tags": [ "Inbox" ], "operationId": "snoozeInboxMessage", "summary": "Snooze or unsnooze message", "description": "Snoozes a message until a specified date/time or unsnoozes it", "security": [ { "apiKey": [] }, { "oauth2": [ "publish_inbox" ] } ], "parameters": [ { "name": "uuid", "in": "path", "required": true, "description": "UUID of the inbox message", "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SnoozeRequest" } } } }, "responses": { "200": { "description": "Message snoozed/unsnoozed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } }, "400": { "description": "Bad request - Invalid snooze date", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/inboxmessage/{uuid}/convert-to-job.json": { "post": { "tags": [ "Inbox" ], "operationId": "convertInboxMessageToJob", "summary": "Convert message to job", "description": "Converts an inbox message into a new job, optionally using a job template", "security": [ { "apiKey": [] }, { "oauth2": [ "publish_inbox" ] } ], "parameters": [ { "name": "uuid", "in": "path", "required": true, "description": "UUID of the inbox message", "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Parameters for converting the inbox message into a job (send an empty object to accept defaults)", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConvertToJobRequest" } } } }, "responses": { "201": { "description": "Job created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConvertToJobResponse" } } } } } } }, "/inboxmessage/{uuid}/attach-to-job.json": { "post": { "tags": [ "Inbox" ], "operationId": "attachInboxMessageToJob", "summary": "Attach message to existing job", "description": "Attaches an inbox message to an existing job", "security": [ { "apiKey": [] }, { "oauth2": [ "publish_inbox" ] } ], "parameters": [ { "name": "uuid", "in": "path", "required": true, "description": "UUID of the inbox message", "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AttachToJobRequest" } } } }, "responses": { "200": { "description": "Message attached to job", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AttachToJobResponse" } } } }, "404": { "description": "Job not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/inboxmessage/{uuid}/notes.json": { "post": { "tags": [ "Inbox" ], "operationId": "addNoteToInboxMessage", "summary": "Add note to message", "description": "Adds a note to an inbox message", "security": [ { "apiKey": [] }, { "oauth2": [ "publish_inbox" ] } ], "parameters": [ { "name": "uuid", "in": "path", "required": true, "description": "UUID of the inbox message", "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddNoteRequest" } } } }, "responses": { "201": { "description": "Note added successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } }, "400": { "description": "Bad request - Empty note", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/jobtemplate/{uuid}/job.json": { "post": { "tags": [ "Job Templates" ], "operationId": "createJobFromTemplate", "summary": "Create a job from a template", "description": "Creates a new job by cloning an existing job template. All template entities (tasks, materials, checklists, quotes, custom fields) are cloned to the new job.\n\n#### Field Overrides\nOnly the following fields can be overridden when creating a job from a template:\n- `job_description` - Job description\n- `company_uuid` - UUID of the company/client\n- `company_name` - Name of the company/client (will lookup existing or create new)\n- `job_address` - Street address for the job\n\n**Note:** You cannot specify both `company_uuid` and `company_name`. If `company_name` is provided, the system will first search for an existing company with that name. If found, it will use that company's UUID. If not found, a new company will be created.\n\nAny other fields in the request body will be ignored.\n\n#### OAuth Scope\nThis endpoint requires the following OAuth scope **create_jobs**.", "security": [ { "apiKey": [] }, { "oauth2": [ "create_jobs" ] } ], "parameters": [ { "name": "uuid", "in": "path", "required": true, "description": "UUID of the job template to clone from", "schema": { "type": "string", "format": "uuid" }, "example": "550e8400-e29b-41d4-a716-446655440000" } ], "requestBody": { "description": "Field overrides for the new job (send an empty object to use template defaults)", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobTemplateOverrides" }, "examples": { "minimal": { "summary": "Minimal override example", "value": { "company_uuid": "550e8400-e29b-41d4-a716-446655440001" } }, "companyName": { "summary": "Using company name", "value": { "company_name": "ACME Corporation", "job_address": "456 Oak Avenue" } }, "full": { "summary": "All allowed overrides with UUID", "value": { "job_description": "Annual HVAC maintenance", "company_uuid": "550e8400-e29b-41d4-a716-446655440001", "job_address": "123 Main Street" } } } } } }, "responses": { "201": { "description": "Job created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "jobUUID": { "type": "string", "format": "uuid", "description": "UUID of the created job" }, "location": { "type": "string", "description": "API path to the created job resource" }, "message": { "type": "string", "description": "Success message" } }, "required": [ "jobUUID", "location", "message" ] }, "examples": { "success": { "summary": "Successful job creation", "value": { "jobUUID": "550e8400-e29b-41d4-a716-446655440003", "location": "/api_1.0/job/550e8400-e29b-41d4-a716-446655440003.json", "message": "Job created successfully" } } } } } }, "400": { "description": "Bad request - Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "invalidUUID": { "summary": "Invalid UUID format", "value": { "errorCode": 400, "message": "Invalid job template UUID format" } }, "invalidJSON": { "summary": "Invalid JSON in request body", "value": { "errorCode": 400, "message": "Invalid JSON in request body" } }, "bothCompanyFields": { "summary": "Both company_uuid and company_name provided", "value": { "errorCode": 400, "message": "Cannot specify both company_uuid and company_name. Please provide only one." } } } } } }, "403": { "description": "Forbidden - Missing required OAuth scope", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "forbidden": { "summary": "Missing OAuth scope", "value": { "errorCode": 403, "message": "OAuth token missing required scope: create_jobs" } } } } } }, "404": { "description": "Not Found - Template UUID not found or inactive", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "notFound": { "summary": "Template not found", "value": { "errorCode": 404, "message": "Job template not found" } } } } } }, "405": { "description": "Method Not Allowed", "headers": { "Allow": { "description": "Allowed HTTP methods", "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "methodNotAllowed": { "summary": "Wrong HTTP method", "value": { "errorCode": 405, "message": "Method not allowed. Use POST to create a job from template." } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "examples": { "serverError": { "summary": "Internal server error", "value": { "errorCode": 500, "message": "Failed to create job from template" } } } } } } } } }, "/search.json": { "get": { "tags": [ "Search" ], "operationId": "generalSearch", "summary": "Search across multiple object types", "description": "Performs a text search across jobs, companies, and materials. Returns combined results sorted by relevance.", "parameters": [ { "name": "q", "in": "query", "required": true, "description": "Search query string", "schema": { "type": "string", "minLength": 1, "maxLength": 100, "example": "plumbing repair" } }, { "name": "limit", "in": "query", "required": false, "description": "Maximum number of results to return (max 50)", "schema": { "type": "integer", "minimum": 1, "maximum": 50, "default": 20 } } ], "responses": { "200": { "description": "Search results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchResponse" } } } }, "400": { "description": "Bad request - Missing query parameter", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/search/{objectType}.json": { "get": { "tags": [ "Search" ], "operationId": "objectSearch", "summary": "Search within a specific object type", "description": "Performs a text search within a specific object type. Supported types: job, company, material, knowledgearticle, attachment, formresponse, asset, materialbundle", "parameters": [ { "name": "objectType", "in": "path", "required": true, "description": "Type of object to search", "schema": { "type": "string", "enum": [ "job", "company", "material", "knowledgearticle", "attachment", "formresponse", "asset", "materialbundle" ] } }, { "name": "q", "in": "query", "required": true, "description": "Search query string", "schema": { "type": "string", "minLength": 1, "maxLength": 100, "example": "emergency repair" } }, { "name": "limit", "in": "query", "required": false, "description": "Maximum number of results to return (max 100)", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 50 } } ], "responses": { "200": { "description": "Search results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectSearchResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Too many requests - Search throttled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/search/job/embedding.json": { "get": { "tags": [ "Search" ], "operationId": "jobEmbeddingSearch", "summary": "Semantic search for jobs", "description": "Harness the power of advanced AI embeddings to revolutionise how you search through job data. This endpoint transforms your search query into high-dimensional vector embeddings, then intelligently matches it against our entire job database using semantic similarity algorithms.\n\nHow it works:\n1. AI Query Understanding - Your search terms are processed through neural embedding models that understand context, intent, and meaning\n2. Vector-Based Matching - The system compares your query against vector representations of all job content in real-time\n3. Intelligent Ranking - Returns results ranked by semantic similarity, not just keyword matching\n\nWhy this matters:\n- Find jobs about \"plumbing repairs\" even when searching for \"fixing pipes\"\n- Discover relevant work orders that use different terminology but share the same intent\n- Uncover hidden patterns and connections in your job data that traditional search would miss\n\nThis isn't just search\u2014it's AI that truly understands what you're looking for and delivers the most relevant results, even when the exact words don't match.", "parameters": [ { "name": "q", "in": "query", "required": true, "description": "Search query string", "schema": { "type": "string", "minLength": 1, "example": "replace hot water system" } }, { "name": "limit", "in": "query", "required": false, "description": "Maximum number of results to return (max 50)", "schema": { "type": "integer", "minimum": 1, "maximum": 50, "default": 10 } }, { "name": "similarity_threshold", "in": "query", "required": false, "description": "Minimum similarity score (0.0 to 1.0)", "schema": { "type": "number", "format": "float", "minimum": 0, "maximum": 1, "default": 0.7 } } ], "responses": { "200": { "description": "Embedding search results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmbeddingSearchResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "503": { "description": "Service unavailable - Embedding search not available", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } } }, "components": { "securitySchemes": { "apiKey": { "type": "apiKey", "name": "X-Api-Key", "in": "header" }, "oauth2": { "type": "oauth2", "flows": { "authorizationCode": { "authorizationUrl": "https://api.servicem8.com/oauth/authorize", "tokenUrl": "https://api.servicem8.com/oauth/access_token", "scopes": { "staff_locations": "Access to real-time GPS information about staff", "staff_activity": "Access to clock on, lunch break and clock off information about staff", "publish_sms": "Access to send SMS messages to customers and/or staff on your behalf. Note sending SMS messages will incur account charges.", "publish_email": "Access to send Email messages to customers and/or staff on your behalf", "vendor": "Access to basic account information", "vendor_logo": "Access to account logo", "vendor_email": "Access to account holder email address", "read_locations": "Read-only access to Location Endpoint", "manage_locations": "Full access to Location Endpoint", "read_staff": "Read-only access to Staff Endpoint", "manage_staff": "Full access to Staff Endpoint", "read_customers": "Read-only access to Company Endpoint", "manage_customers": "Full access to Company Endpoint", "read_customer_contacts": "Read-only access to CompanyContact Endpoint", "manage_customer_contacts": "Full access to CompanyContact Endpoint", "read_jobs": "Read-only access to Job Endpoint", "manage_jobs": "Full access to Job Endpoint", "create_jobs": "Ability to create jobs on behalf of account. Note creating jobs may incur account charges.", "read_job_contacts": "Read-only access to JobContact Endpoint", "manage_job_contacts": "Full access to JobContact Endpoint", "read_job_materials": "Read-only access to JobMaterials Endpoint", "manage_job_materials": "Full access to JobMaterials Endpoint", "read_job_categories": "Read-only access to Categories Endpoint", "manage_job_categories": "Full access to Categories Endpoint", "read_job_queues": "Read-only access to Job Queues Endpoint", "manage_job_queues": "Full access to Job Queues Endpoint", "read_tasks": "Read-only access to Tasks Endpoint", "manage_tasks": "Full access to Tasks Endpoint", "read_schedule": "Read-only access to JobActivity Endpoint", "manage_schedule": "Full access to JobActivity Endpoint", "read_inventory": "Read-only access to Materials Endpoint", "manage_inventory": "Full access to Materials Endpoint", "read_job_notes": "Read-only access to job notes", "publish_job_notes": "Ability to add new job notes", "read_job_photos": "Read-only access to job photos", "publish_job_photos": "Ability to add new job photos", "read_attachments": "Read-only access to Attachments Endpoint", "manage_attachments": "Full access to Attachments Endpoint", "read_inbox": "Read-only access to inbox messages", "read_messages": "Read-only access to staff messages", "manage_notifications": "Ability to read notifications and mark as read", "manage_templates": "Full-access to email, sms and document templates", "manage_badges": "Full-access to create/modify job badges", "read_assets": "Read-only access to Assets Endpoint", "manage_assets": "Full access to Assets Endpoint", "read_knowledge_base": "Read-only access to Knowledge Base Endpoint", "manage_knowledge_base": "Full access to Knowledge Base Endpoint" } } } } }, "schemas": { "WebhookEvent": { "type": "object", "required": [ "event_type", "timestamp", "data" ], "properties": { "event_type": { "type": "string", "pattern": "^[a-z]+\\.[a-z]+$", "description": "Type of event (e.g., job.created, company.updated)", "example": "job.updated" }, "timestamp": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp of when the event occurred" }, "data": { "type": "object", "description": "Event-specific payload containing the affected resource" }, "metadata": { "type": "object", "properties": { "attempt": { "type": "integer", "minimum": 1, "description": "Delivery attempt number" }, "signature": { "type": "string", "description": "HMAC-SHA256 signature for webhook verification" } } } } }, "Result": { "type": "object", "properties": { "errorCode": { "type": "number", "format": "int32", "example": "0" }, "message": { "type": "string", "example": "OK" } } }, "Error": { "type": "object", "properties": { "errorCode": { "type": "number", "format": "int32", "example": "1000" }, "message": { "type": "string", "example": "An error occurred completing your request" } } }, "RateLimitError": { "type": "object", "properties": { "errorCode": { "type": "number", "format": "int32", "example": "429" }, "message": { "type": "string", "example": "Number of allowed API requests per minute exceeded" } } }, "AuthenticationError": { "type": "object", "properties": { "errorCode": { "type": "number", "format": "int32", "example": "401" }, "message": { "type": "string", "example": "Authentication failed. Please check your API key or OAuth token." } } }, "ForbiddenError": { "type": "object", "properties": { "errorCode": { "type": "number", "format": "int32", "example": "403" }, "message": { "type": "string", "example": "Access forbidden. You don't have permission to access this resource." } } }, "NotFoundError": { "type": "object", "properties": { "errorCode": { "type": "number", "format": "int32", "example": "404" }, "message": { "type": "string", "example": "Resource not found. The requested record does not exist or has been deleted." } } }, "AllocationWindow": { "type": "object", "properties": { "name": { "description": "Name of the allocation window that defines a time period for job scheduling. Common examples include 'Morning', 'Afternoon', 'Business Hours', etc.", "type": "string" }, "start_time": { "description": "Start time of the allocation window measured in minutes from midnight. For example, 800 AM would be represented as 480 (8 hours \u00d7 60 minutes).", "type": "integer" }, "end_time": { "description": "End time of the allocation window measured in minutes from midnight. For example, 1700 (500 PM) would be represented as 1020 (17 hours \u00d7 60 minutes).", "type": "integer" }, "sort_priority": { "description": "Numeric value determining the display order of allocation windows. Lower values indicate higher priority. System automatically sets this to match the start_time in minutes, unless it's an urgent priority window which gets priority 0.", "type": "integer" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-0e95-4b62-8e05-23f940bec93b", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" } } }, "AllocationWindowCreate": { "type": "object", "properties": { "name": { "description": "Name of the allocation window that defines a time period for job scheduling. Common examples include 'Morning', 'Afternoon', 'Business Hours', etc.", "type": "string" }, "start_time": { "description": "Start time of the allocation window measured in minutes from midnight. For example, 800 AM would be represented as 480 (8 hours \u00d7 60 minutes).", "type": "integer" }, "end_time": { "description": "End time of the allocation window measured in minutes from midnight. For example, 1700 (500 PM) would be represented as 1020 (17 hours \u00d7 60 minutes).", "type": "integer" }, "sort_priority": { "description": "Numeric value determining the display order of allocation windows. Lower values indicate higher priority. System automatically sets this to match the start_time in minutes, unless it's an urgent priority window which gets priority 0.", "type": "integer" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-5d20-4363-b9b0-23f9435ce9eb", "type": "string" } } }, "Asset": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-dd5e-4b3d-a4bd-23f94042120b", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "company_uuid": { "format": "uuid", "example": "123e4567-6ac6-439b-a3f3-23f94a0de2ab", "type": "string", "description": "UUID of the Client to which this Asset is attached" }, "asset_code": { "type": "string", "description": "The unique code printed on this Asset's attached label (read only)" }, "asset_type_uuid": { "format": "uuid", "example": "123e4567-c5b4-4a6e-ad3e-23f9440b9bfb", "type": "string", "description": "UUID of an Asset Type which defines the fields that can be stored for this Asset (read only)" }, "name": { "type": "string", "description": "User-facing description of this asset", "maxLength": 100 }, "lat": { "type": "number", "format": "float", "description": "Latitude component of the Asset's location in degrees" }, "lng": { "type": "number", "format": "float", "description": "Longitude component of the Asset's location in degrees" }, "geo_timestamp": { "example": "2026-03-01 12:00:00", "type": "string", "description": "Timestamp at which the Asset's location was last updated" }, "altitude": { "type": "number", "description": "Altitude component of the Asset's location in metres" }, "field_data": { "type": "array", "description": "JSON array containing field values for this asset. Each entry represents a field value defined by the associated AssetType, with field values stored as strings. Date fields use Y-m-d format. This field stores all custom fields defined in the asset type template.", "items": { "type": "object", "properties": { "uuid": { "type": "string", "format": "uuid", "description": "Must be the UUID of an AssetTypeField" }, "fieldType": { "type": "string" }, "fieldName": { "type": "string" }, "fieldValue": { "type": "string", "description": "Convert all values to string. Dates shall be in Y-m-d format." }, "sortOrder": { "type": "number" } }, "required": [ "uuid", "fieldType", "fieldName", "fieldValue", "sortOrder" ] } } } }, "AssetCreate": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-18c8-451f-879d-23f9421d865b", "type": "string" }, "company_uuid": { "format": "uuid", "example": "123e4567-fbc9-4ae2-b9d1-23f9463186cb", "type": "string", "description": "UUID of the Client to which this Asset is attached" }, "name": { "type": "string", "description": "User-facing description of this asset", "maxLength": 100 }, "lat": { "type": "number", "format": "float", "description": "Latitude component of the Asset's location in degrees" }, "lng": { "type": "number", "format": "float", "description": "Longitude component of the Asset's location in degrees" }, "geo_timestamp": { "example": "2026-03-01 12:00:00", "type": "string", "description": "Timestamp at which the Asset's location was last updated" }, "altitude": { "type": "number", "description": "Altitude component of the Asset's location in metres" }, "field_data": { "type": "array", "description": "JSON array containing field values for this asset. Each entry represents a field value defined by the associated AssetType, with field values stored as strings. Date fields use Y-m-d format. This field stores all custom fields defined in the asset type template.", "items": { "type": "object", "properties": { "uuid": { "type": "string", "format": "uuid", "description": "Must be the UUID of an AssetTypeField" }, "fieldType": { "type": "string" }, "fieldName": { "type": "string" }, "fieldValue": { "type": "string", "description": "Convert all values to string. Dates shall be in Y-m-d format." }, "sortOrder": { "type": "number" } }, "required": [ "uuid", "fieldType", "fieldName", "fieldValue", "sortOrder" ] } } } }, "AssetType": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-d28b-4cc7-90d6-23f9485b547b", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "name": { "type": "string", "description": "The name of the asset type. Used to identify different categories of assets that can be tracked in the system. Examples might include 'Air Conditioner', 'Fire Extinguisher', etc." } } }, "AssetTypeCreate": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-4fc3-41d5-aea5-23f943d98e7b", "type": "string" }, "name": { "type": "string", "description": "The name of the asset type. Used to identify different categories of assets that can be tracked in the system. Examples might include 'Air Conditioner', 'Fire Extinguisher', etc." } } }, "AssetTypeField": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-ff25-4a82-9900-23f94875824b", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "asset_type_uuid": { "format": "uuid", "example": "123e4567-28a8-46a8-bd6d-23f94008cd8b", "type": "string", "description": "UUID of the Asset Type to which this field belongs. This field is read-only in the API. (Read only)" }, "name": { "type": "string", "description": "Name of the field that will be displayed to users. Used as a label for the input field when managing assets." }, "field_data": { "type": "object", "description": "Configuration data for the field", "properties": { "fieldType": { "type": "string", "enum": [ "Text", "Number", "Date", "Multiple Choice" ] }, "mandatory": { "type": "boolean" }, "choices": { "type": "array", "items": { "type": "string" } } }, "required": [ "fieldType", "mandatory" ] }, "sort_order": { "type": "integer", "description": "The order in which this field should be displayed relative to other fields of the same asset type. Lower values display first." } }, "required": [ "name" ] }, "AssetTypeFieldCreate": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-a9fb-4d48-8948-23f946570d0b", "type": "string" }, "name": { "type": "string", "description": "Name of the field that will be displayed to users. Used as a label for the input field when managing assets." }, "field_data": { "type": "object", "description": "Configuration data for the field", "properties": { "fieldType": { "type": "string", "enum": [ "Text", "Number", "Date", "Multiple Choice" ] }, "mandatory": { "type": "boolean" }, "choices": { "type": "array", "items": { "type": "string" } } }, "required": [ "fieldType", "mandatory" ] }, "sort_order": { "type": "integer", "description": "The order in which this field should be displayed relative to other fields of the same asset type. Lower values display first." } }, "required": [ "name" ] }, "Attachment": { "type": "object", "properties": { "related_object": { "description": "The type of object this attachment is related to (e.g., 'job', 'company', 'staff'). Must be a valid object type. Always stored in lowercase.", "type": "string" }, "related_object_uuid": { "description": "UUID of the related object to which this attachment belongs. Must be a valid UUID of an existing object of the type specified in the related_object field.", "format": "uuid", "example": "123e4567-7343-4758-a0fd-23f94719e43b", "type": "string" }, "attachment_name": { "description": "The security roles description", "type": "string", "maxLength": 127 }, "file_type": { "description": "Location's name", "type": "string", "maxLength": 50 }, "attachment_source": { "description": "Indicates the source or type of the attachment (e.g., 'INVOICE', 'QUOTE'). Used for filtering and determining how to display the attachment.", "type": "string" }, "tags": { "description": "Comma-separated list of tags associated with the attachment. Used for categorization and filtering of attachments.", "type": "string" }, "lng": { "description": "Longitude coordinate where the attachment was created. Used for geolocation of photos and other attachments. Decimal degrees format.", "type": "number", "format": "float" }, "lat": { "description": "Latitude coordinate where the attachment was created. Used for geolocation of photos and other attachments. Decimal degrees format.", "type": "number", "format": "float" }, "photo_width": { "description": "Width of the image in pixels. Only applicable for image attachments. Read-only in the API.", "type": "string" }, "photo_height": { "description": "Height of the image in pixels. Only applicable for image attachments. Read-only in the API.", "type": "string" }, "extracted_info": { "description": "Additional information extracted from the file, such as form responses or OCR text. Read-only in the API.", "type": "string" }, "is_favourite": { "description": "Flag indicating whether this attachment has been marked as a favorite. Used for filtering and displaying attachments.", "type": "string" }, "class_name": { "description": "The specific class type of the attachment. Used for specialized attachment types that extend the base dboAttachment class. Read-only in the API." }, "metadata": { "description": "Additional structured data associated with the attachment in JSON format. The schema varies depending on attachment type and source. Used to store extended information that doesn't fit into standard fields.", "type": "string" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-e2fc-4c05-9df6-23f941aa61bb", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "created_by_staff_uuid": { "format": "uuid", "example": "123e4567-80c8-4c71-96c5-23f944267c1b", "type": "string" }, "timestamp": { "type": "string" } } }, "AttachmentCreate": { "type": "object", "properties": { "related_object": { "description": "The type of object this attachment is related to (e.g., 'job', 'company', 'staff'). Must be a valid object type. Always stored in lowercase.", "type": "string" }, "related_object_uuid": { "description": "UUID of the related object to which this attachment belongs. Must be a valid UUID of an existing object of the type specified in the related_object field.", "format": "uuid", "example": "123e4567-e2d6-438c-b5fd-23f94d0b0a5b", "type": "string" }, "attachment_name": { "description": "The security roles description", "type": "string", "maxLength": 127 }, "file_type": { "description": "Location's name", "type": "string", "maxLength": 50 }, "attachment_source": { "description": "Indicates the source or type of the attachment (e.g., 'INVOICE', 'QUOTE'). Used for filtering and determining how to display the attachment.", "type": "string" }, "tags": { "description": "Comma-separated list of tags associated with the attachment. Used for categorization and filtering of attachments.", "type": "string" }, "lng": { "description": "Longitude coordinate where the attachment was created. Used for geolocation of photos and other attachments. Decimal degrees format.", "type": "number", "format": "float" }, "lat": { "description": "Latitude coordinate where the attachment was created. Used for geolocation of photos and other attachments. Decimal degrees format.", "type": "number", "format": "float" }, "photo_width": { "description": "Width of the image in pixels. Only applicable for image attachments. Read-only in the API.", "type": "string" }, "photo_height": { "description": "Height of the image in pixels. Only applicable for image attachments. Read-only in the API.", "type": "string" }, "extracted_info": { "description": "Additional information extracted from the file, such as form responses or OCR text. Read-only in the API.", "type": "string" }, "is_favourite": { "description": "Flag indicating whether this attachment has been marked as a favorite. Used for filtering and displaying attachments.", "type": "string" }, "class_name": { "description": "The specific class type of the attachment. Used for specialized attachment types that extend the base dboAttachment class. Read-only in the API." }, "metadata": { "description": "Additional structured data associated with the attachment in JSON format. The schema varies depending on attachment type and source. Used to store extended information that doesn't fit into standard fields.", "type": "string" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-0a17-4196-9697-23f94950984b", "type": "string" }, "created_by_staff_uuid": { "format": "uuid", "example": "123e4567-0a69-4b5b-9b47-23f94973bddb", "type": "string" }, "timestamp": { "type": "string" } } }, "Badge": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-9259-4a43-8a62-23f947f6e74b", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "name": { "type": "string", "description": "The display name of the badge. Used to identify the badge in the system. Examples include 'Warranty', 'VIP', 'Take Payment Facilities', etc.", "maxLength": 50 }, "automatically_allocated": { "type": "string" }, "file_name": { "type": "string" }, "regarding_form_uuid": { "format": "uuid", "example": "123e4567-31b4-475f-8328-23f94ee2d83b", "type": "string" }, "regarding_asset_type_uuid": { "format": "uuid", "example": "123e4567-f401-47d3-8ab9-23f94645b98b", "type": "string", "description": "UUID of the asset type that this badge is associated with. Only applicable for asset-based badges. When set, the badge represents a specific asset type in the system and will appear on assets of this type." } }, "required": [ "name" ] }, "BadgeCreate": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-fe09-41de-b7d5-23f946b700cb", "type": "string" }, "name": { "type": "string", "description": "The display name of the badge. Used to identify the badge in the system. Examples include 'Warranty', 'VIP', 'Take Payment Facilities', etc.", "maxLength": 50 }, "automatically_allocated": { "type": "string" }, "file_name": { "type": "string" }, "regarding_form_uuid": { "format": "uuid", "example": "123e4567-4b68-437d-98c2-23f94cecbf3b", "type": "string" }, "regarding_asset_type_uuid": { "format": "uuid", "example": "123e4567-6dcd-492c-8c70-23f9414984cb", "type": "string", "description": "UUID of the asset type that this badge is associated with. Only applicable for asset-based badges. When set, the badge represents a specific asset type in the system and will appear on assets of this type." } }, "required": [ "name" ] }, "Category": { "type": "object", "properties": { "name": { "description": "The name of the job category. Used to classify and organize jobs.", "type": "string" }, "colour": { "description": "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).", "type": "string" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-547e-44c9-8b76-23f94eae51bb", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" } }, "required": [ "name" ] }, "CategoryCreate": { "type": "object", "properties": { "name": { "description": "The name of the job category. Used to classify and organize jobs.", "type": "string" }, "colour": { "description": "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).", "type": "string" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-571a-4e0f-95c8-23f948619b8b", "type": "string" } }, "required": [ "name" ] }, "Company": { "type": "object", "properties": { "name": { "description": "Company Name", "type": "string", "maxLength": 100 }, "abn_number": { "description": "Australian Business Number. A unique 11-digit identifier issued by the Australian Taxation Office to businesses. Required for tax compliance and validation of business identity in Australia.", "type": "string" }, "address": { "description": "Password", "type": "string", "maxLength": 500 }, "billing_address": { "description": "Confirm Password", "type": "string", "maxLength": 500 }, "is_individual": { "description": "Derived flag indicating whether the client is an individual. This value is set automatically based on the company name and contact first/last name, and cannot be set via the API.. Valid values are [0,1]", "readOnly": true, "type": "integer", "enum": [ 0, 1 ] }, "parent_company_uuid": { "description": "If provided, specifies the UUID of this Site's parent Company. If blank, this record is a Head Office rather than a Site. This field is only present on ServiceM8 Accounts with the Company Sites addon activated." }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-d900-4b77-9a4a-23f943cc1dcb", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "website": { "type": "string" }, "address_street": { "type": "string", "maxLength": 500 }, "address_city": { "type": "string" }, "address_state": { "type": "string" }, "address_postcode": { "type": "string" }, "address_country": { "type": "string" }, "fax_number": { "type": "string" }, "badges": { "type": "string", "description": "JSON Array of Badge UUIDs" }, "tax_rate_uuid": { "format": "uuid", "example": "123e4567-f71c-4478-8120-23f9441f6b2b", "type": "string" }, "billing_attention": { "type": "string" }, "payment_terms": { "type": "string" } }, "required": [ "name" ] }, "CompanyCreate": { "type": "object", "properties": { "name": { "description": "Company Name", "type": "string", "maxLength": 100 }, "abn_number": { "description": "Australian Business Number. A unique 11-digit identifier issued by the Australian Taxation Office to businesses. Required for tax compliance and validation of business identity in Australia.", "type": "string" }, "address": { "description": "Password", "type": "string", "maxLength": 500 }, "billing_address": { "description": "Confirm Password", "type": "string", "maxLength": 500 }, "is_individual": { "description": "Derived flag indicating whether the client is an individual. This value is set automatically based on the company name and contact first/last name, and cannot be set via the API.. Valid values are [0,1]", "readOnly": true, "type": "integer", "enum": [ 0, 1 ] }, "parent_company_uuid": { "description": "If provided, specifies the UUID of this Site's parent Company. If blank, this record is a Head Office rather than a Site. This field is only present on ServiceM8 Accounts with the Company Sites addon activated." }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-a3d7-481d-9fd7-23f949ae197b", "type": "string" }, "website": { "type": "string" }, "address_street": { "type": "string", "maxLength": 500 }, "address_city": { "type": "string" }, "address_state": { "type": "string" }, "address_postcode": { "type": "string" }, "address_country": { "type": "string" }, "fax_number": { "type": "string" }, "badges": { "type": "string", "description": "JSON Array of Badge UUIDs" }, "tax_rate_uuid": { "format": "uuid", "example": "123e4567-4eba-4df4-ab52-23f94ef1ad9b", "type": "string" }, "billing_attention": { "type": "string" }, "payment_terms": { "type": "string" } }, "required": [ "name" ] }, "CompanyContact": { "type": "object", "properties": { "company_uuid": { "description": "The UUID of the company this contact belongs to", "format": "uuid", "example": "123e4567-b8f0-4e5d-97c7-23f9457c480b", "type": "string" }, "first": { "description": "First name of the company contact. Used for identifying and addressing the contact in communications.", "type": "string" }, "last": { "description": "Last name of the company contact. Used together with the first name to identify the contact.", "type": "string" }, "phone": { "description": "Primary phone number for the contact. Used for voice communications with the contact. Should include area code and can include international code.", "type": "string" }, "mobile": { "description": "Mobile phone number for the contact. Used for SMS communications and alternative voice contact. Should include area code and can include international code.", "type": "string" }, "email": { "description": "Email address of the contact. Used for sending email communications, quotes, invoices, and other electronic correspondence.", "format": "email", "type": "string" }, "type": { "description": "Specifies the type of contact. Common values include 'BILLING' for billing contacts and 'JOB' for job contacts. This field determines how the contact is used in the system.", "type": "string" }, "is_primary_contact": { "description": "Indicates whether this contact is the primary contact for the company. Value of 1 means this is the primary contact, 0 means it is not. A company should have only one active primary contact.", "type": "string" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-899e-40c5-b9be-23f9485b414b", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" } } }, "CompanyContactCreate": { "type": "object", "properties": { "company_uuid": { "description": "The UUID of the company this contact belongs to", "format": "uuid", "example": "123e4567-02d4-4ed9-a25b-23f9484d2f2b", "type": "string" }, "first": { "description": "First name of the company contact. Used for identifying and addressing the contact in communications.", "type": "string" }, "last": { "description": "Last name of the company contact. Used together with the first name to identify the contact.", "type": "string" }, "phone": { "description": "Primary phone number for the contact. Used for voice communications with the contact. Should include area code and can include international code.", "type": "string" }, "mobile": { "description": "Mobile phone number for the contact. Used for SMS communications and alternative voice contact. Should include area code and can include international code.", "type": "string" }, "email": { "description": "Email address of the contact. Used for sending email communications, quotes, invoices, and other electronic correspondence.", "format": "email", "type": "string" }, "type": { "description": "Specifies the type of contact. Common values include 'BILLING' for billing contacts and 'JOB' for job contacts. This field determines how the contact is used in the system.", "type": "string" }, "is_primary_contact": { "description": "Indicates whether this contact is the primary contact for the company. Value of 1 means this is the primary contact, 0 means it is not. A company should have only one active primary contact.", "type": "string" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-5fd5-4f90-b189-23f943d02b9b", "type": "string" } } }, "DocumentTemplate": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-34d8-4f91-be62-23f94abfa16b", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "template_type": { "type": "string", "description": "(Read only)" }, "related_object": { "type": "string", "description": "(Read only)" }, "name": { "type": "string" } } }, "DocumentTemplateCreate": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-5795-4fa5-9349-23f94a83bcfb", "type": "string" }, "name": { "type": "string" } } }, "EmailTemplate": { "type": "object", "properties": { "name": { "description": "Unique name of the email template. Used to identify and select the template in the system. This field is mandatory and must be unique among all email templates in the account.", "type": "string", "maxLength": 50 }, "subject": { "description": "Subject line for the email template. Supports variable placeholders like {job.job_address} which are replaced with actual values when the email is generated. This field defines what appears in the subject line of emails sent using this template.", "type": "string", "maxLength": 100 }, "message": { "description": "The HTML body content of the email template. Supports rich text formatting and variable placeholders like {job.contact_first}, {document}, {vendor.name}, etc., which are replaced with actual values when the email is generated.", "type": "string", "maxLength": 1000 }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-f090-4cb6-90fb-23f947d68aeb", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" } }, "required": [ "name" ] }, "EmailTemplateCreate": { "type": "object", "properties": { "name": { "description": "Unique name of the email template. Used to identify and select the template in the system. This field is mandatory and must be unique among all email templates in the account.", "type": "string", "maxLength": 50 }, "subject": { "description": "Subject line for the email template. Supports variable placeholders like {job.job_address} which are replaced with actual values when the email is generated. This field defines what appears in the subject line of emails sent using this template.", "type": "string", "maxLength": 100 }, "message": { "description": "The HTML body content of the email template. Supports rich text formatting and variable placeholders like {job.contact_first}, {document}, {vendor.name}, etc., which are replaced with actual values when the email is generated.", "type": "string", "maxLength": 1000 }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-41a3-431c-b04a-23f942440c5b", "type": "string" } }, "required": [ "name" ] }, "Feedback": { "type": "object", "properties": { "timestamp": { "description": "Date and time when the feedback was submitted", "type": "string" }, "related_object": { "description": "Type of object this feedback relates to (usually 'job' or 'vendor')", "type": "string" }, "related_object_uuid": { "description": "UUID of the specific object this feedback is about, corresponding to the object type specified in related_object", "format": "uuid", "example": "123e4567-fcba-4c1e-9618-23f94c5d8b3b", "type": "string" }, "rating": { "description": "Numeric rating value for the feedback, between 1-5 where higher values represent more positive feedback", "type": "string" }, "comment": { "description": "Text comments provided with the feedback", "type": "string" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-edbc-426c-badb-23f942ea821b", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" } } }, "FeedbackCreate": { "type": "object", "properties": { "timestamp": { "description": "Date and time when the feedback was submitted", "type": "string" }, "related_object": { "description": "Type of object this feedback relates to (usually 'job' or 'vendor')", "type": "string" }, "related_object_uuid": { "description": "UUID of the specific object this feedback is about, corresponding to the object type specified in related_object", "format": "uuid", "example": "123e4567-6c6e-4c0e-aa59-23f9417e4cdb", "type": "string" }, "rating": { "description": "Numeric rating value for the feedback, between 1-5 where higher values represent more positive feedback", "type": "string" }, "comment": { "description": "Text comments provided with the feedback", "type": "string" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-edbc-4eb4-bc22-23f942892c9b", "type": "string" } } }, "Form": { "type": "object", "properties": { "name": { "description": "The name of the form. Used to identify the form in the system and displayed to users in the form selector. Must be unique within an account. Maximum length is 255 characters.", "type": "string" }, "document_template_uuid": { "description": "UUID of the document template associated with this form. The template defines the layout and appearance of the form when it's generated as a document. References a document template object in the system.", "format": "uuid", "example": "123e4567-af62-461f-9f8b-23f94590653b", "type": "string" }, "can_be_used_independently": { "description": "Boolean flag indicating whether this form can be used independently of a job. When set to true (1), the form can be filled out as a standalone form. When false (0), the form must be associated with a job to be completed.", "type": "string" }, "badge_mandatory_state": { "description": "Controls when badge completion is mandatory for this form. Valid values are: 0 (not mandatory), 1 (mandatory on check-in), 2 (mandatory on check-out). This determines at which stage in the job lifecycle a staff member must complete this form.", "type": "string" }, "template_fields": { "description": "JSON array of template fields that are used when generating form documents. Each field contains a name, fieldType, value, and sortOrder. Maximum of 10 fields allowed.", "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "fieldType": { "type": "string", "enum": [ "Text" ] }, "value": { "type": "string" }, "sortOrder": { "type": "integer" } }, "required": [ "name", "fieldType", "value", "sortOrder" ] }, "minItems": 0, "maxItems": 10 }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-4ade-4f1f-a380-23f94920ea6b", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "badge_name": { "type": "string", "maxLength": 12 } } }, "FormCreate": { "type": "object", "properties": { "name": { "description": "The name of the form. Used to identify the form in the system and displayed to users in the form selector. Must be unique within an account. Maximum length is 255 characters.", "type": "string" }, "document_template_uuid": { "description": "UUID of the document template associated with this form. The template defines the layout and appearance of the form when it's generated as a document. References a document template object in the system.", "format": "uuid", "example": "123e4567-d046-4b70-a4b1-23f940b4d8bb", "type": "string" }, "can_be_used_independently": { "description": "Boolean flag indicating whether this form can be used independently of a job. When set to true (1), the form can be filled out as a standalone form. When false (0), the form must be associated with a job to be completed.", "type": "string" }, "badge_mandatory_state": { "description": "Controls when badge completion is mandatory for this form. Valid values are: 0 (not mandatory), 1 (mandatory on check-in), 2 (mandatory on check-out). This determines at which stage in the job lifecycle a staff member must complete this form.", "type": "string" }, "template_fields": { "description": "JSON array of template fields that are used when generating form documents. Each field contains a name, fieldType, value, and sortOrder. Maximum of 10 fields allowed.", "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "fieldType": { "type": "string", "enum": [ "Text" ] }, "value": { "type": "string" }, "sortOrder": { "type": "integer" } }, "required": [ "name", "fieldType", "value", "sortOrder" ] }, "minItems": 0, "maxItems": 10 }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-17b5-4ac7-b4e1-23f945950bab", "type": "string" }, "badge_name": { "type": "string", "maxLength": 12 } } }, "FormField": { "type": "object", "properties": { "form_uuid": { "description": "The UUID of the form this field belongs to.", "format": "uuid", "example": "123e4567-196b-4438-afbf-23f94657b72b", "type": "string" }, "name": { "description": "The name of the form field.", "type": "string" }, "field_data_json": { "description": "JSON configuration for this question, including type, mandatory, choices and conditions.", "type": "string" }, "sort_order": { "description": "The sort order of the form field.", "type": "integer" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-6ce7-4e37-bb4b-23f94df46b8b", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" } } }, "FormFieldCreate": { "type": "object", "properties": { "form_uuid": { "description": "The UUID of the form this field belongs to.", "format": "uuid", "example": "123e4567-474c-4bd2-8215-23f946efea8b", "type": "string" }, "name": { "description": "The name of the form field.", "type": "string" }, "field_data_json": { "description": "JSON configuration for this question, including type, mandatory, choices and conditions.", "type": "string" }, "sort_order": { "description": "The sort order of the form field.", "type": "integer" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-dda7-4c78-a49b-23f94ae6855b", "type": "string" } } }, "FormResponse": { "type": "object", "properties": { "form_uuid": { "description": "UUID of the form used to generate this form response. Links to a specific form in the system that defines the fields to be gathered.", "format": "uuid", "example": "123e4567-8f59-4273-9bb2-23f94e3071eb", "type": "string" }, "staff_uuid": { "description": "UUID of the staff member who completed this FormResponse.", "format": "uuid", "example": "123e4567-068f-433c-a2e6-23f94e815bdb", "type": "string" }, "regarding_object": { "description": "The object type that this form response is associated with. Common values include 'job', 'asset', or 'company'. Works in conjunction with regarding_object_uuid to link this form response to a specific record in the system.", "type": "string" }, "regarding_object_uuid": { "description": "UUID of the specific record this form response is linked to. For example, if regarding_object is 'job', this will be the UUID of the specific job. This creates a relationship between the form response and the object it refers to.", "format": "uuid", "example": "123e4567-41ee-4ea3-8ca2-23f94fe918eb", "type": "string" }, "field_data": { "description": "JSON array of form answers captured at submission time.", "type": "string" }, "timestamp": { "description": "Date and time when the form was submitted/completed. Used for sorting and displaying form responses chronologically. Format is YYYY-MM-DD HH:MM:SS in UTC timezone.", "type": "string", "example": "2026-03-01 12:00:00" }, "form_by_staff_uuid": { "description": "UUID of the staff member who completed or submitted this form. Identifies which user filled out the form. Used for tracking form submission history and staff accountability.", "format": "uuid", "example": "123e4567-0230-4fe1-83c9-23f94429362b", "type": "string" }, "document_attachment_uuid": { "description": "UUID of the document attachment generated from this form response. When a form is completed, it can generate a PDF document which is stored as an attachment. This field links to that generated document attachment.", "format": "uuid", "example": "123e4567-ff79-499a-8ef4-23f94a981a6b", "type": "string" }, "asset_uuid": { "description": "UUID of the Asset this form response is related to. Used when the FormResponsepertains to a specific asset, such as equipment inspections, maintenance checklists, or asset condition reports.", "format": "uuid", "example": "123e4567-fc2c-4a3d-a278-23f942d7f62b", "type": "string" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-faa3-4649-8ea5-23f94011885b", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" } } }, "FormResponseCreate": { "type": "object", "properties": { "form_uuid": { "description": "UUID of the form used to generate this form response. Links to a specific form in the system that defines the fields to be gathered.", "format": "uuid", "example": "123e4567-d318-43fc-97b9-23f94923e6eb", "type": "string" }, "staff_uuid": { "description": "UUID of the staff member who completed this FormResponse.", "format": "uuid", "example": "123e4567-a1d2-4aa7-89a9-23f94f550c2b", "type": "string" }, "regarding_object": { "description": "The object type that this form response is associated with. Common values include 'job', 'asset', or 'company'. Works in conjunction with regarding_object_uuid to link this form response to a specific record in the system.", "type": "string" }, "regarding_object_uuid": { "description": "UUID of the specific record this form response is linked to. For example, if regarding_object is 'job', this will be the UUID of the specific job. This creates a relationship between the form response and the object it refers to.", "format": "uuid", "example": "123e4567-c625-40d3-8f48-23f94acf41bb", "type": "string" }, "field_data": { "description": "JSON array of form answers captured at submission time.", "type": "string" }, "timestamp": { "description": "Date and time when the form was submitted/completed. Used for sorting and displaying form responses chronologically. Format is YYYY-MM-DD HH:MM:SS in UTC timezone.", "type": "string", "example": "2026-03-01 12:00:00" }, "form_by_staff_uuid": { "description": "UUID of the staff member who completed or submitted this form. Identifies which user filled out the form. Used for tracking form submission history and staff accountability.", "format": "uuid", "example": "123e4567-d3c9-4778-8bfa-23f94ad8ecab", "type": "string" }, "document_attachment_uuid": { "description": "UUID of the document attachment generated from this form response. When a form is completed, it can generate a PDF document which is stored as an attachment. This field links to that generated document attachment.", "format": "uuid", "example": "123e4567-47b9-4310-8001-23f9437ae7bb", "type": "string" }, "asset_uuid": { "description": "UUID of the Asset this form response is related to. Used when the FormResponsepertains to a specific asset, such as equipment inspections, maintenance checklists, or asset condition reports.", "format": "uuid", "example": "123e4567-1af8-418f-b168-23f94802b51b", "type": "string" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-0582-4709-b0f3-23f9436261cb", "type": "string" } } }, "InboxMessage": { "type": "object", "properties": { "uuid": { "type": "string", "format": "uuid" }, "active": { "type": "boolean" }, "edit_date": { "type": "string", "format": "date-time" }, "timestamp": { "type": "string", "format": "date-time" }, "read_timestamp": { "type": "string", "format": "date-time", "nullable": true }, "last_reply_timestamp": { "type": "string", "format": "date-time", "nullable": true }, "snooze_until_timestamp": { "type": "string", "format": "date-time", "nullable": true }, "read_by_staff_uuid": { "type": "string", "format": "uuid", "nullable": true }, "from_name": { "type": "string" }, "from_email": { "type": "string" }, "to_email": { "type": "string" }, "subject": { "type": "string" }, "message_text": { "type": "string" }, "message_html": { "type": "string" }, "is_archived": { "type": "boolean" }, "archived_timestamp": { "type": "string", "format": "date-time", "nullable": true }, "archived_by_staff_uuid": { "type": "string", "format": "uuid", "nullable": true }, "regarding_company_uuid": { "type": "string", "format": "uuid", "nullable": true }, "converted_to_job_uuid": { "type": "string", "format": "uuid", "nullable": true }, "job_template_uuid": { "type": "string", "format": "uuid", "nullable": true }, "message_type": { "type": "string", "enum": [ "email", "sms", "online_booking", "phone_call", "reminder", "form", "network_request", "supplier_invoice", "asset", "partner_lead", "automation" ] } } }, "InboxMessageCreate": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-fb6f-4b56-91f3-23f94ad245eb", "type": "string" }, "timestamp": { "type": "string" }, "read_timestamp": { "example": "2026-03-01 12:00:00", "type": "string" }, "last_reply_timestamp": { "example": "2026-03-01 12:00:00", "type": "string" }, "snooze_until_timestamp": { "example": "2026-03-01 12:00:00", "type": "string" }, "read_by_staff_uuid": { "format": "uuid", "example": "123e4567-9be0-4bba-9c02-23f9403fdfdb", "type": "string" }, "from_name": { "type": "string", "description": "The name of the sender." }, "from_email": { "format": "email", "type": "string", "description": "The email address of the sender." }, "to_email": { "format": "email", "type": "string", "description": "The email address of the recipient." }, "subject": { "type": "string", "description": "The subject line of the message." }, "message_text": { "type": "string", "description": "The plain text content of the message." }, "message_html": { "type": "string", "description": "The HTML content of the message." }, "is_archived": { "type": "string" }, "archived_timestamp": { "example": "2026-03-01 12:00:00", "type": "string" }, "archived_by_staff_uuid": { "format": "uuid", "example": "123e4567-1672-4a3e-8f19-23f948bed7fb", "type": "string" }, "regarding_company_uuid": { "format": "uuid", "example": "123e4567-5041-4f31-b75e-23f94b6032ab", "type": "string" }, "converted_to_job_uuid": { "format": "uuid", "example": "123e4567-9c84-4fe6-9b97-23f94ac9977b", "type": "string" }, "job_template_uuid": { "format": "uuid", "example": "123e4567-fda9-4db0-a19b-23f944f8896b", "type": "string" }, "message_type": { "type": "string" } } }, "Job": { "type": "object", "properties": { "created_by_staff_uuid": { "description": "UUID of the staff member who created this job. Records which staff member initially added the job to the system.", "format": "uuid", "example": "123e4567-23ec-4462-bee3-23f949ed284b", "type": "string" }, "date": { "description": "The date the job was created or scheduled. Used for organizing jobs chronologically and for reference in reports.", "example": "YYYY-MM-DD", "type": "string" }, "company_uuid": { "description": "UUID reference to the client/company record associated with this job. Links the job to a client in the system, establishing the client-job relationship for billing and contact purposes.", "format": "uuid", "example": "123e4567-1e80-4b40-ae96-23f94a2e5b3b", "type": "string" }, "billing_address": { "description": "The address where invoices and billing information should be sent. If not specified, defaults to the job address.", "type": "string", "maxLength": 500 }, "status": { "description": "Current status of the job. Controls where the Job appears in the Dispatch Board.. Valid values are [Quote,Work Order,Unsuccessful,Completed]", "enum": [ "Quote", "Work Order", "Unsuccessful", "Completed" ], "type": "string", "maxLength": 20 }, "lng": { "description": "The longitude coordinate of the job location. (Read only)", "type": "number", "format": "float" }, "lat": { "description": "The latitude coordinate of the job location. (Read only)", "type": "number", "format": "float" }, "payment_date": { "description": "Not used. Refer to JobPayment endpoint.", "example": "2026-03-01 12:00:00", "type": "string" }, "payment_actioned_by_uuid": { "description": "Not used. Refer to JobPayment endpoint.", "format": "uuid", "example": "123e4567-764a-4868-9a03-23f94df4c6db", "type": "string" }, "payment_method": { "description": "Not used. Refer to JobPayment endpoint.", "type": "string" }, "payment_amount": { "description": "Not used. Refer to JobPayment endpoint.", "type": "string" }, "category_uuid": { "description": "UUID reference to the job category this job belongs to. Categories help organize jobs by type of work or department.", "format": "uuid", "example": "123e4567-3240-4ca3-9b58-23f94e0fc73b", "type": "string" }, "payment_note": { "description": "Not used. Refer to JobPayment endpoint.", "type": "string" }, "geo_is_valid": { "description": "Indicates whether the geocoding for the job address is valid. If this is false, the lat, lng, and other geo_ fields should not be used. (Read only). Valid values are [0,1]", "type": "integer", "enum": [ 0, 1 ] }, "purchase_order_number": { "description": "Client purchase order reference number for this job. Used for cross-referencing with external accounting or order management systems.", "type": "string", "maxLength": 100 }, "invoice_sent": { "description": "Indicates whether an invoice has been sent for this job.. Valid values are [0,1]", "type": "integer", "enum": [ 0, 1 ] }, "invoice_sent_stamp": { "description": "The date and time when the invoice was sent. (Read only)", "example": "2026-03-01 12:00:00", "type": "string" }, "ready_to_invoice": { "description": "DEPRECATED" }, "ready_to_invoice_stamp": { "description": "DEPRECATED" }, "geo_country": { "description": "The country field of the job address. (Read only)", "type": "string" }, "geo_postcode": { "description": "The postcode/ZIP code field of the job address. (Read only)", "type": "string" }, "geo_state": { "description": "The state/province field of the job address. (Read only)", "type": "string" }, "geo_city": { "description": "The city/suburb field of the job address. (Read only)", "type": "string" }, "geo_street": { "description": "The street name field of the job address. (Read only)", "type": "string" }, "geo_number": { "description": "The street number field of the job address. (Read only)", "type": "string" }, "queue_uuid": { "description": "The UUID of the queue this job belongs to.", "format": "uuid", "example": "123e4567-48c4-42ab-8966-23f94bb4942b", "type": "string" }, "queue_expiry_date": { "description": "The date and time when the job expires from the queue.", "example": "2026-03-01 12:00:00", "type": "string" }, "queue_assigned_staff_uuid": { "description": "The UUID of the staff member assigned to this job in the queue.", "format": "uuid", "example": "123e4567-4ef4-4d41-859d-23f94831bd3b", "type": "string" }, "badges": { "description": "JSON Array of Badge UUIDs", "type": "string" }, "quote_date": { "description": "The date and time that the job status was changed to Quote.", "example": "2026-03-01 12:00:00", "type": "string" }, "quote_sent": { "description": "Boolean flag indicating whether a quote has been sent to the client for this job.. Valid values are [0,1]", "type": "integer", "enum": [ 0, 1 ] }, "quote_sent_stamp": { "description": "Timestamp when the quote was sent to the client. Format is YYYY-MM-DD HH:MM:SS. (Read only)", "example": "2026-03-01 12:00:00", "type": "string" }, "work_order_date": { "description": "The date and time that the job status was changed to Work Order.", "example": "2026-03-01 12:00:00", "type": "string" }, "active_network_request_uuid": { "description": "DEPRECATED" }, "related_knowledge_articles": { "description": "DEPRECATED" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-3be0-4db3-9ec1-23f94b16af9b", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "job_address": { "type": "string", "description": "Physical address where the job is to be performed. This address is used for geocoding to place the job on the map.", "maxLength": 500 }, "job_description": { "type": "string" }, "work_done_description": { "type": "string", "description": "Email Address" }, "generated_job_id": { "type": "string", "description": "System-generated unique job identifier. This is read-only and automatically assigned when a job is created. (Read only)" }, "total_invoice_amount": { "type": "string", "description": "The total amount to be invoiced for this job. (Read only)" }, "payment_processed": { "type": "integer", "description": "Indicates whether the job has been exported to the connected Accounting Package.. Valid values are [0,1]", "enum": [ 0, 1 ] }, "payment_processed_stamp": { "example": "2026-03-01 12:00:00", "type": "string", "description": "The date and time the job has been exported to the connected Accounting Package. (Read only)" }, "payment_received": { "type": "integer", "description": "Indicates whether full payment has been received for this job.. Valid values are [0,1]", "enum": [ 0, 1 ] }, "payment_received_stamp": { "example": "2026-03-01 12:00:00", "type": "string", "description": "The date and time when full payment was received. (Read only)" }, "completion_date": { "example": "2026-03-01 12:00:00", "type": "string", "description": "The date and time that the job status was changed to Completed." }, "completion_actioned_by_uuid": { "format": "uuid", "example": "123e4567-39cc-4284-a77c-23f9428e6feb", "type": "string", "description": "UUID of the staff member who marked this job as completed. References a staff record in the system. (Read only)" }, "unsuccessful_date": { "example": "2026-03-01 12:00:00", "type": "string", "description": "The date and time that the job status was changed to Unsuccessful." }, "job_is_scheduled_until_stamp": { "example": "2026-03-01 12:00:00", "type": "string", "description": "The end date/time of the last scheduled activity for this job. After this date, the job is considered Unscheduled. (Read only)" } }, "required": [ "status" ] }, "JobCreate": { "type": "object", "properties": { "created_by_staff_uuid": { "description": "UUID of the staff member who created this job. Records which staff member initially added the job to the system.", "format": "uuid", "example": "123e4567-f7ec-44f1-8f82-23f94fdc6cab", "type": "string" }, "date": { "description": "The date the job was created or scheduled. Used for organizing jobs chronologically and for reference in reports.", "example": "YYYY-MM-DD", "type": "string" }, "company_uuid": { "description": "UUID reference to the client/company record associated with this job. Links the job to a client in the system, establishing the client-job relationship for billing and contact purposes.", "format": "uuid", "example": "123e4567-9fc3-4f4c-ae8c-23f94a2a432b", "type": "string" }, "billing_address": { "description": "The address where invoices and billing information should be sent. If not specified, defaults to the job address.", "type": "string", "maxLength": 500 }, "status": { "description": "Current status of the job. Controls where the Job appears in the Dispatch Board.. Valid values are [Quote,Work Order,Unsuccessful,Completed]", "enum": [ "Quote", "Work Order", "Unsuccessful", "Completed" ], "type": "string", "maxLength": 20 }, "lng": { "description": "Longitude coordinate of the job location. Used for mapping and geolocation features. This is automatically populated based on the job address through geocoding." }, "lat": { "description": "Latitude coordinate of the job location. Used for mapping and geolocation features. This is automatically populated based on the job address through geocoding." }, "payment_date": { "description": "Not used. Refer to JobPayment endpoint.", "example": "2026-03-01 12:00:00", "type": "string" }, "payment_actioned_by_uuid": { "description": "Not used. Refer to JobPayment endpoint.", "format": "uuid", "example": "123e4567-e130-4744-bf68-23f94937a7eb", "type": "string" }, "payment_method": { "description": "Not used. Refer to JobPayment endpoint.", "type": "string" }, "payment_amount": { "description": "Not used. Refer to JobPayment endpoint.", "type": "string" }, "category_uuid": { "description": "UUID reference to the job category this job belongs to. Categories help organize jobs by type of work or department.", "format": "uuid", "example": "123e4567-5651-43fe-a6f2-23f94a6f9c7b", "type": "string" }, "payment_note": { "description": "Not used. Refer to JobPayment endpoint.", "type": "string" }, "geo_is_valid": { "description": "Indicates whether the geocoding for the job address was successful. When true, the latitude and longitude coordinates are considered accurate for mapping and location-based features." }, "purchase_order_number": { "description": "Client purchase order reference number for this job. Used for cross-referencing with external accounting or order management systems.", "type": "string", "maxLength": 100 }, "invoice_sent": { "description": "Indicates whether an invoice has been sent for this job.. Valid values are [0,1]", "type": "integer", "enum": [ 0, 1 ] }, "invoice_sent_stamp": { "description": "Timestamp when the invoice was sent to the client. Format is YYYY-MM-DD HH:MM:SS." }, "ready_to_invoice": { "description": "DEPRECATED" }, "ready_to_invoice_stamp": { "description": "DEPRECATED" }, "geo_country": { "description": "The country component extracted from the geocoded job address. Automatically populated when an address is geocoded." }, "geo_postcode": { "description": "The postal/zip code component extracted from the geocoded job address. Automatically populated when an address is geocoded." }, "geo_state": { "description": "The state/province component extracted from the geocoded job address. Automatically populated when an address is geocoded." }, "geo_city": { "description": "The city/locality component extracted from the geocoded job address. Automatically populated when an address is geocoded." }, "geo_street": { "description": "The street name component extracted from the geocoded job address. Automatically populated when an address is geocoded." }, "geo_number": { "description": "The street number component extracted from the geocoded job address. Automatically populated when an address is geocoded." }, "queue_uuid": { "description": "The UUID of the queue this job belongs to.", "format": "uuid", "example": "123e4567-e5cb-43ec-8a27-23f948619a1b", "type": "string" }, "queue_expiry_date": { "description": "The date and time when the job expires from the queue.", "example": "2026-03-01 12:00:00", "type": "string" }, "queue_assigned_staff_uuid": { "description": "The UUID of the staff member assigned to this job in the queue.", "format": "uuid", "example": "123e4567-3588-4466-8265-23f9431c9d3b", "type": "string" }, "badges": { "description": "JSON Array of Badge UUIDs", "type": "string" }, "quote_date": { "description": "The date and time that the job status was changed to Quote.", "example": "2026-03-01 12:00:00", "type": "string" }, "quote_sent": { "description": "Boolean flag indicating whether a quote has been sent to the client for this job.. Valid values are [0,1]", "type": "integer", "enum": [ 0, 1 ] }, "quote_sent_stamp": { "description": "Timestamp when the quote was sent to the client. Format is YYYY-MM-DD HH:MM:SS." }, "work_order_date": { "description": "The date and time that the job status was changed to Work Order.", "example": "2026-03-01 12:00:00", "type": "string" }, "active_network_request_uuid": { "description": "DEPRECATED" }, "related_knowledge_articles": { "description": "DEPRECATED" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-8032-4212-ae45-23f94e9e212b", "type": "string" }, "job_address": { "type": "string", "description": "Physical address where the job is to be performed. This address is used for geocoding to place the job on the map.", "maxLength": 500 }, "job_description": { "type": "string" }, "work_done_description": { "type": "string", "description": "Email Address" }, "payment_processed": { "type": "integer", "description": "Indicates whether the job has been exported to the connected Accounting Package.. Valid values are [0,1]", "enum": [ 0, 1 ] }, "payment_received": { "type": "integer", "description": "Indicates whether full payment has been received for this job.. Valid values are [0,1]", "enum": [ 0, 1 ] }, "completion_date": { "example": "2026-03-01 12:00:00", "type": "string", "description": "The date and time that the job status was changed to Completed." }, "unsuccessful_date": { "example": "2026-03-01 12:00:00", "type": "string", "description": "The date and time that the job status was changed to Unsuccessful." } }, "required": [ "status" ] }, "JobActivity": { "type": "object", "properties": { "job_uuid": { "description": "The UUID of the job this activity belongs to", "format": "uuid", "example": "123e4567-6936-44d0-83ba-23f9472be1fb", "type": "string" }, "staff_uuid": { "description": "The UUID of the staff member assigned to this activity", "format": "uuid", "example": "123e4567-a0f7-474a-82bd-23f94f782d2b", "type": "string" }, "start_date": { "description": "The scheduled start date and time of the activity", "example": "2026-03-01 12:00:00", "type": "string" }, "end_date": { "description": "The scheduled end date and time of the activity", "example": "2026-03-01 12:00:00", "type": "string" }, "activity_was_scheduled": { "description": "Boolean flag indicating whether this activity was scheduled in advance. Cannot be true if activity_was_recorded is true.", "type": "string" }, "activity_was_recorded": { "description": "Boolean flag indicating whether this activity was recorded after completion rather than scheduled in advance. Cannot be true if activity_was_scheduled is true.", "type": "string" }, "activity_was_automated": { "description": "Integer flag indicating if the activity was automated: 0", "type": "string" }, "has_been_opened": { "description": "Boolean flag indicating whether the assigned staff member has viewed this job activity. Resets to false if the staff member or start time is changed. Only relevant when activity_was_scheduled is true.", "type": "string" }, "has_been_opened_timestamp": { "description": "The date and time when the assigned staff member first viewed this job activity. Format is YYYY-MM-DD HH:MM:SS. Resets when staff member or start time is changed. Only relevant when activity_was_scheduled is true.", "example": "2026-03-01 12:00:00", "type": "string" }, "travel_time_in_seconds": { "description": "The estimated travel time to reach this activity location in seconds", "type": "integer" }, "travel_distance_in_meters": { "description": "The estimated travel distance to reach this activity location in meters", "type": "integer" }, "allocated_by_staff_uuid": { "description": "DEPRECATED" }, "allocated_timestamp": { "description": "DEPRECATED" }, "material_uuid": { "description": "The UUID of the material associated with this activity. Used to determine the cost of the activity.", "format": "uuid", "example": "123e4567-7e05-487e-8d4f-23f949cabc8b", "type": "string" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-6368-44da-9b33-23f94fc2f5bb", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "edit_by_staff_uuid": { "format": "uuid", "example": "123e4567-d7fe-421d-8379-23f9423667ab", "readOnly": true, "description": "UUID of Staff Member who last modified record" } } }, "JobActivityCreate": { "type": "object", "properties": { "job_uuid": { "description": "The UUID of the job this activity belongs to", "format": "uuid", "example": "123e4567-4574-4f07-8a7e-23f94f76144b", "type": "string" }, "staff_uuid": { "description": "The UUID of the staff member assigned to this activity", "format": "uuid", "example": "123e4567-d648-48f1-9223-23f94b0c350b", "type": "string" }, "start_date": { "description": "The scheduled start date and time of the activity", "example": "2026-03-01 12:00:00", "type": "string" }, "end_date": { "description": "The scheduled end date and time of the activity", "example": "2026-03-01 12:00:00", "type": "string" }, "activity_was_scheduled": { "description": "Boolean flag indicating whether this activity was scheduled in advance. Cannot be true if activity_was_recorded is true.", "type": "string" }, "activity_was_recorded": { "description": "Boolean flag indicating whether this activity was recorded after completion rather than scheduled in advance. Cannot be true if activity_was_scheduled is true.", "type": "string" }, "activity_was_automated": { "description": "Integer flag indicating if the activity was automated: 0", "type": "string" }, "has_been_opened": { "description": "Boolean flag indicating whether the assigned staff member has viewed this job activity. Resets to false if the staff member or start time is changed. Only relevant when activity_was_scheduled is true.", "type": "string" }, "has_been_opened_timestamp": { "description": "The date and time when the assigned staff member first viewed this job activity. Format is YYYY-MM-DD HH:MM:SS. Resets when staff member or start time is changed. Only relevant when activity_was_scheduled is true.", "example": "2026-03-01 12:00:00", "type": "string" }, "travel_time_in_seconds": { "description": "The estimated travel time to reach this activity location in seconds", "type": "integer" }, "travel_distance_in_meters": { "description": "The estimated travel distance to reach this activity location in meters", "type": "integer" }, "allocated_by_staff_uuid": { "description": "DEPRECATED" }, "allocated_timestamp": { "description": "DEPRECATED" }, "material_uuid": { "description": "The UUID of the material associated with this activity. Used to determine the cost of the activity.", "format": "uuid", "example": "123e4567-24bc-41d2-91d5-23f9493d724b", "type": "string" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-1330-427d-a253-23f94562fb8b", "type": "string" }, "edit_by_staff_uuid": { "format": "uuid", "example": "123e4567-e22b-4b03-952b-23f943c0658b", "readOnly": true, "description": "UUID of Staff Member who last modified record" } } }, "JobAllocation": { "type": "object", "properties": { "job_uuid": { "description": "The UUID of the job that this allocation relates to.", "format": "uuid", "example": "123e4567-796e-43d3-89b8-23f942b7f0ab", "type": "string" }, "queue_uuid": { "description": "DEPRECATED" }, "staff_uuid": { "description": "The UUID of the staff member this job is allocated to.", "format": "uuid", "example": "123e4567-4525-400b-ab3e-23f94473c62b", "type": "string" }, "allocation_date": { "description": "The minimum start date for a job allocation to be completed by a staff member. Setting this date will ensure the job allocation appears in the future on staff schedules.", "example": "2026-03-01 12:00:00", "type": "string" }, "allocation_window_uuid": { "description": "The UUID of the allocation window that defines when the job should be completed (e.g. Urgent, Early Morning, During Business Hours).", "format": "uuid", "example": "123e4567-7fd1-45f3-8068-23f945565e9b", "type": "string" }, "allocated_by_staff_uuid": { "description": "The UUID of the staff member who allocated the job.", "format": "uuid", "example": "123e4567-c873-4cca-91e7-23f943de293b", "type": "string" }, "allocated_timestamp": { "description": "The timestamp when the job was allocated.", "example": "2026-03-01 12:00:00", "type": "string" }, "expiry_timestamp": { "description": "The timestamp when the job allocation expires.", "example": "2026-03-01 12:00:00", "type": "string" }, "read_timestamp": { "description": "The timestamp when the job allocation was read by the staff member.", "example": "2026-03-01 12:00:00", "type": "string" }, "completion_timestamp": { "description": "The timestamp when the job allocation was marked as completed.", "example": "2026-03-01 12:00:00", "type": "string" }, "estimated_duration": { "description": "DEPRECATED" }, "revised_duration": { "description": "DEPRECATED" }, "sort_priority": { "description": "The sort priority for displaying this job allocation.", "type": "string" }, "requires_acceptance": { "description": "DEPRECATED" }, "acceptance_status": { "description": "DEPRECATED" }, "acceptance_timestamp": { "description": "DEPRECATED" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-8160-4f2d-951a-23f94c5382cb", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" } } }, "JobAllocationCreate": { "type": "object", "properties": { "job_uuid": { "description": "The UUID of the job that this allocation relates to.", "format": "uuid", "example": "123e4567-740c-4fa5-bf5e-23f94609a4bb", "type": "string" }, "queue_uuid": { "description": "DEPRECATED" }, "staff_uuid": { "description": "The UUID of the staff member this job is allocated to.", "format": "uuid", "example": "123e4567-a785-42a0-a73f-23f948f854fb", "type": "string" }, "allocation_date": { "description": "The minimum start date for a job allocation to be completed by a staff member. Setting this date will ensure the job allocation appears in the future on staff schedules.", "example": "2026-03-01 12:00:00", "type": "string" }, "allocation_window_uuid": { "description": "The UUID of the allocation window that defines when the job should be completed (e.g. Urgent, Early Morning, During Business Hours).", "format": "uuid", "example": "123e4567-6550-4c79-a464-23f946c4a94b", "type": "string" }, "allocated_by_staff_uuid": { "description": "The UUID of the staff member who allocated the job.", "format": "uuid", "example": "123e4567-97e7-40aa-94e3-23f94ca2c33b", "type": "string" }, "allocated_timestamp": { "description": "The timestamp when the job was allocated.", "example": "2026-03-01 12:00:00", "type": "string" }, "expiry_timestamp": { "description": "The timestamp when the job allocation expires.", "example": "2026-03-01 12:00:00", "type": "string" }, "read_timestamp": { "description": "The timestamp when the job allocation was read by the staff member.", "example": "2026-03-01 12:00:00", "type": "string" }, "completion_timestamp": { "description": "The timestamp when the job allocation was marked as completed.", "example": "2026-03-01 12:00:00", "type": "string" }, "estimated_duration": { "description": "DEPRECATED" }, "revised_duration": { "description": "DEPRECATED" }, "sort_priority": { "description": "The sort priority for displaying this job allocation.", "type": "string" }, "requires_acceptance": { "description": "DEPRECATED" }, "acceptance_status": { "description": "DEPRECATED" }, "acceptance_timestamp": { "description": "DEPRECATED" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-2d60-4e31-9315-23f94dd3f31b", "type": "string" } } }, "JobChecklist": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-5a16-47a8-a521-23f94326d35b", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "job_uuid": { "format": "uuid", "example": "123e4567-02f8-41c1-aae6-23f94b20da8b", "type": "string", "description": "UUID of the job this checklist item belongs to. This links the checklist item to a specific job in the system." }, "name": { "type": "string", "description": "The name or description of the checklist item. This is displayed to users in the mobile app and web interface.", "maxLength": 512 }, "section_name": { "type": "string", "description": "The section or category name under which this checklist item is grouped. This helps organize related checklist items together.", "maxLength": 256 }, "item_type": { "type": "string", "description": "The type of checklist item. Valid values are: 'Todo', 'Asset', 'Photo', 'Form', and 'Document'. Defaults to 'Todo' if not specified. This determines the functionality and appearance of the checklist item." }, "sort_order": { "type": "integer", "description": "A numeric value determining the order in which checklist items appear in the user interface. Lower values appear first. Used to customize the display sequence of items." }, "completed_timestamp": { "example": "2026-03-01 12:00:00", "type": "string", "description": "The date and time when the checklist item was marked as completed. Empty or '0000-00-00 00:00:00' indicates the item is not completed." }, "completed_by_staff_uuid": { "format": "uuid", "example": "123e4567-ced4-4cc7-b32f-23f94922d23b", "type": "string", "description": "UUID of the staff member who completed this checklist item. References a Staff object. Empty if the item is not completed." }, "completed_during_checkin_uuid": { "format": "uuid", "example": "123e4567-03d7-411e-b176-23f942edda6b", "type": "string", "description": "UUID of the job check-in during which this checklist item was completed. This links the checklist completion to a specific check-in event in the job history." }, "reminder_type": { "type": "string", "description": "The type of reminder associated with this checklist item. Valid values are: '' (no reminder), 'CHECK_IN', 'NAVIGATE', 'CHECK_OUT', 'ABSOLUTE_DATETIME', or 'RELATIVE_DATETIME'. Determines when the system will remind users about this checklist item." }, "reminder_data": { "type": "string", "description": "JSON data containing additional information for the reminder. Format depends on the reminder_type. For ABSOLUTE_DATETIME, includes 'absoluteDateTime'. For RELATIVE_DATETIME, includes 'relativeDateTime' with 'baseDate', 'unit', and 'quantity'. Exposed via API as 'reminder_data'.", "oneOf": [ { "type": "object", "properties": { "absoluteDateTime": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}\\ \\d{2}:\\d{2}:\\d{2}$" } }, "required": [ "absoluteDateTime" ], "additionalProperties": false }, { "type": "object", "properties": { "relativeDateTime": { "type": "object", "properties": { "baseDate": { "type": "string", "enum": [ "JOB_CREATE_TIME", "NEXT_BOOKING_TIME" ] }, "unit": { "type": "string", "enum": [ "DAY", "HOUR", "MINUTE" ] }, "quantity": { "type": "integer", "description": "Number of units to add/subtract from base date. Negative quantities mean the reminder occurs before the base date. Reminders scheduled into the past will not occur." } }, "required": [ "baseDate", "unit", "quantity" ] } }, "required": [ "relativeDateTime" ], "additionalProperties": false } ] }, "regarding_object": { "type": "string", "description": "The type of object which this checklist item is related to. For example, for Form checklists, this will be 'Form'." }, "regarding_object_uuid": { "format": "uuid", "example": "123e4567-e5dc-42ad-8f53-23f94cb5eadb", "type": "string", "description": "The UUID of the object which this checklists item is related to. For example, for Form checklists, this is the UUID of the Form that must be completed to complete the checklist item." }, "fulfilled_by_object_name": { "type": "string", "description": "The type of object which completes this checklist item. For example, for Form checklists, this will be 'FormResponse'." }, "fulfilled_by_object_uuid": { "format": "uuid", "example": "123e4567-9ab9-43b5-a07a-23f9408fefcb", "type": "string", "description": "The UUID of the object which completes this checklist item. For example, for Form checklists, this references the UUID of a FormResponse record." }, "assigned_to_staff_uuids": { "format": "uuid", "example": "123e4567-02c5-47ce-8ba9-23f9433ba29b", "type": "array", "description": "JSON array of staff UUIDs to whom this checklist item is assigned. Determines which staff members are responsible for completing this checklist item. Currently limited to a maximum of 1 staff member.", "items": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", "description": "Must be the UUID of a Staff record" }, "maxItems": 1 }, "is_locked": { "type": "integer", "description": "If this checklist item is locked (read-only) and cannot be modified. This is set by the system when the checklist item is created from a Task or Network Request. (Read only). Valid values are [0,1]", "enum": [ 0, 1 ] }, "assigned_timestamp": { "example": "2026-03-01 12:00:00", "type": "string", "description": "The timestamp when the checklist item was assigned to the staff member. (Read only)" }, "assigned_by_staff_uuid": { "format": "uuid", "example": "123e4567-b494-44a6-b174-23f94dde708b", "type": "string", "description": "The UUID of the staff member who assigned the checklist item to the staff member. (Read only)" } } }, "JobChecklistCreate": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-f6f8-442c-855c-23f9441d6deb", "type": "string" }, "job_uuid": { "format": "uuid", "example": "123e4567-b762-456b-82d3-23f94e60c49b", "type": "string", "description": "UUID of the job this checklist item belongs to. This links the checklist item to a specific job in the system." }, "name": { "type": "string", "description": "The name or description of the checklist item. This is displayed to users in the mobile app and web interface.", "maxLength": 512 }, "section_name": { "type": "string", "description": "The section or category name under which this checklist item is grouped. This helps organize related checklist items together.", "maxLength": 256 }, "item_type": { "type": "string", "description": "The type of checklist item. Valid values are: 'Todo', 'Asset', 'Photo', 'Form', and 'Document'. Defaults to 'Todo' if not specified. This determines the functionality and appearance of the checklist item." }, "sort_order": { "type": "integer", "description": "A numeric value determining the order in which checklist items appear in the user interface. Lower values appear first. Used to customize the display sequence of items." }, "completed_timestamp": { "example": "2026-03-01 12:00:00", "type": "string", "description": "The date and time when the checklist item was marked as completed. Empty or '0000-00-00 00:00:00' indicates the item is not completed." }, "completed_by_staff_uuid": { "format": "uuid", "example": "123e4567-62bb-4adb-b51b-23f94f4af34b", "type": "string", "description": "UUID of the staff member who completed this checklist item. References a Staff object. Empty if the item is not completed." }, "completed_during_checkin_uuid": { "format": "uuid", "example": "123e4567-63bf-4a2b-8484-23f94ad7edfb", "type": "string", "description": "UUID of the job check-in during which this checklist item was completed. This links the checklist completion to a specific check-in event in the job history." }, "reminder_type": { "type": "string", "description": "The type of reminder associated with this checklist item. Valid values are: '' (no reminder), 'CHECK_IN', 'NAVIGATE', 'CHECK_OUT', 'ABSOLUTE_DATETIME', or 'RELATIVE_DATETIME'. Determines when the system will remind users about this checklist item." }, "reminder_data": { "type": "string", "description": "JSON data containing additional information for the reminder. Format depends on the reminder_type. For ABSOLUTE_DATETIME, includes 'absoluteDateTime'. For RELATIVE_DATETIME, includes 'relativeDateTime' with 'baseDate', 'unit', and 'quantity'. Exposed via API as 'reminder_data'.", "oneOf": [ { "type": "object", "properties": { "absoluteDateTime": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}\\ \\d{2}:\\d{2}:\\d{2}$" } }, "required": [ "absoluteDateTime" ], "additionalProperties": false }, { "type": "object", "properties": { "relativeDateTime": { "type": "object", "properties": { "baseDate": { "type": "string", "enum": [ "JOB_CREATE_TIME", "NEXT_BOOKING_TIME" ] }, "unit": { "type": "string", "enum": [ "DAY", "HOUR", "MINUTE" ] }, "quantity": { "type": "integer", "description": "Number of units to add/subtract from base date. Negative quantities mean the reminder occurs before the base date. Reminders scheduled into the past will not occur." } }, "required": [ "baseDate", "unit", "quantity" ] } }, "required": [ "relativeDateTime" ], "additionalProperties": false } ] }, "regarding_object": { "type": "string", "description": "The type of object which this checklist item is related to. For example, for Form checklists, this will be 'Form'." }, "regarding_object_uuid": { "format": "uuid", "example": "123e4567-b215-40b6-a7a7-23f9459bba4b", "type": "string", "description": "The UUID of the object which this checklists item is related to. For example, for Form checklists, this is the UUID of the Form that must be completed to complete the checklist item." }, "fulfilled_by_object_name": { "type": "string", "description": "The type of object which completes this checklist item. For example, for Form checklists, this will be 'FormResponse'." }, "fulfilled_by_object_uuid": { "format": "uuid", "example": "123e4567-669e-403f-bbaf-23f9480ddffb", "type": "string", "description": "The UUID of the object which completes this checklist item. For example, for Form checklists, this references the UUID of a FormResponse record." }, "assigned_to_staff_uuids": { "format": "uuid", "example": "123e4567-311d-4c6b-bd47-23f948a9ab4b", "type": "array", "description": "JSON array of staff UUIDs to whom this checklist item is assigned. Determines which staff members are responsible for completing this checklist item. Currently limited to a maximum of 1 staff member.", "items": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", "description": "Must be the UUID of a Staff record" }, "maxItems": 1 } } }, "JobContact": { "type": "object", "properties": { "job_uuid": { "description": "UUID of the job this contact is associated with. Each job contact must be linked to a valid job in the system. This field cannot be changed once set.", "format": "uuid", "example": "123e4567-6647-4c91-ad50-23f94924d7cb", "type": "string" }, "first": { "description": "First name of the job contact. This information is synced with the job's contact information fields depending on the contact type.", "type": "string" }, "last": { "description": "Last name of the job contact. This information is synced with the job's contact information fields depending on the contact type.", "type": "string" }, "phone": { "description": "Landline or office phone number of the job contact. Format is flexible but should represent a valid phone number. This field syncs with the job's phone_1 field for job contacts or phone_2 field for billing contacts.", "type": "string" }, "mobile": { "description": "Mobile phone number of the job contact. Format is flexible but should represent a valid mobile number. This field syncs with the job's mobile field for job contacts or billing_mobile field for billing contacts.", "type": "string" }, "email": { "description": "Email address of the job contact. Should be a valid email format. Used for sending job-related communications. This field syncs with the job's email field for job contacts or billing_email field for billing contacts.", "format": "email", "type": "string" }, "type": { "description": "Type of contact relationship to the job. Valid values are: 'JOB' (or 'Job Contact'), 'BILLING' (or 'Billing Contact'), or 'Property Manager'. Controls which job fields are updated when this contact record changes.", "type": "string" }, "is_primary_contact": { "description": "DEPRECATED" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-c7c5-438c-88c1-23f941301bbb", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" } } }, "JobContactCreate": { "type": "object", "properties": { "job_uuid": { "description": "UUID of the job this contact is associated with. Each job contact must be linked to a valid job in the system. This field cannot be changed once set.", "format": "uuid", "example": "123e4567-65f9-48f6-b5d5-23f946e3196b", "type": "string" }, "first": { "description": "First name of the job contact. This information is synced with the job's contact information fields depending on the contact type.", "type": "string" }, "last": { "description": "Last name of the job contact. This information is synced with the job's contact information fields depending on the contact type.", "type": "string" }, "phone": { "description": "Landline or office phone number of the job contact. Format is flexible but should represent a valid phone number. This field syncs with the job's phone_1 field for job contacts or phone_2 field for billing contacts.", "type": "string" }, "mobile": { "description": "Mobile phone number of the job contact. Format is flexible but should represent a valid mobile number. This field syncs with the job's mobile field for job contacts or billing_mobile field for billing contacts.", "type": "string" }, "email": { "description": "Email address of the job contact. Should be a valid email format. Used for sending job-related communications. This field syncs with the job's email field for job contacts or billing_email field for billing contacts.", "format": "email", "type": "string" }, "type": { "description": "Type of contact relationship to the job. Valid values are: 'JOB' (or 'Job Contact'), 'BILLING' (or 'Billing Contact'), or 'Property Manager'. Controls which job fields are updated when this contact record changes.", "type": "string" }, "is_primary_contact": { "description": "DEPRECATED" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-2b6e-4cc4-aa5d-23f9486bcefb", "type": "string" } } }, "JobMaterial": { "type": "object", "properties": { "job_uuid": { "description": "The UUID of the job this material is associated with. This is a required field that establishes the relationship between the job material and its parent job.", "format": "uuid", "example": "123e4567-9539-4f05-ba2e-23f943147fab", "type": "string" }, "material_uuid": { "description": "The UUID of the material catalog item this job material is based on. Links the job material to the corresponding material in the materials catalog.", "format": "uuid", "example": "123e4567-6664-44df-8cc2-23f94cbf8a9b", "type": "string" }, "name": { "description": "The name of the material item used on the job. This is displayed on invoices and is used to identify the material to the customer. The name typically comes from the associated material object but can be customized per job.", "type": "string", "maxLength": 500 }, "quantity": { "description": "The quantity of this material used on the job. This field is mandatory and cannot be empty.", "type": "string", "maxLength": 100 }, "price": { "description": "The unit price of the material excluding tax. Used in calculations to determine the total price for this line item on the job. The system may automatically adjust this value to maintain consistency with tax-inclusive pricing.", "type": "string" }, "displayed_amount": { "description": "The unit price amount as displayed on invoices and quotes. This can be either tax-inclusive or tax-exclusive depending on the displayed_amount_is_tax_inclusive field value. Used for presentation to customers.", "type": "string" }, "displayed_amount_is_tax_inclusive": { "description": "Boolean flag indicating whether the displayed_amount includes tax (true) or excludes tax (false). This controls how prices are presented to customers and determines which price value (inclusive or exclusive) is used in calculations.", "type": "string" }, "tax_rate_uuid": { "description": "The UUID of the tax rate applied to this job material. Determines how tax is calculated for this specific line item.", "format": "uuid", "example": "123e4567-a746-4be2-bd00-23f949815b5b", "type": "string" }, "sort_order": { "description": "Integer value controlling the display order of materials on a job. Lower values appear first in lists. Used to customize the presentation order of materials on quotes, invoices and job forms.", "type": "string" }, "cost": { "description": "The cost of the material for this job. This is the ex-tax amount.", "type": "string" }, "displayed_cost": { "description": "The cost of the material for this job, displayed as inc-tax or ex-tax depending on jobMaterial.displayed_amount_is_tax_inclusive.", "type": "string" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-be6b-4a92-a2d6-23f94483836b", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "job_material_bundle_uuid": { "format": "uuid", "example": "123e4567-50da-46fd-9a5e-23f941ffeacb", "type": "string", "description": "UUID of a JobMaterialBundle which this JobMaterial belongs to. The default value is blank, which means that the JobMaterial is not part of a JobMaterialBundle." } }, "required": [ "quantity" ] }, "JobMaterialCreate": { "type": "object", "properties": { "job_uuid": { "description": "The UUID of the job this material is associated with. This is a required field that establishes the relationship between the job material and its parent job.", "format": "uuid", "example": "123e4567-6110-4f36-93cc-23f94736b95b", "type": "string" }, "material_uuid": { "description": "The UUID of the material catalog item this job material is based on. Links the job material to the corresponding material in the materials catalog.", "format": "uuid", "example": "123e4567-e645-4a4d-bb32-23f94a99a5ab", "type": "string" }, "name": { "description": "The name of the material item used on the job. This is displayed on invoices and is used to identify the material to the customer. The name typically comes from the associated material object but can be customized per job.", "type": "string", "maxLength": 500 }, "quantity": { "description": "The quantity of this material used on the job. This field is mandatory and cannot be empty.", "type": "string", "maxLength": 100 }, "price": { "description": "The unit price of the material excluding tax. Used in calculations to determine the total price for this line item on the job. The system may automatically adjust this value to maintain consistency with tax-inclusive pricing.", "type": "string" }, "displayed_amount": { "description": "The unit price amount as displayed on invoices and quotes. This can be either tax-inclusive or tax-exclusive depending on the displayed_amount_is_tax_inclusive field value. Used for presentation to customers.", "type": "string" }, "displayed_amount_is_tax_inclusive": { "description": "Boolean flag indicating whether the displayed_amount includes tax (true) or excludes tax (false). This controls how prices are presented to customers and determines which price value (inclusive or exclusive) is used in calculations.", "type": "string" }, "tax_rate_uuid": { "description": "The UUID of the tax rate applied to this job material. Determines how tax is calculated for this specific line item.", "format": "uuid", "example": "123e4567-1528-43e7-a99b-23f944dde9cb", "type": "string" }, "sort_order": { "description": "Integer value controlling the display order of materials on a job. Lower values appear first in lists. Used to customize the presentation order of materials on quotes, invoices and job forms.", "type": "string" }, "cost": { "description": "The cost of the material for this job. This is the ex-tax amount.", "type": "string" }, "displayed_cost": { "description": "The cost of the material for this job, displayed as inc-tax or ex-tax depending on jobMaterial.displayed_amount_is_tax_inclusive.", "type": "string" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-59d5-48ed-8c3e-23f94642c1db", "type": "string" }, "job_material_bundle_uuid": { "format": "uuid", "example": "123e4567-beac-430e-9edc-23f94068e49b", "type": "string", "description": "UUID of a JobMaterialBundle which this JobMaterial belongs to. The default value is blank, which means that the JobMaterial is not part of a JobMaterialBundle." } }, "required": [ "quantity" ] }, "JobMaterialBundle": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-5851-4780-a80a-23f94f95838b", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "item_number": { "type": "string", "description": "Unique identifier for the material bundle within the job. Displayed on the Quote/Invoice in the same way as for JobMaterials." }, "name": { "type": "string", "description": "Descriptive name of the job material bundle. Displayed on the Quote/Invoice in the same way as for JobMaterials." }, "quantity": { "type": "string", "description": "The quantity shown for the bundle line item on the invoice. Must be greater than zero. The quantity of each JobMaterial within the bundle is determined by dividing by this value." }, "sort_order": { "type": "integer", "description": "Defines the display order of the JobMaterialBundle relative to other JobMaterials and JobMaterialBundles on the Job. Lower values are displayed first." }, "material_bundle_uuid": { "format": "uuid", "example": "123e4567-c239-420d-9cd8-23f94d3aa3ab", "type": "string", "description": "UUID of the MaterialBundle which this JobMaterialBundle was originally created from." }, "job_uuid": { "format": "uuid", "example": "123e4567-adf9-46e9-9ec6-23f948b6b8db", "type": "string", "description": "UUID of the job that this material bundle is associated with. Links the bundle to a specific job record." } } }, "JobMaterialBundleCreate": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-ed8b-4548-bc36-23f9491cc83b", "type": "string" }, "item_number": { "type": "string", "description": "Unique identifier for the material bundle within the job. Displayed on the Quote/Invoice in the same way as for JobMaterials." }, "name": { "type": "string", "description": "Descriptive name of the job material bundle. Displayed on the Quote/Invoice in the same way as for JobMaterials." }, "quantity": { "type": "string", "description": "The quantity shown for the bundle line item on the invoice. Must be greater than zero. The quantity of each JobMaterial within the bundle is determined by dividing by this value." }, "sort_order": { "type": "integer", "description": "Defines the display order of the JobMaterialBundle relative to other JobMaterials and JobMaterialBundles on the Job. Lower values are displayed first." }, "material_bundle_uuid": { "format": "uuid", "example": "123e4567-f0d0-4285-a620-23f946daf53b", "type": "string", "description": "UUID of the MaterialBundle which this JobMaterialBundle was originally created from." }, "job_uuid": { "format": "uuid", "example": "123e4567-cc84-48f0-ae59-23f94554557b", "type": "string", "description": "UUID of the job that this material bundle is associated with. Links the bundle to a specific job record." } } }, "JobPayment": { "type": "object", "properties": { "job_uuid": { "description": "UUID of the job this payment is associated with. Each payment must be linked to a valid job in the system.", "format": "uuid", "example": "123e4567-52d9-4ebf-90e2-23f94becbc6b", "type": "string" }, "actioned_by_uuid": { "description": "UUID of the staff member who recorded or processed this payment. Used for tracking which staff member handled the transaction.", "format": "uuid", "example": "123e4567-8da6-4ee1-80d7-23f94bef2c5b", "type": "string" }, "timestamp": { "description": "The date and time when this payment was recorded or processed. Format is YYYY-MM-DD HH:MM:SS. Used for payment reconciliation and reporting.", "type": "string", "example": "2026-03-01 12:00:00" }, "amount": { "description": "The payment amount in the account's currency.", "type": "string" }, "method": { "description": "The payment method used for this transaction. Examples include 'Cash', 'Credit Card', 'Bank Transfer', 'Stripe', etc.", "type": "string" }, "note": { "description": "Optional text field for storing additional information about the payment. Can be used to record reference numbers, transaction IDs, or other payment-specific details.", "type": "string" }, "attachment_uuid": { "description": "UUID linking to a stored attachment related to this payment, such as a receipt image. This is an optional reference to an Attachment record.", "format": "uuid", "example": "123e4567-87d1-48a8-b9eb-23f94e2b2dbb", "type": "string" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-94c7-49a9-bdc8-23f942f1a29b", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "is_deposit": { "type": "integer", "description": "Boolean flag indicating whether this payment represents a deposit against future work (true) rather than a payment for completed work (false). Read-only in the API. (Read only). Valid values are [0,1]", "enum": [ 0, 1 ] } } }, "JobPaymentCreate": { "type": "object", "properties": { "job_uuid": { "description": "UUID of the job this payment is associated with. Each payment must be linked to a valid job in the system.", "format": "uuid", "example": "123e4567-7a73-4e8b-8b79-23f9426e19eb", "type": "string" }, "actioned_by_uuid": { "description": "UUID of the staff member who recorded or processed this payment. Used for tracking which staff member handled the transaction.", "format": "uuid", "example": "123e4567-054b-4281-8dc1-23f94dabec6b", "type": "string" }, "timestamp": { "description": "The date and time when this payment was recorded or processed. Format is YYYY-MM-DD HH:MM:SS. Used for payment reconciliation and reporting.", "type": "string", "example": "2026-03-01 12:00:00" }, "amount": { "description": "The payment amount in the account's currency.", "type": "string" }, "method": { "description": "The payment method used for this transaction. Examples include 'Cash', 'Credit Card', 'Bank Transfer', 'Stripe', etc.", "type": "string" }, "note": { "description": "Optional text field for storing additional information about the payment. Can be used to record reference numbers, transaction IDs, or other payment-specific details.", "type": "string" }, "attachment_uuid": { "description": "UUID linking to a stored attachment related to this payment, such as a receipt image. This is an optional reference to an Attachment record.", "format": "uuid", "example": "123e4567-c48c-46e4-98a5-23f947b3a76b", "type": "string" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-383d-4b1e-8e1e-23f945734a2b", "type": "string" } } }, "JobTemplate": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-4d93-4f0c-9429-23f947cc7b9b", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "name": { "type": "string" } } }, "JobTemplateCreate": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-eb1f-467f-9f62-23f948625feb", "type": "string" }, "name": { "type": "string" } } }, "KnowledgeArticle": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-4845-482f-a7ef-23f94fb23ebb", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "name": { "type": "string", "description": "Title of the knowledge article. This is a mandatory field with a maximum length of 100 characters. Used for identifying and searching for articles in the knowledge base." }, "content": { "type": "string", "description": "The main content of the knowledge article. For 'richtext' and 'pdf' articles, this contains HTML formatted text. For 'video' articles, this may contain supplementary information. For 'call' articles, this contains call details. Supports extended text length." }, "article_type": { "type": "string", "description": "Type of knowledge article. Valid values are 'video', 'richtext', 'pdf', or 'call'. This determines how the article content is presented and processed in the system." }, "tags": { "type": "string", "description": "Comma-separated list of tags associated with this knowledge article. Maximum length is 2000 characters. Tags are used for categorization, searching, and automatic relationship generation with other objects like Services, Materials, and Companies." }, "relationships": { "type": "array", "description": "JSON array of manually created relationships between this knowledge article and other objects. Contains objects with properties: object_name (e.g., 'job'), object_uuid (the related object's UUID), object_description (a description of the related object), and create_date. Used to associate articles with specific jobs or other system objects.", "items": { "type": "object", "properties": { "object_name": { "type": "string", "enum": [ "Job", "job" ] }, "object_uuid": { "type": "string", "format": "uuid" }, "object_description": { "type": "string" }, "create_date": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}\\ \\d{2}:\\d{2}:\\d{2}$" } }, "required": [ "object_name", "object_uuid" ] } } }, "required": [ "name" ] }, "KnowledgeArticleCreate": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-835b-490f-a521-23f94a1d1efb", "type": "string" }, "name": { "type": "string", "description": "Title of the knowledge article. This is a mandatory field with a maximum length of 100 characters. Used for identifying and searching for articles in the knowledge base." }, "content": { "type": "string", "description": "The main content of the knowledge article. For 'richtext' and 'pdf' articles, this contains HTML formatted text. For 'video' articles, this may contain supplementary information. For 'call' articles, this contains call details. Supports extended text length." }, "article_type": { "type": "string", "description": "Type of knowledge article. Valid values are 'video', 'richtext', 'pdf', or 'call'. This determines how the article content is presented and processed in the system." }, "tags": { "type": "string", "description": "Comma-separated list of tags associated with this knowledge article. Maximum length is 2000 characters. Tags are used for categorization, searching, and automatic relationship generation with other objects like Services, Materials, and Companies." }, "relationships": { "type": "array", "description": "JSON array of manually created relationships between this knowledge article and other objects. Contains objects with properties: object_name (e.g., 'job'), object_uuid (the related object's UUID), object_description (a description of the related object), and create_date. Used to associate articles with specific jobs or other system objects.", "items": { "type": "object", "properties": { "object_name": { "type": "string", "enum": [ "Job", "job" ] }, "object_uuid": { "type": "string", "format": "uuid" }, "object_description": { "type": "string" }, "create_date": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}\\ \\d{2}:\\d{2}:\\d{2}$" } }, "required": [ "object_name", "object_uuid" ] } } }, "required": [ "name" ] }, "Location": { "type": "object", "properties": { "name": { "description": "Location's name", "type": "string", "maxLength": 50 }, "line1": { "description": "First line of the location's address. Contains the street number and street name.", "type": "string", "maxLength": 100 }, "line2": { "description": "Second line of the location's address. Used for additional address information such as building/suite numbers or street details.", "type": "string", "maxLength": 100 }, "line3": { "description": "Third line of the location's address. Used for additional address details when line1 and line2 are not sufficient.", "type": "string", "maxLength": 100 }, "city": { "description": "Email Address", "type": "string", "maxLength": 50 }, "country": { "description": "Email Address", "type": "string", "maxLength": 100 }, "post_code": { "description": "Email Address", "type": "string", "maxLength": 100 }, "phone_1": { "description": "Primary contact phone number for the location. Can include formatting characters.", "type": "string", "maxLength": 100 }, "state": { "description": "Address State", "type": "string", "maxLength": 400 }, "lng": { "description": "Longitude coordinate of the location in decimal degrees format. Used for geolocation and distance calculations. Expected range is between -180 and 180 degrees.", "type": "number", "format": "float" }, "lat": { "description": "Latitude coordinate of the location in decimal degrees format. Used for geolocation and distance calculations. Expected range is between -90 and 90 degrees.", "type": "number", "format": "float" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-1181-47f1-8ff1-23f94f3cd92b", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" } }, "required": [ "name" ] }, "LocationCreate": { "type": "object", "properties": { "name": { "description": "Location's name", "type": "string", "maxLength": 50 }, "line1": { "description": "First line of the location's address. Contains the street number and street name.", "type": "string", "maxLength": 100 }, "line2": { "description": "Second line of the location's address. Used for additional address information such as building/suite numbers or street details.", "type": "string", "maxLength": 100 }, "line3": { "description": "Third line of the location's address. Used for additional address details when line1 and line2 are not sufficient.", "type": "string", "maxLength": 100 }, "city": { "description": "Email Address", "type": "string", "maxLength": 50 }, "country": { "description": "Email Address", "type": "string", "maxLength": 100 }, "post_code": { "description": "Email Address", "type": "string", "maxLength": 100 }, "phone_1": { "description": "Primary contact phone number for the location. Can include formatting characters.", "type": "string", "maxLength": 100 }, "state": { "description": "Address State", "type": "string", "maxLength": 400 }, "lng": { "description": "Longitude coordinate of the location in decimal degrees format. Used for geolocation and distance calculations. Expected range is between -180 and 180 degrees.", "type": "number", "format": "float" }, "lat": { "description": "Latitude coordinate of the location in decimal degrees format. Used for geolocation and distance calculations. Expected range is between -90 and 90 degrees.", "type": "number", "format": "float" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-566e-4aaf-8e39-23f948a5dbbb", "type": "string" } }, "required": [ "name" ] }, "Material": { "type": "object", "properties": { "name": { "description": "Name of the material, product or labour rate. The maximum length varies based on accounting package integration 30-100 characters for standard mode, up to 2000 characters for description billing mode. Required field that identifies the material in inventory lists, job forms, and invoices.", "type": "string", "maxLength": 70 }, "item_number": { "description": "Unique identifier code for the material. max length. Must be unique within an account.", "type": "string", "maxLength": 30 }, "price": { "description": "The selling price of the material. May include or exclude tax based on the price_includes_taxes field. Used as the default price when adding this material to jobs and generating invoices.", "type": "string" }, "cost": { "description": "The purchase cost of the material. May include or exclude tax depending on the price_includes_taxes setting. Used for profit calculations and reporting. This field may be hidden from users without appropriate permissions.", "type": "string" }, "quantity_in_stock": { "description": "The current inventory quantity of this material available in stock. Stored as a numeric value with decimal support. Updated automatically when materials are used in jobs or when inventory is manually adjusted. Only tracked if item_is_inventoried is enabled.", "type": "number" }, "price_includes_taxes": { "description": "Boolean flag indicating whether the price and cost values include tax (1/true) or exclude tax (0/false). Controls tax calculations when determining final pricing. New materials inherit this setting from the account's default tax display preference.. Valid values are [0,1]", "type": "integer", "enum": [ 0, 1 ] }, "barcode": { "description": "The barcode identifier for the material. Can store UPC, EAN, or other barcode formats. Used for inventory scanning and quick material lookup in the mobile app.", "type": "string" }, "item_is_inventoried": { "description": "Boolean flag indicating whether inventory tracking is enabled for this material (1/true) or disabled (0/false). When enabled, the quantity_in_stock is tracked and updated automatically when the material is used in jobs. Only physical products typically have this enabled.. Valid values are [0,1]", "type": "integer", "enum": [ 0, 1 ] }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-57a0-4a2c-8db1-23f9492390ab", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "item_description": { "type": "string" }, "use_description_for_invoicing": { "type": "string" }, "tax_rate_uuid": { "format": "uuid", "example": "123e4567-88ad-46f6-bbbd-23f942c60c4b", "type": "string" } }, "required": [ "name" ] }, "MaterialCreate": { "type": "object", "properties": { "name": { "description": "Name of the material, product or labour rate. The maximum length varies based on accounting package integration 30-100 characters for standard mode, up to 2000 characters for description billing mode. Required field that identifies the material in inventory lists, job forms, and invoices.", "type": "string", "maxLength": 70 }, "item_number": { "description": "Unique identifier code for the material. max length. Must be unique within an account.", "type": "string", "maxLength": 30 }, "price": { "description": "The selling price of the material. May include or exclude tax based on the price_includes_taxes field. Used as the default price when adding this material to jobs and generating invoices.", "type": "string" }, "cost": { "description": "The purchase cost of the material. May include or exclude tax depending on the price_includes_taxes setting. Used for profit calculations and reporting. This field may be hidden from users without appropriate permissions.", "type": "string" }, "quantity_in_stock": { "description": "The current inventory quantity of this material available in stock. Stored as a numeric value with decimal support. Updated automatically when materials are used in jobs or when inventory is manually adjusted. Only tracked if item_is_inventoried is enabled.", "type": "number" }, "price_includes_taxes": { "description": "Boolean flag indicating whether the price and cost values include tax (1/true) or exclude tax (0/false). Controls tax calculations when determining final pricing. New materials inherit this setting from the account's default tax display preference.. Valid values are [0,1]", "type": "integer", "enum": [ 0, 1 ] }, "barcode": { "description": "The barcode identifier for the material. Can store UPC, EAN, or other barcode formats. Used for inventory scanning and quick material lookup in the mobile app.", "type": "string" }, "item_is_inventoried": { "description": "Boolean flag indicating whether inventory tracking is enabled for this material (1/true) or disabled (0/false). When enabled, the quantity_in_stock is tracked and updated automatically when the material is used in jobs. Only physical products typically have this enabled.. Valid values are [0,1]", "type": "integer", "enum": [ 0, 1 ] }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-0719-4932-bd73-23f945fd0dab", "type": "string" }, "item_description": { "type": "string" }, "use_description_for_invoicing": { "type": "string" }, "tax_rate_uuid": { "format": "uuid", "example": "123e4567-ca58-48a3-9a03-23f945b3507b", "type": "string" } }, "required": [ "name" ] }, "MaterialBundle": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-b6d8-4938-9093-23f94402363b", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "item_number": { "type": "string", "description": "Unique identifier for this bundle. Must be 30 characters or less and unique across both Materials and Bundles. Used when adding bundles to jobs.", "maxLength": 30 }, "name": { "type": "string", "description": "The display name of the bundle. Used for identification in the system and shows on documents when the bundle is added to a job." }, "material_list": { "type": "array", "description": "A JSON array containing the materials that make up this bundle. Each item includes the material's UUID, quantity, and optional sort_order. Limited to between 1 and 50 items, with all quantities being positive numbers.", "items": { "type": "object", "properties": { "uuid": { "type": "string", "format": "uuid", "description": "Must be the UUID of a Material record" }, "quantity": { "type": "number", "minimum": 0 }, "sort_order": { "type": "integer", "description": "Optional sort order for materials in the bundle" } }, "required": [ "uuid", "quantity" ] }, "minItems": 1, "maxItems": 50 } }, "required": [ "item_number" ] }, "MaterialBundleCreate": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-0d80-4db2-bf22-23f94628766b", "type": "string" }, "item_number": { "type": "string", "description": "Unique identifier for this bundle. Must be 30 characters or less and unique across both Materials and Bundles. Used when adding bundles to jobs.", "maxLength": 30 }, "name": { "type": "string", "description": "The display name of the bundle. Used for identification in the system and shows on documents when the bundle is added to a job." }, "material_list": { "type": "array", "description": "A JSON array containing the materials that make up this bundle. Each item includes the material's UUID, quantity, and optional sort_order. Limited to between 1 and 50 items, with all quantities being positive numbers.", "items": { "type": "object", "properties": { "uuid": { "type": "string", "format": "uuid", "description": "Must be the UUID of a Material record" }, "quantity": { "type": "number", "minimum": 0 }, "sort_order": { "type": "integer", "description": "Optional sort order for materials in the bundle" } }, "required": [ "uuid", "quantity" ] }, "minItems": 1, "maxItems": 50 } }, "required": [ "item_number" ] }, "Note": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-6ef3-4986-a5e9-23f94da9d67b", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "related_object": { "type": "string" }, "related_object_uuid": { "format": "uuid", "example": "123e4567-3e1d-4e35-b83e-23f9474d31fb", "type": "string" }, "note": { "type": "string" }, "action_required": { "type": "string" }, "action_completed_by_staff_uuid": { "format": "uuid", "example": "123e4567-25a6-486c-89c8-23f9482ca2db", "type": "string" }, "edit_by_staff_uuid": { "format": "uuid", "example": "123e4567-1cca-415d-a8e2-23f945b752eb", "readOnly": true, "description": "UUID of Staff Member who last modified record" }, "create_date": { "example": "2026-03-01 12:00:00", "description": "Timestamp at which record was last modified" } } }, "NoteCreate": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-e987-4c15-8af5-23f948cf3d7b", "type": "string" }, "related_object": { "type": "string" }, "related_object_uuid": { "format": "uuid", "example": "123e4567-c33e-4f75-b941-23f9419f61bb", "type": "string" }, "note": { "type": "string" }, "action_required": { "type": "string" }, "action_completed_by_staff_uuid": { "format": "uuid", "example": "123e4567-f36e-4657-933d-23f945f1fdab", "type": "string" }, "edit_by_staff_uuid": { "format": "uuid", "example": "123e4567-6b41-43bf-a15e-23f94969bfab", "readOnly": true, "description": "UUID of Staff Member who last modified record" }, "create_date": { "example": "2026-03-01 12:00:00", "description": "Timestamp at which record was last modified" } } }, "Queue": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-5beb-4509-ab83-23f94417339b", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "name": { "type": "string", "description": "Name of the job queue. Used to identify the queue in the system. Examples include 'Workshop', 'Pending Quotes', etc." }, "default_timeframe": { "type": "integer", "description": "Default number of days that jobs should remain in this queue before requiring attention. Common values are 7 days (1 week) or 14 days (2 weeks)." }, "subscribed_staff": { "type": "string", "description": "Semicolon-delimited list of staff UUIDs who are subscribed to receive notifications for this queue." }, "requires_assignment": { "type": "integer", "description": "Determines if jobs in this queue require assignment to staff members. If true, jobs must be explicitly assigned to staff. If false, jobs are visible to all staff.. Valid values are [0,1]", "enum": [ 0, 1 ] } } }, "QueueCreate": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-71e5-45f7-b2e4-23f94dc2684b", "type": "string" }, "name": { "type": "string", "description": "Name of the job queue. Used to identify the queue in the system. Examples include 'Workshop', 'Pending Quotes', etc." }, "default_timeframe": { "type": "integer", "description": "Default number of days that jobs should remain in this queue before requiring attention. Common values are 7 days (1 week) or 14 days (2 weeks)." }, "subscribed_staff": { "type": "string", "description": "Semicolon-delimited list of staff UUIDs who are subscribed to receive notifications for this queue." }, "requires_assignment": { "type": "integer", "description": "Determines if jobs in this queue require assignment to staff members. If true, jobs must be explicitly assigned to staff. If false, jobs are visible to all staff.. Valid values are [0,1]", "enum": [ 0, 1 ] } } }, "SecurityRole": { "type": "object", "properties": { "name": { "description": "The name given to the security role", "type": "string", "maxLength": 50 }, "role_description": { "description": "A detailed description of the security role's purpose and permissions. This field provides information about what access and capabilities are granted to users assigned this role.", "type": "string" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-971c-409a-af66-23f944f46cab", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" } }, "required": [ "name" ] }, "SecurityRoleCreate": { "type": "object", "properties": { "name": { "description": "The name given to the security role", "type": "string", "maxLength": 50 }, "role_description": { "description": "A detailed description of the security role's purpose and permissions. This field provides information about what access and capabilities are granted to users assigned this role.", "type": "string" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-0f83-436e-b942-23f94a182b8b", "type": "string" } }, "required": [ "name" ] }, "SmsTemplate": { "type": "object", "properties": { "name": { "description": "The name of the SMS template. This is a unique identifier for the template within the system. Examples include 'Tech Delayed Template', 'Parts Ordered Template', etc.", "type": "string", "maxLength": 50 }, "message": { "description": "The SMS message content that will be sent to recipients. Supports template variables like {job.contact_first}, {vendor.name}, {job.generated_job_id}, {job.total_price}, etc. Maximum length is determined by the SMS service provider's limit. Messages exceeding this limit will not be saved.", "type": "string", "maxLength": 612 }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-b796-4412-94b4-23f940da1dcb", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" } }, "required": [ "name" ] }, "SmsTemplateCreate": { "type": "object", "properties": { "name": { "description": "The name of the SMS template. This is a unique identifier for the template within the system. Examples include 'Tech Delayed Template', 'Parts Ordered Template', etc.", "type": "string", "maxLength": 50 }, "message": { "description": "The SMS message content that will be sent to recipients. Supports template variables like {job.contact_first}, {vendor.name}, {job.generated_job_id}, {job.total_price}, etc. Maximum length is determined by the SMS service provider's limit. Messages exceeding this limit will not be saved.", "type": "string", "maxLength": 612 }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-78d5-45cb-9489-23f945ba341b", "type": "string" } }, "required": [ "name" ] }, "Staff": { "type": "object", "properties": { "first": { "description": "Staff First Name", "type": "string", "maxLength": 30 }, "last": { "description": "Staff Last Name", "type": "string", "maxLength": 30 }, "email": { "description": "Staff Email Address. This is also your login name.", "format": "email", "type": "string" }, "mobile": { "description": "Mobile phone number of the staff member. Used for SMS communications and identification when calling.", "type": "string" }, "lng": { "description": "Longitude coordinate of the staff member's current or last known location. Used for tracking staff locations and calculating routes and travel distances.", "type": "number", "format": "float" }, "lat": { "description": "Latitude coordinate of the staff member's current or last known location. Used for tracking staff locations and calculating routes and travel distances.", "type": "number", "format": "float" }, "geo_timestamp": { "description": "The date and time when the staff member's geographic location (lat/lng) was last updated. Format is YYYY-MM-DD HH:MM:SS. Used to determine how recent the location data is.", "example": "2026-03-01 12:00:00", "type": "string" }, "job_title": { "description": "The staff member's job title or role within the organization. Used for organizational purposes and displayed in various places throughout the system.", "type": "string" }, "navigating_to_job_uuid": { "description": "UUID of the job the staff member is currently navigating to. Used to track which job a staff member is traveling toward.", "format": "uuid", "example": "123e4567-11b0-4089-8ab2-23f9484d54ab", "type": "string" }, "navigating_timestamp": { "description": "The date and time when the staff member started navigating to a job. Format is YYYY-MM-DD HH:MM:SS. Used to track when navigation began.", "example": "2026-03-01 12:00:00", "type": "string" }, "navigating_expiry_timestamp": { "description": "The date and time when navigation to a job is expected to complete or expire. Format is YYYY-MM-DD HH:MM:SS. Used to determine if navigation is still active.", "example": "2026-03-01 12:00:00", "type": "string" }, "color": { "description": "The color assigned to this staff member, represented as a hex color code. Used for visual identification in the schedule, dispatch board, and other interfaces.", "type": "string" }, "custom_icon_url": { "description": "DEPRECATED" }, "status_message": { "description": "Short message summarising the staff's current status.", "type": "string" }, "status_message_timestamp": { "description": "The date and time when the staff member's status message was last updated. Format is YYYY-MM-DD HH:MM:SS. Used to determine how recent the status message is.", "example": "2026-03-01 12:00:00", "type": "string" }, "hide_from_schedule": { "description": "Boolean flag controlling whether this staff member appears in the schedule view. When true (1), the staff member is hidden from the schedule. When false (0), they appear normally in scheduling interfaces.. Valid values are [0,1]", "type": "integer", "enum": [ 0, 1 ] }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-9fa9-46c2-9e1d-23f94b3418fb", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "can_receive_push_notification": { "type": "string" }, "security_role_uuid": { "format": "uuid", "example": "123e4567-4ff4-4f95-8521-23f9452e9a2b", "type": "string" }, "labour_material_uuid": { "format": "uuid", "example": "123e4567-5c47-4d54-b8e7-23f94882c18b", "type": "string" } }, "required": [ "first", "last", "email" ] }, "StaffCreate": { "type": "object", "properties": { "first": { "description": "Staff First Name", "type": "string", "maxLength": 30 }, "last": { "description": "Staff Last Name", "type": "string", "maxLength": 30 }, "email": { "description": "Staff Email Address. This is also your login name.", "format": "email", "type": "string" }, "mobile": { "description": "Mobile phone number of the staff member. Used for SMS communications and identification when calling.", "type": "string" }, "lng": { "description": "Longitude coordinate of the staff member's current or last known location. Used for tracking staff locations and calculating routes and travel distances.", "type": "number", "format": "float" }, "lat": { "description": "Latitude coordinate of the staff member's current or last known location. Used for tracking staff locations and calculating routes and travel distances.", "type": "number", "format": "float" }, "geo_timestamp": { "description": "The date and time when the staff member's geographic location (lat/lng) was last updated. Format is YYYY-MM-DD HH:MM:SS. Used to determine how recent the location data is.", "example": "2026-03-01 12:00:00", "type": "string" }, "job_title": { "description": "The staff member's job title or role within the organization. Used for organizational purposes and displayed in various places throughout the system.", "type": "string" }, "navigating_to_job_uuid": { "description": "UUID of the job the staff member is currently navigating to. Used to track which job a staff member is traveling toward.", "format": "uuid", "example": "123e4567-36f6-43f9-9e5e-23f94b960ebb", "type": "string" }, "navigating_timestamp": { "description": "The date and time when the staff member started navigating to a job. Format is YYYY-MM-DD HH:MM:SS. Used to track when navigation began.", "example": "2026-03-01 12:00:00", "type": "string" }, "navigating_expiry_timestamp": { "description": "The date and time when navigation to a job is expected to complete or expire. Format is YYYY-MM-DD HH:MM:SS. Used to determine if navigation is still active.", "example": "2026-03-01 12:00:00", "type": "string" }, "color": { "description": "The color assigned to this staff member, represented as a hex color code. Used for visual identification in the schedule, dispatch board, and other interfaces.", "type": "string" }, "custom_icon_url": { "description": "DEPRECATED" }, "status_message": { "description": "Short message summarising the staff's current status.", "type": "string" }, "status_message_timestamp": { "description": "The date and time when the staff member's status message was last updated. Format is YYYY-MM-DD HH:MM:SS. Used to determine how recent the status message is.", "example": "2026-03-01 12:00:00", "type": "string" }, "hide_from_schedule": { "description": "Boolean flag controlling whether this staff member appears in the schedule view. When true (1), the staff member is hidden from the schedule. When false (0), they appear normally in scheduling interfaces.. Valid values are [0,1]", "type": "integer", "enum": [ 0, 1 ] }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-9d5c-42e8-b767-23f9483bb5fb", "type": "string" }, "can_receive_push_notification": { "type": "string" }, "security_role_uuid": { "format": "uuid", "example": "123e4567-9d7d-4185-ab9c-23f94afa452b", "type": "string" }, "labour_material_uuid": { "format": "uuid", "example": "123e4567-2b10-4d9e-abea-23f946dd59fb", "type": "string" } }, "required": [ "first", "last", "email" ] }, "StaffMessage": { "type": "object", "properties": { "from_staff_uuid": { "description": "Unique identifier (UUID) of the staff member who sent this message. Identifies the sender of the communication within the system.", "format": "uuid", "example": "123e4567-ea0f-4b85-a876-23f943f26c6b", "type": "string" }, "to_staff_uuid": { "description": "Unique identifier (UUID) of the staff member who received this message. Identifies the intended recipient of the communication.", "format": "uuid", "example": "123e4567-2507-4025-837a-23f94a6d8e5b", "type": "string" }, "sent_timestamp": { "description": "The date and time when the message was sent. Format is YYYY-MM-DD HH:MM:SS. This field is automatically set to the current time when a new message is created.", "example": "2026-03-01 12:00:00", "type": "string" }, "delivered_timestamp": { "description": "The date and time when the message was delivered to the recipient's device. Format is YYYY-MM-DD HH:MM:SS. This field may be null if delivery confirmation is not available.", "example": "2026-03-01 12:00:00", "type": "string" }, "read_timestamp": { "description": "The date and time when the message was read by the recipient. Format is YYYY-MM-DD HH:MM:SS. This field may be null if the message has not been read or if read receipts are not available.", "example": "2026-03-01 12:00:00", "type": "string" }, "message": { "description": "The text content of the message. Supports Unicode characters for international language support. This field contains the actual message being sent between staff members.", "type": "string" }, "regarding_job_uuid": { "description": "Unique identifier (UUID) of the job this message is related to. Optional field that links the message to a specific job for context. This field may be null if the message is not related to a specific job.", "format": "uuid", "example": "123e4567-eaa4-4b56-b032-23f94789c1fb", "type": "string" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-58f2-4245-9114-23f9431fd34b", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "attached_json": { "type": "string" } } }, "StaffMessageCreate": { "type": "object", "properties": { "from_staff_uuid": { "description": "Unique identifier (UUID) of the staff member who sent this message. Identifies the sender of the communication within the system.", "format": "uuid", "example": "123e4567-db4b-4b67-9a3c-23f94d686a3b", "type": "string" }, "to_staff_uuid": { "description": "Unique identifier (UUID) of the staff member who received this message. Identifies the intended recipient of the communication.", "format": "uuid", "example": "123e4567-36d3-4ea6-98b9-23f94cd98f0b", "type": "string" }, "sent_timestamp": { "description": "The date and time when the message was sent. Format is YYYY-MM-DD HH:MM:SS. This field is automatically set to the current time when a new message is created.", "example": "2026-03-01 12:00:00", "type": "string" }, "delivered_timestamp": { "description": "The date and time when the message was delivered to the recipient's device. Format is YYYY-MM-DD HH:MM:SS. This field may be null if delivery confirmation is not available.", "example": "2026-03-01 12:00:00", "type": "string" }, "read_timestamp": { "description": "The date and time when the message was read by the recipient. Format is YYYY-MM-DD HH:MM:SS. This field may be null if the message has not been read or if read receipts are not available.", "example": "2026-03-01 12:00:00", "type": "string" }, "message": { "description": "The text content of the message. Supports Unicode characters for international language support. This field contains the actual message being sent between staff members.", "type": "string" }, "regarding_job_uuid": { "description": "Unique identifier (UUID) of the job this message is related to. Optional field that links the message to a specific job for context. This field may be null if the message is not related to a specific job.", "format": "uuid", "example": "123e4567-5251-474e-8fb8-23f9484328cb", "type": "string" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-c00b-4d12-bc4d-23f941bae2eb", "type": "string" }, "attached_json": { "type": "string" } } }, "Supplier": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-795b-4d35-b3f2-23f94676197b", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "name": { "type": "string", "description": "The name of the supplier company" }, "business_number": { "type": "string", "description": "Business registration number (e.g., ABN, EIN)" }, "address": { "type": "string", "description": "Physical address of the supplier store" }, "email": { "format": "email", "type": "string", "description": "Primary contact email address" }, "phone": { "type": "string", "description": "Primary contact phone number" }, "account_number": { "type": "string", "description": "Your account number with this supplier" }, "lng": { "type": "number", "format": "float", "description": "Longitude coordinate of the supplier's address (Read only)" }, "lat": { "type": "number", "format": "float", "description": "Latitude coordinate of the supplier's address (Read only)" }, "geo_is_valid": { "type": "integer", "description": "Whether the geocoded coordinates are valid (Read only). Valid values are [0,1]", "enum": [ 0, 1 ] }, "geo_country": { "type": "string", "description": "Country from geocoded address (Read only)" }, "geo_postcode": { "type": "string", "description": "Postcode from geocoded address (Read only)" }, "geo_state": { "type": "string", "description": "State from geocoded address (Read only)" }, "geo_city": { "type": "string", "description": "City from geocoded address (Read only)" }, "geo_street": { "type": "string", "description": "Street name from geocoded address (Read only)" }, "geo_number": { "type": "string", "description": "Street number from geocoded address (Read only)" } } }, "SupplierCreate": { "type": "object", "properties": { "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-827b-4718-855f-23f94cee909b", "type": "string" }, "name": { "type": "string", "description": "The name of the supplier company" }, "business_number": { "type": "string", "description": "Business registration number (e.g., ABN, EIN)" }, "address": { "type": "string", "description": "Physical address of the supplier store" }, "email": { "format": "email", "type": "string", "description": "Primary contact email address" }, "phone": { "type": "string", "description": "Primary contact phone number" }, "account_number": { "type": "string", "description": "Your account number with this supplier" } } }, "Task": { "type": "object", "properties": { "due_date": { "description": "The date by which the task should be completed. Format is YYYY-MM-DD. For mobile app compatibility, may be returned with time component (HHMMSS) in some contexts.", "example": "YYYY-MM-DD", "type": "string" }, "task_details": { "description": "Detailed description of the task. Contains more comprehensive information about what needs to be done, how to complete the task, or any other relevant notes.", "type": "string" }, "name": { "description": "The name or title of the task. This field is mandatory and used to identify the task in listings and the user interface.", "type": "string" }, "related_object": { "description": "The name of the object class this task is related to. Must be a valid object class name in the system (e.g., 'job', 'client', etc.). The value is always stored as lowercase regardless of input case.", "type": "string" }, "related_object_uuid": { "description": "UUID of the specific object instance this task is related to. Must be a valid UUID corresponding to an existing object of the type specified in related_object.", "format": "uuid", "example": "123e4567-2fe0-47f9-9ba2-23f94c9b0eab", "type": "string" }, "task_complete": { "description": "Boolean flag indicating whether the task has been completed (1) or is still pending (0). When set to 1, the completed_timestamp and completed_by_staff_uuid fields are automatically populated.", "type": "string" }, "completed_timestamp": { "description": "The date and time when the task was marked as complete. Format is YYYY-MM-DD HH:MM:SS. Automatically set when task_complete is changed to 1.", "example": "2026-03-01 12:00:00", "type": "string" }, "completed_by_staff_uuid": { "description": "UUID of the staff member who marked the task as complete. Automatically set to the current staff member's UUID when task_complete is changed to 1.", "format": "uuid", "example": "123e4567-906b-40e0-af57-23f94565949b", "type": "string" }, "assigned_to_staff_uuid": { "description": "UUID of the staff member assigned to complete this task. Must be a valid staff UUID in the system.", "format": "uuid", "example": "123e4567-ba43-4895-b2e2-23f94075142b", "type": "string" }, "lng": { "description": "DEPRECATED" }, "lat": { "description": "DEPRECATED" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-42b2-4942-8e58-23f948bd71cb", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "created_by_staff_uuid": { "format": "uuid", "example": "123e4567-a9e6-4c80-a01c-23f94945192b", "type": "string" }, "create_date": { "example": "2026-03-01 12:00:00", "description": "Timestamp at which record was last modified" } }, "required": [ "name" ] }, "TaskCreate": { "type": "object", "properties": { "due_date": { "description": "The date by which the task should be completed. Format is YYYY-MM-DD. For mobile app compatibility, may be returned with time component (HHMMSS) in some contexts.", "example": "YYYY-MM-DD", "type": "string" }, "task_details": { "description": "Detailed description of the task. Contains more comprehensive information about what needs to be done, how to complete the task, or any other relevant notes.", "type": "string" }, "name": { "description": "The name or title of the task. This field is mandatory and used to identify the task in listings and the user interface.", "type": "string" }, "related_object": { "description": "The name of the object class this task is related to. Must be a valid object class name in the system (e.g., 'job', 'client', etc.). The value is always stored as lowercase regardless of input case.", "type": "string" }, "related_object_uuid": { "description": "UUID of the specific object instance this task is related to. Must be a valid UUID corresponding to an existing object of the type specified in related_object.", "format": "uuid", "example": "123e4567-3b3a-4674-84a1-23f94ede2f5b", "type": "string" }, "task_complete": { "description": "Boolean flag indicating whether the task has been completed (1) or is still pending (0). When set to 1, the completed_timestamp and completed_by_staff_uuid fields are automatically populated.", "type": "string" }, "completed_timestamp": { "description": "The date and time when the task was marked as complete. Format is YYYY-MM-DD HH:MM:SS. Automatically set when task_complete is changed to 1.", "example": "2026-03-01 12:00:00", "type": "string" }, "completed_by_staff_uuid": { "description": "UUID of the staff member who marked the task as complete. Automatically set to the current staff member's UUID when task_complete is changed to 1.", "format": "uuid", "example": "123e4567-336e-4418-87d5-23f94cf2cf7b", "type": "string" }, "assigned_to_staff_uuid": { "description": "UUID of the staff member assigned to complete this task. Must be a valid staff UUID in the system.", "format": "uuid", "example": "123e4567-e2ed-47fc-87b3-23f94dda813b", "type": "string" }, "lng": { "description": "DEPRECATED" }, "lat": { "description": "DEPRECATED" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-d970-4552-8da0-23f948fc411b", "type": "string" }, "created_by_staff_uuid": { "format": "uuid", "example": "123e4567-8efe-42ae-85e6-23f94b87ec5b", "type": "string" }, "create_date": { "example": "2026-03-01 12:00:00", "description": "Timestamp at which record was last modified" } }, "required": [ "name" ] }, "TaxRate": { "type": "object", "properties": { "name": { "description": "Name of the tax rate used for identification. Examples include 'GST', 'VAT', 'Sales Tax', etc. ", "type": "string", "maxLength": 50 }, "amount": { "description": "The tax rate percentage value (stored as a decimal value). For example, 10 for a 10% tax rate. Used in calculations to determine tax amounts for invoices and quotes.", "type": "string" }, "is_default_tax_rate": { "description": "Boolean flag indicating whether this tax rate is the system default (true) or not (false). Only one tax rate can be marked as default at any time. The default tax rate is automatically applied to new line items when no specific tax rate is selected.. Valid values are [0,1]", "type": "integer", "enum": [ 0, 1 ] }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-849d-4753-b124-23f946a2134b", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" } }, "required": [ "name" ] }, "TaxRateCreate": { "type": "object", "properties": { "name": { "description": "Name of the tax rate used for identification. Examples include 'GST', 'VAT', 'Sales Tax', etc. ", "type": "string", "maxLength": 50 }, "amount": { "description": "The tax rate percentage value (stored as a decimal value). For example, 10 for a 10% tax rate. Used in calculations to determine tax amounts for invoices and quotes.", "type": "string" }, "is_default_tax_rate": { "description": "Boolean flag indicating whether this tax rate is the system default (true) or not (false). Only one tax rate can be marked as default at any time. The default tax rate is automatically applied to new line items when no specific tax rate is selected.. Valid values are [0,1]", "type": "integer", "enum": [ 0, 1 ] }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-1861-46a0-bda4-23f94014608b", "type": "string" } }, "required": [ "name" ] }, "Vendor": { "type": "object", "properties": { "business_number": { "description": "The company's business identification number as required by the local tax authority. For example, ABN in Australia, EIN in the USA, VAT number in the EU, or business registration number. Format varies by country/region.", "type": "string" }, "email": { "description": "Primary email address for the company. Used for system notifications, customer communications, and as the default sender address for emails sent from the system.", "format": "email", "type": "string" }, "email_accounts": { "description": "Accounts/billing email accounts configured for the company.", "type": "string" }, "billing_address": { "description": "The company's billing address where invoices and financial correspondence should be sent.", "type": "string" }, "accepted_payment_methods": { "description": "DEPRECATED" }, "default_region": { "description": "Default geographic region for the company. Affects currency, tax calculations, date formats, and other region-specific behaviors in the system.", "type": "string" }, "currency": { "description": "Three-letter ISO currency code (e.g., 'USD', 'AUD', 'EUR') representing the company's primary currency. Used for all financial calculations and displays in the system.", "type": "string" }, "opening_time_monday": { "description": "The minute of the day (from midnight) when the business opens on Monday. For example, 480 represents 8:00 AM (8 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "closing_time_monday": { "description": "The minute of the day (from midnight) when the business closes on Monday. For example, 1020 represents 5:00 PM (17 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "opening_time_tuesday": { "description": "The minute of the day (from midnight) when the business opens on Tuesday. For example, 480 represents 8:00 AM (8 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "closing_time_tuesday": { "description": "The minute of the day (from midnight) when the business closes on Tuesday. For example, 1020 represents 5:00 PM (17 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "opening_time_wednesday": { "description": "The minute of the day (from midnight) when the business opens on Wednesday. For example, 480 represents 8:00 AM (8 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "closing_time_wednesday": { "description": "The minute of the day (from midnight) when the business closes on Wednesday. For example, 1020 represents 5:00 PM (17 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "opening_time_thursday": { "description": "The minute of the day (from midnight) when the business opens on Thursday. For example, 480 represents 8:00 AM (8 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "closing_time_thursday": { "description": "The minute of the day (from midnight) when the business closes on Thursday. For example, 1020 represents 5:00 PM (17 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "opening_time_friday": { "description": "The minute of the day (from midnight) when the business opens on Friday. For example, 480 represents 8:00 AM (8 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "closing_time_friday": { "description": "The minute of the day (from midnight) when the business closes on Friday. For example, 1020 represents 5:00 PM (17 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "opening_time_saturday": { "description": "The minute of the day (from midnight) when the business opens on Saturday. For example, 480 represents 8:00 AM (8 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "closing_time_saturday": { "description": "The minute of the day (from midnight) when the business closes on Saturday. For example, 1020 represents 5:00 PM (17 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "opening_time_sunday": { "description": "The minute of the day (from midnight) when the business opens on Sunday. For example, 480 represents 8:00 AM (8 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "closing_time_sunday": { "description": "The minute of the day (from midnight) when the business closes on Sunday. For example, 1020 represents 5:00 PM (17 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "timezone_name": { "description": "IANA timezone name (e.g., 'America/New_York', 'Australia/Sydney') for the company's primary location. Used for date/time calculations, scheduling, and display of times across the system.", "type": "string" }, "invoice_terms": { "description": "Text describing the payment terms that appear on invoices. For example, '14 days', 'Net 30', etc. Used to communicate payment expectations to customers on invoices and financial documents.", "type": "string" }, "job_default_status": { "description": "Default status for new jobs created in the system. Valid values are 'Quote' or 'Work Order'. Controls the initial state of newly created jobs.", "type": "string" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-3627-468a-b8e0-23f9446e9adb", "type": "string" }, "active": { "enum": [ 0, 1 ], "type": "integer", "default": 1, "description": "Record active/deleted flag. Valid values are [0,1]" }, "edit_date": { "example": "2026-03-01 12:00:00", "readOnly": true, "description": "Timestamp at which record was last modified" }, "name": { "type": "string", "description": "Company Name", "maxLength": 200 }, "abn_number": { "type": "string", "description": "Company ABN Number (Australian Accounts Only)" }, "website": { "type": "string", "description": "Company Website address", "maxLength": 100 } }, "required": [ "name" ] }, "VendorCreate": { "type": "object", "properties": { "business_number": { "description": "The company's business identification number as required by the local tax authority. For example, ABN in Australia, EIN in the USA, VAT number in the EU, or business registration number. Format varies by country/region.", "type": "string" }, "email": { "description": "Primary email address for the company. Used for system notifications, customer communications, and as the default sender address for emails sent from the system.", "format": "email", "type": "string" }, "email_accounts": { "description": "Accounts/billing email accounts configured for the company.", "type": "string" }, "billing_address": { "description": "The company's billing address where invoices and financial correspondence should be sent.", "type": "string" }, "accepted_payment_methods": { "description": "DEPRECATED" }, "default_region": { "description": "Default geographic region for the company. Affects currency, tax calculations, date formats, and other region-specific behaviors in the system.", "type": "string" }, "currency": { "description": "Three-letter ISO currency code (e.g., 'USD', 'AUD', 'EUR') representing the company's primary currency. Used for all financial calculations and displays in the system.", "type": "string" }, "opening_time_monday": { "description": "The minute of the day (from midnight) when the business opens on Monday. For example, 480 represents 8:00 AM (8 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "closing_time_monday": { "description": "The minute of the day (from midnight) when the business closes on Monday. For example, 1020 represents 5:00 PM (17 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "opening_time_tuesday": { "description": "The minute of the day (from midnight) when the business opens on Tuesday. For example, 480 represents 8:00 AM (8 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "closing_time_tuesday": { "description": "The minute of the day (from midnight) when the business closes on Tuesday. For example, 1020 represents 5:00 PM (17 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "opening_time_wednesday": { "description": "The minute of the day (from midnight) when the business opens on Wednesday. For example, 480 represents 8:00 AM (8 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "closing_time_wednesday": { "description": "The minute of the day (from midnight) when the business closes on Wednesday. For example, 1020 represents 5:00 PM (17 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "opening_time_thursday": { "description": "The minute of the day (from midnight) when the business opens on Thursday. For example, 480 represents 8:00 AM (8 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "closing_time_thursday": { "description": "The minute of the day (from midnight) when the business closes on Thursday. For example, 1020 represents 5:00 PM (17 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "opening_time_friday": { "description": "The minute of the day (from midnight) when the business opens on Friday. For example, 480 represents 8:00 AM (8 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "closing_time_friday": { "description": "The minute of the day (from midnight) when the business closes on Friday. For example, 1020 represents 5:00 PM (17 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "opening_time_saturday": { "description": "The minute of the day (from midnight) when the business opens on Saturday. For example, 480 represents 8:00 AM (8 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "closing_time_saturday": { "description": "The minute of the day (from midnight) when the business closes on Saturday. For example, 1020 represents 5:00 PM (17 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "opening_time_sunday": { "description": "The minute of the day (from midnight) when the business opens on Sunday. For example, 480 represents 8:00 AM (8 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "closing_time_sunday": { "description": "The minute of the day (from midnight) when the business closes on Sunday. For example, 1020 represents 5:00 PM (17 hours \u00d7 60 minutes). Used for scheduling and availability calculations.", "type": "string" }, "timezone_name": { "description": "IANA timezone name (e.g., 'America/New_York', 'Australia/Sydney') for the company's primary location. Used for date/time calculations, scheduling, and display of times across the system.", "type": "string" }, "invoice_terms": { "description": "Text describing the payment terms that appear on invoices. For example, '14 days', 'Net 30', etc. Used to communicate payment expectations to customers on invoices and financial documents.", "type": "string" }, "job_default_status": { "description": "Default status for new jobs created in the system. Valid values are 'Quote' or 'Work Order'. Controls the initial state of newly created jobs.", "type": "string" }, "uuid": { "format": "uuid", "description": "Unique identifier for this record", "example": "123e4567-f7ff-4478-9b5d-23f94d3c656b", "type": "string" }, "name": { "type": "string", "description": "Company Name", "maxLength": 200 }, "abn_number": { "type": "string", "description": "Company ABN Number (Australian Accounts Only)" }, "website": { "type": "string", "description": "Company Website address", "maxLength": 100 } }, "required": [ "name" ] }, "InboxMessageDetail": { "allOf": [ { "$ref": "#/components/schemas/InboxMessage" }, { "type": "object", "properties": {} } ] }, "InboxMessagesResponse": { "type": "object", "properties": { "messages": { "type": "array", "items": { "$ref": "#/components/schemas/InboxMessage" } }, "pagination": { "type": "object", "properties": { "offset": { "type": "integer" }, "limit": { "type": "integer" }, "total": { "type": "integer" }, "has_more": { "type": "boolean" } } } } }, "ArchiveRequest": { "type": "object", "properties": { "archived": { "type": "boolean", "default": true }, "reason": { "type": "string", "nullable": true } } }, "SnoozeRequest": { "type": "object", "properties": { "snooze_until": { "type": "string", "format": "date-time", "nullable": true, "description": "ISO 8601 datetime to snooze until, or null to unsnooze" }, "note": { "type": "string", "nullable": true } } }, "ConvertToJobRequest": { "type": "object", "properties": { "template_uuid": { "type": "string", "format": "uuid", "nullable": true }, "note": { "type": "string", "nullable": true } } }, "ConvertToJobResponse": { "type": "object", "properties": { "success": { "type": "boolean" }, "job": { "type": "object", "properties": { "uuid": { "type": "string", "format": "uuid" }, "id": { "type": "integer" }, "job_number": { "type": "string" }, "location": { "type": "string" } } }, "message": { "type": "string" } } }, "AttachToJobRequest": { "type": "object", "required": [ "job_uuid" ], "properties": { "job_uuid": { "type": "string", "format": "uuid" } } }, "AttachToJobResponse": { "type": "object", "properties": { "success": { "type": "boolean" }, "job": { "type": "object", "properties": { "uuid": { "type": "string", "format": "uuid" }, "id": { "type": "integer" }, "location": { "type": "string" } } }, "message": { "type": "string" } } }, "AddNoteRequest": { "type": "object", "required": [ "note" ], "properties": { "note": { "type": "string", "minLength": 1 } } }, "SuccessResponse": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" } } }, "CreateInboxMessageRequest": { "type": "object", "required": [ "subject", "message_text" ], "properties": { "subject": { "type": "string", "description": "Subject of the message" }, "message_text": { "type": "string", "description": "Plain text content of the message" }, "from_name": { "type": "string", "description": "Name of the sender" }, "from_email": { "type": "string", "format": "email", "description": "Email address of the sender" }, "json_data": { "type": "object", "description": "Additional data to be used when converting the message to a job", "additionalProperties": true }, "jobData": { "type": "object", "description": "Structured job data that will be merged into json_data when converting the message to a job", "properties": { "contact_first": { "type": "string", "description": "Job contact first name" }, "contact_last": { "type": "string", "description": "Job contact last name" }, "company_name": { "type": "string", "description": "Company/customer name" }, "email": { "type": "string", "format": "email", "description": "Primary email address" }, "mobile": { "type": "string", "description": "Mobile phone number" }, "phone_1": { "type": "string", "description": "Primary phone number" }, "phone_2": { "type": "string", "description": "Secondary phone number" }, "billing_contact_first": { "type": "string", "description": "Billing contact first name" }, "billing_contact_last": { "type": "string", "description": "Billing contact last name" }, "billing_email": { "type": "string", "format": "email", "description": "Billing email address" }, "billing_mobile": { "type": "string", "description": "Billing mobile number" }, "billing_attention": { "type": "string", "description": "Billing attention line" }, "job_description": { "type": "string", "description": "Description of the job/work to be done" }, "job_address": { "type": "string", "description": "Service location address" }, "billing_address": { "type": "string", "description": "Billing address" }, "work_done_description": { "type": "string", "description": "Description of completed work" } }, "additionalProperties": false }, "regarding_company_uuid": { "type": "string", "format": "uuid", "description": "UUID of the company this message is regarding" } } }, "JobTemplateOverrides": { "type": "object", "description": "Optional field overrides when creating a job from a template. Only the following fields can be overridden: job_description, company_uuid, company_name, and job_address. Note: You cannot specify both company_uuid and company_name.", "properties": { "job_description": { "type": "string", "description": "Job description" }, "company_uuid": { "type": "string", "format": "uuid", "description": "UUID of the company/client. Cannot be used together with company_name." }, "company_name": { "type": "string", "description": "Name of the company/client. If a company with this name exists, it will be used. Otherwise, a new company will be created. Cannot be used together with company_uuid." }, "job_address": { "type": "string", "description": "Street address for the job" } }, "additionalProperties": false }, "SearchResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/SearchResult" } }, "query": { "type": "string", "description": "The search query that was used" }, "count": { "type": "integer", "description": "Number of results returned" } }, "required": [ "results", "query", "count" ] }, "ObjectSearchResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/SearchResult" } }, "query": { "type": "string", "description": "The search query that was used" }, "objectType": { "type": "string", "description": "The object type that was searched" }, "count": { "type": "integer", "description": "Number of results returned" } }, "required": [ "results", "query", "objectType", "count" ] }, "EmbeddingSearchResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/EmbeddingSearchResult" } }, "query": { "type": "string", "description": "The search query that was used" }, "count": { "type": "integer", "description": "Number of results returned" }, "searchType": { "type": "string", "description": "Type of search performed", "example": "embedding" } }, "required": [ "results", "query", "count", "searchType" ] }, "SearchResult": { "type": "object", "properties": { "uuid": { "type": "string", "format": "uuid", "description": "UUID of the found object" }, "type": { "type": "string", "description": "Type of the object", "example": "job" }, "title": { "type": "string", "description": "Title of the object" }, "highlights": { "type": "object", "description": "Highlighted text snippets that matched the query", "additionalProperties": true } }, "required": [ "uuid", "type", "title" ] }, "EmbeddingSearchResult": { "type": "object", "properties": { "uuid": { "type": "string", "format": "uuid", "description": "UUID of the found job" }, "type": { "type": "string", "description": "Type of the object", "example": "job" }, "title": { "type": "string", "description": "Title of the job" }, "description": { "type": "string", "description": "Job description" }, "status": { "type": "string", "description": "Current job status" }, "similarity_score": { "type": "number", "format": "float", "description": "Similarity score between 0.0 and 1.0", "minimum": 0, "maximum": 1 }, "matched_content": { "type": "string", "description": "The content that was matched in the embedding search" } }, "required": [ "uuid", "type", "title", "similarity_score" ] } } }, "x-speakeasy-retries": { "strategy": "backoff", "backoff": { "initialInterval": 500, "maxInterval": 60000, "maxElapsedTime": 3600000, "exponent": 1.5 }, "statusCodes": [ "5XX", "429" ], "retryConnectionErrors": true }, "tags": [ { "name": "Allocation Windows", "description": "Operations related to Allocation Windows" }, { "name": "Assets", "description": "Operations related to Assets" }, { "name": "Asset Types", "description": "Operations related to Asset Types" }, { "name": "Asset Type Fields", "description": "Operations related to Asset Type Fields" }, { "name": "Attachments", "description": "Operations related to Attachments" }, { "name": "Badges", "description": "Operations related to Badges" }, { "name": "Categories", "description": "Operations related to Categories" }, { "name": "Clients", "description": "Operations related to Clients" }, { "name": "Company Contacts", "description": "Operations related to Company Contacts" }, { "name": "Document Templates", "description": "Operations related to Document Templates" }, { "name": "Email Templates", "description": "Operations related to Email Templates" }, { "name": "Feedback", "description": "Operations related to Feedback" }, { "name": "Forms", "description": "Operations related to Forms" }, { "name": "Form Fields", "description": "Operations related to Form Fields" }, { "name": "Form Responses", "description": "Operations related to Form Responses" }, { "name": "Inbox Messages", "description": "Operations related to Inbox Messages" }, { "name": "Jobs", "description": "Operations related to Jobs" }, { "name": "Job Activities", "description": "Operations related to Job Activities" }, { "name": "Job Allocations", "description": "Operations related to Job Allocations" }, { "name": "Job Checklists", "description": "Operations related to Job Checklists" }, { "name": "Job Contacts", "description": "Operations related to Job Contacts" }, { "name": "Job Materials", "description": "Operations related to Job Materials" }, { "name": "Job Material Bundles", "description": "Operations related to Job Material Bundles" }, { "name": "Job Payments", "description": "Operations related to Job Payments" }, { "name": "Job Templates", "description": "Operations related to Job Templates" }, { "name": "Knowledge Articles", "description": "Operations related to Knowledge Articles" }, { "name": "Locations", "description": "Operations related to Locations" }, { "name": "Materials", "description": "Operations related to Materials" }, { "name": "Bundles", "description": "Operations related to Bundles" }, { "name": "Notes", "description": "Operations related to Notes" }, { "name": "Job Queues", "description": "Operations related to Job Queues" }, { "name": "Security Roles", "description": "Operations related to Security Roles" }, { "name": "SMS Templates", "description": "Operations related to SMS Templates" }, { "name": "Staff Members", "description": "Operations related to Staff Members" }, { "name": "Staff Messages", "description": "Operations related to Staff Messages" }, { "name": "Suppliers", "description": "Operations related to Suppliers" }, { "name": "Tasks", "description": "Operations related to Tasks" }, { "name": "Tax Rates", "description": "Operations related to Tax Rates" }, { "name": "Vendors", "description": "Vendor account information" } ] }