Skip to content

Service tickets

Generated at build time from packages/core/src/operations/tickets.ts. Every operation below isPOST /v1/ops/{name} over HTTP, env.API.invoke(actor, name, input) over RPC, and, when staff may call it, an MCP tool. See the API overview for authentication and errors.

tickets.board

Get the service board

Kind
Read
Who
Staff: admin, editor, viewer
MCP tool
tickets_board
In-chat view
ui://cemco/service-board.html

Service tickets grouped by status in order: new, diagnosing, parts_on_order, scheduled, waiting_on_customer, resolved, follow_up_complete. Within each column down-priority tickets come first. Resolved and follow-up complete columns show only tickets closed in the last 30 days unless includeAllClosed is true.

Input (object)

FieldTypeDescription
accountIdstringRecord id (UUID)min length 1, max length 64
assignedToUserIdstringRecord id (UUID)min length 1, max length 64
includeAllClosedbooleandefault false

Output (object)

FieldTypeDescription
columnsrequiredobject[]
statusrequired"new" | "diagnosing" | "parts_on_order" | "scheduled" | "waiting_on_customer" | "resolved" | "follow_up_complete"
labelrequiredstring
countrequiredintegermin -9007199254740991, max 9007199254740991
ticketsrequiredobject[]Down tickets first, then by priority and age
idrequiredstringRecord id (UUID)min length 1, max length 64
ticketNumberrequiredstring
accountIdrequiredstringRecord id (UUID)min length 1, max length 64
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
contactIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
titlerequiredstring
descriptionrequiredstring | null
categoryrequired"mechanical" | "electrical" | "controls" | "hydraulic" | "pneumatic" | "structural" | "calibration" | "operator_training" | "other"
priorityrequired"low" | "normal" | "high" | "down"
statusrequired"new" | "diagnosing" | "parts_on_order" | "scheduled" | "waiting_on_customer" | "resolved" | "follow_up_complete"
rootCauserequired"component_failure" | "manufacturing_defect" | "wear" | "operator_error" | "installation" | "shipping_damage" | "environment" | "design" | "unknown" | null
resolutionrequiredstring | null
sourcerequired"staff" | "portal" | "email" | "agent"
assignedToUserIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
isWarrantyrequiredbooleanWhether the work is covered by warranty
onsiteHoursrequirednumberTotal on-site hours loggedmin 0
travelHoursrequirednumberTotal travel hours loggedmin 0
travelMilesrequirednumberTotal travel miles loggedmin 0
openedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
scheduledForrequiredstring (date) | nullDate as YYYY-MM-DD
resolvedAtrequiredstring (date-time) | nullUTC timestamp, ISO 8601 with Z
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
accountNamerequiredstring
machineSerialNumberrequiredstring
machineModelrequiredstring
assignedToNamerequiredstring | null
openCountrequiredintegermin -9007199254740991, max 9007199254740991
downCountrequiredintegerOpen tickets with priority downmin -9007199254740991, max 9007199254740991
Example request
                curl https://api.cemco.app/v1/ops/tickets.board \
  -H "x-api-key: $CEMCO_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
              
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "accountId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "assignedToUserId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "includeAllClosed": {
        "default": false,
        "type": "boolean"
      }
    }
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "columns": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "new",
                "diagnosing",
                "parts_on_order",
                "scheduled",
                "waiting_on_customer",
                "resolved",
                "follow_up_complete"
              ]
            },
            "label": {
              "type": "string"
            },
            "count": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "tickets": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "Record id (UUID)"
                  },
                  "ticketNumber": {
                    "type": "string"
                  },
                  "accountId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "Record id (UUID)"
                  },
                  "machineId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "Record id (UUID)"
                  },
                  "contactId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "description": "Record id (UUID)"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "title": {
                    "type": "string"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "category": {
                    "type": "string",
                    "enum": [
                      "mechanical",
                      "electrical",
                      "controls",
                      "hydraulic",
                      "pneumatic",
                      "structural",
                      "calibration",
                      "operator_training",
                      "other"
                    ]
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "low",
                      "normal",
                      "high",
                      "down"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "new",
                      "diagnosing",
                      "parts_on_order",
                      "scheduled",
                      "waiting_on_customer",
                      "resolved",
                      "follow_up_complete"
                    ]
                  },
                  "rootCause": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "component_failure",
                          "manufacturing_defect",
                          "wear",
                          "operator_error",
                          "installation",
                          "shipping_damage",
                          "environment",
                          "design",
                          "unknown"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "resolution": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "staff",
                      "portal",
                      "email",
                      "agent"
                    ]
                  },
                  "assignedToUserId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "description": "Record id (UUID)"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isWarranty": {
                    "type": "boolean",
                    "description": "Whether the work is covered by warranty"
                  },
                  "onsiteHours": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Total on-site hours logged"
                  },
                  "travelHours": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Total travel hours logged"
                  },
                  "travelMiles": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Total travel miles logged"
                  },
                  "openedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                    "description": "UTC timestamp, ISO 8601 with Z"
                  },
                  "scheduledFor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                        "description": "Date as YYYY-MM-DD"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "resolvedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                        "description": "UTC timestamp, ISO 8601 with Z"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                    "description": "UTC timestamp, ISO 8601 with Z"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                    "description": "UTC timestamp, ISO 8601 with Z"
                  },
                  "accountName": {
                    "type": "string"
                  },
                  "machineSerialNumber": {
                    "type": "string"
                  },
                  "machineModel": {
                    "type": "string"
                  },
                  "assignedToName": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "ticketNumber",
                  "accountId",
                  "machineId",
                  "contactId",
                  "title",
                  "description",
                  "category",
                  "priority",
                  "status",
                  "rootCause",
                  "resolution",
                  "source",
                  "assignedToUserId",
                  "isWarranty",
                  "onsiteHours",
                  "travelHours",
                  "travelMiles",
                  "openedAt",
                  "scheduledFor",
                  "resolvedAt",
                  "createdAt",
                  "updatedAt",
                  "accountName",
                  "machineSerialNumber",
                  "machineModel",
                  "assignedToName"
                ],
                "additionalProperties": false
              },
              "description": "Down tickets first, then by priority and age"
            }
          },
          "required": [
            "status",
            "label",
            "count",
            "tickets"
          ],
          "additionalProperties": false
        }
      },
      "openCount": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      },
      "downCount": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991,
        "description": "Open tickets with priority down"
      }
    },
    "required": [
      "columns",
      "openCount",
      "downCount"
    ],
    "additionalProperties": false
  }
}
            

tickets.list

List service tickets

Kind
Read
Who
Staff: admin, editor, viewer
MCP tool
tickets_list

Service tickets as a flat list with filters for account, machine, status, priority, category and assignee.

Input (object)

FieldTypeDescription
accountIdstringRecord id (UUID)min length 1, max length 64
machineIdstringRecord id (UUID)min length 1, max length 64
status"new" | "diagnosing" | "parts_on_order" | "scheduled" | "waiting_on_customer" | "resolved" | "follow_up_complete"
priority"low" | "normal" | "high" | "down"
category"mechanical" | "electrical" | "controls" | "hydraulic" | "pneumatic" | "structural" | "calibration" | "operator_training" | "other"
assignedToUserIdstringRecord id (UUID)min length 1, max length 64
openbooleantrue for tickets not yet resolved, false for resolved and follow-up complete
querystringMatches ticket number, title, serial number or account namemax length 200
sort"newest" | "oldest" | "priority"default "priority"
limitintegerMaximum rows to return (default 50, max 500)default 50, min 1, max 500
offsetintegerRows to skip, for pagingdefault 0, min 0, max 9007199254740991

Output (object)

FieldTypeDescription
itemsrequiredobject[]
idrequiredstringRecord id (UUID)min length 1, max length 64
ticketNumberrequiredstring
accountIdrequiredstringRecord id (UUID)min length 1, max length 64
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
contactIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
titlerequiredstring
descriptionrequiredstring | null
categoryrequired"mechanical" | "electrical" | "controls" | "hydraulic" | "pneumatic" | "structural" | "calibration" | "operator_training" | "other"
priorityrequired"low" | "normal" | "high" | "down"
statusrequired"new" | "diagnosing" | "parts_on_order" | "scheduled" | "waiting_on_customer" | "resolved" | "follow_up_complete"
rootCauserequired"component_failure" | "manufacturing_defect" | "wear" | "operator_error" | "installation" | "shipping_damage" | "environment" | "design" | "unknown" | null
resolutionrequiredstring | null
sourcerequired"staff" | "portal" | "email" | "agent"
assignedToUserIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
isWarrantyrequiredbooleanWhether the work is covered by warranty
onsiteHoursrequirednumberTotal on-site hours loggedmin 0
travelHoursrequirednumberTotal travel hours loggedmin 0
travelMilesrequirednumberTotal travel miles loggedmin 0
openedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
scheduledForrequiredstring (date) | nullDate as YYYY-MM-DD
resolvedAtrequiredstring (date-time) | nullUTC timestamp, ISO 8601 with Z
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
accountNamerequiredstring
machineSerialNumberrequiredstring
machineModelrequiredstring
assignedToNamerequiredstring | null
totalrequiredintegerTotal rows matching the filters, ignoring limit and offsetmin 0, max 9007199254740991
limitrequiredintegermin -9007199254740991, max 9007199254740991
offsetrequiredintegermin -9007199254740991, max 9007199254740991
Example request
                curl https://api.cemco.app/v1/ops/tickets.list \
  -H "x-api-key: $CEMCO_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
              
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "accountId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "machineId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "status": {
        "type": "string",
        "enum": [
          "new",
          "diagnosing",
          "parts_on_order",
          "scheduled",
          "waiting_on_customer",
          "resolved",
          "follow_up_complete"
        ]
      },
      "priority": {
        "type": "string",
        "enum": [
          "low",
          "normal",
          "high",
          "down"
        ]
      },
      "category": {
        "type": "string",
        "enum": [
          "mechanical",
          "electrical",
          "controls",
          "hydraulic",
          "pneumatic",
          "structural",
          "calibration",
          "operator_training",
          "other"
        ]
      },
      "assignedToUserId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "open": {
        "description": "true for tickets not yet resolved, false for resolved and follow-up complete",
        "type": "boolean"
      },
      "query": {
        "description": "Matches ticket number, title, serial number or account name",
        "type": "string",
        "maxLength": 200
      },
      "sort": {
        "default": "priority",
        "type": "string",
        "enum": [
          "newest",
          "oldest",
          "priority"
        ]
      },
      "limit": {
        "default": 50,
        "description": "Maximum rows to return (default 50, max 500)",
        "type": "integer",
        "minimum": 1,
        "maximum": 500
      },
      "offset": {
        "default": 0,
        "description": "Rows to skip, for paging",
        "type": "integer",
        "minimum": 0,
        "maximum": 9007199254740991
      }
    }
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "items": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "ticketNumber": {
              "type": "string"
            },
            "accountId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "machineId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "contactId": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Record id (UUID)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "title": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "category": {
              "type": "string",
              "enum": [
                "mechanical",
                "electrical",
                "controls",
                "hydraulic",
                "pneumatic",
                "structural",
                "calibration",
                "operator_training",
                "other"
              ]
            },
            "priority": {
              "type": "string",
              "enum": [
                "low",
                "normal",
                "high",
                "down"
              ]
            },
            "status": {
              "type": "string",
              "enum": [
                "new",
                "diagnosing",
                "parts_on_order",
                "scheduled",
                "waiting_on_customer",
                "resolved",
                "follow_up_complete"
              ]
            },
            "rootCause": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "component_failure",
                    "manufacturing_defect",
                    "wear",
                    "operator_error",
                    "installation",
                    "shipping_damage",
                    "environment",
                    "design",
                    "unknown"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "resolution": {
              "type": [
                "string",
                "null"
              ]
            },
            "source": {
              "type": "string",
              "enum": [
                "staff",
                "portal",
                "email",
                "agent"
              ]
            },
            "assignedToUserId": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Record id (UUID)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "isWarranty": {
              "type": "boolean",
              "description": "Whether the work is covered by warranty"
            },
            "onsiteHours": {
              "type": "number",
              "minimum": 0,
              "description": "Total on-site hours logged"
            },
            "travelHours": {
              "type": "number",
              "minimum": 0,
              "description": "Total travel hours logged"
            },
            "travelMiles": {
              "type": "number",
              "minimum": 0,
              "description": "Total travel miles logged"
            },
            "openedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
              "description": "UTC timestamp, ISO 8601 with Z"
            },
            "scheduledFor": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                  "description": "Date as YYYY-MM-DD"
                },
                {
                  "type": "null"
                }
              ]
            },
            "resolvedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                  "description": "UTC timestamp, ISO 8601 with Z"
                },
                {
                  "type": "null"
                }
              ]
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
              "description": "UTC timestamp, ISO 8601 with Z"
            },
            "updatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
              "description": "UTC timestamp, ISO 8601 with Z"
            },
            "accountName": {
              "type": "string"
            },
            "machineSerialNumber": {
              "type": "string"
            },
            "machineModel": {
              "type": "string"
            },
            "assignedToName": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "id",
            "ticketNumber",
            "accountId",
            "machineId",
            "contactId",
            "title",
            "description",
            "category",
            "priority",
            "status",
            "rootCause",
            "resolution",
            "source",
            "assignedToUserId",
            "isWarranty",
            "onsiteHours",
            "travelHours",
            "travelMiles",
            "openedAt",
            "scheduledFor",
            "resolvedAt",
            "createdAt",
            "updatedAt",
            "accountName",
            "machineSerialNumber",
            "machineModel",
            "assignedToName"
          ],
          "additionalProperties": false
        }
      },
      "total": {
        "type": "integer",
        "minimum": 0,
        "maximum": 9007199254740991,
        "description": "Total rows matching the filters, ignoring limit and offset"
      },
      "limit": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      },
      "offset": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      }
    },
    "required": [
      "items",
      "total",
      "limit",
      "offset"
    ],
    "additionalProperties": false
  }
}
            

tickets.get

Get a service ticket

Kind
Read
Who
Staff: admin, editor, viewer
MCP tool
tickets_get

One ticket by id or ticket number with its machine, parts used, time entries (on-site hours, travel), warranty claims, documents and related activity.

Input (object)

FieldTypeDescription
idstringRecord id (UUID)min length 1, max length 64
ticketNumberstringmax length 40

Output (object)

FieldTypeDescription
idrequiredstringRecord id (UUID)min length 1, max length 64
ticketNumberrequiredstring
accountIdrequiredstringRecord id (UUID)min length 1, max length 64
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
contactIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
titlerequiredstring
descriptionrequiredstring | null
categoryrequired"mechanical" | "electrical" | "controls" | "hydraulic" | "pneumatic" | "structural" | "calibration" | "operator_training" | "other"
priorityrequired"low" | "normal" | "high" | "down"
statusrequired"new" | "diagnosing" | "parts_on_order" | "scheduled" | "waiting_on_customer" | "resolved" | "follow_up_complete"
rootCauserequired"component_failure" | "manufacturing_defect" | "wear" | "operator_error" | "installation" | "shipping_damage" | "environment" | "design" | "unknown" | null
resolutionrequiredstring | null
sourcerequired"staff" | "portal" | "email" | "agent"
assignedToUserIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
isWarrantyrequiredbooleanWhether the work is covered by warranty
onsiteHoursrequirednumberTotal on-site hours loggedmin 0
travelHoursrequirednumberTotal travel hours loggedmin 0
travelMilesrequirednumberTotal travel miles loggedmin 0
openedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
scheduledForrequiredstring (date) | nullDate as YYYY-MM-DD
resolvedAtrequiredstring (date-time) | nullUTC timestamp, ISO 8601 with Z
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
accountNamerequiredstring
machineSerialNumberrequiredstring
machineModelrequiredstring
assignedToNamerequiredstring | null
partsrequiredobject[]
idrequiredstringRecord id (UUID)min length 1, max length 64
ticketIdrequiredstringRecord id (UUID)min length 1, max length 64
partIdrequiredstringRecord id (UUID)min length 1, max length 64
partNumberrequiredstring
descriptionrequiredstring
quantityrequiredintegermin 1, max 9007199254740991
unitPriceCentsrequiredintegerAmount in integer US cents (zero or more)min 0, max 9007199254740991
coveredByWarrantyrequiredboolean
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
timeEntriesrequiredobject[]
idrequiredstringRecord id (UUID)min length 1, max length 64
ticketIdrequiredstringRecord id (UUID)min length 1, max length 64
workDaterequiredstring (date)Date as YYYY-MM-DD
onsiteHoursrequirednumbermin 0
travelHoursrequirednumbermin 0
travelMilesrequirednumbermin 0
technicianNamerequiredstring
noterequiredstring | null
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
warrantyClaimsrequiredobject[]
idrequiredstringRecord id (UUID)min length 1, max length 64
claimNumberrequiredstring
ticketIdrequiredstringRecord id (UUID)min length 1, max length 64
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
accountIdrequiredstringRecord id (UUID)min length 1, max length 64
statusrequired"submitted" | "approved" | "denied" | "credited"
descriptionrequiredstring | null
amountClaimedCentsrequiredintegerAmount in integer US cents (zero or more)min 0, max 9007199254740991
creditCentsrequiredintegerCredit granted to the customermin 0, max 9007199254740991
submittedOnrequiredstring (date)Date as YYYY-MM-DD
decidedOnrequiredstring (date) | nullDate as YYYY-MM-DD
notesrequiredstring | null
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
documentsrequiredobject[]
idrequiredstringRecord id (UUID)min length 1, max length 64
kindrequired"signed_quote" | "quote" | "purchase_order" | "drawing" | "manual" | "inspection_report" | "photo" | "training_record" | "invoice" | "email_attachment" | "export" | "other"
titlerequiredstring
filenamerequiredstring
contentTyperequiredstring
sizeBytesrequiredintegermin 0, max 9007199254740991
statusrequired"pending" | "stored"pending until the file bytes are stored
accountIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
customerVisiblerequiredbooleanWhether the customer can open it in the portal
sourcerequired"upload" | "email" | "portal" | "system" | "import"
linksrequiredobject[]
entityTyperequired"account" | "contact" | "site" | "order" | "machine" | "ticket" | "warranty_claim" | "parts_order" | "part" | "opportunity" | "check_in"
entityIdrequiredstringRecord id (UUID)min length 1, max length 64
uploadedByNamerequiredstring | null
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
activitiesrequiredobject[]
idrequiredstringRecord id (UUID)min length 1, max length 64
typerequired"call" | "email" | "text" | "visit" | "note" | "system"
directionrequired"outbound" | "inbound" | null
subjectrequiredstring
bodyrequiredstring | null
occurredAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
accountIdrequiredstringRecord id (UUID)min length 1, max length 64
contactIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
orderIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
machineIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
ticketIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
externalRefrequiredstring | nullGmail message id for imported emails; unique
externalThreadIdrequiredstring | null
fromAddressrequiredstring | null
toAddressesrequiredstring[]
durationMinutesrequiredinteger | nullmin 0, max 9007199254740991
documentIdsrequiredstring[]Attachments stored as documents
loggedByNamerequiredstring
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
machinerequiredobject
idrequiredstringRecord id (UUID)min length 1, max length 64
serialNumberrequiredstring
typerequired"plant" | "mixer" | "silo" | "feeder" | "power_pack"
modelrequiredstring
configurationrequiredstring | null
optionsrequiredstring[]
accountIdrequiredstringCurrent ownermin length 1, max length 64
siteIdrequiredstring | nullCurrent sitemin length 1, max length 64
orderIdrequiredstring | nullOrder the machine was built formin length 1, max length 64
productIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
statusrequired"in_build" | "in_transit" | "operating" | "down" | "idle" | "retired"
builtOnrequiredstring (date) | nullDate as YYYY-MM-DD
shippedOnrequiredstring (date) | nullDate as YYYY-MM-DD
commissionedOnrequiredstring (date) | nullDate as YYYY-MM-DD
warrantyStartrequiredstring (date) | nullDate as YYYY-MM-DD
warrantyEndrequiredstring (date) | nullDate as YYYY-MM-DD
warrantyStaterequired"none" | "active" | "expiring" | "expired"Computed from the warranty dates and today's date
warrantyDaysLeftrequiredinteger | nullDays until the warranty ends; negative once expired; null if not startedmin -9007199254740991, max 9007199254740991
notesrequiredstring | null
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
Example request
                curl https://api.cemco.app/v1/ops/tickets.get \
  -H "x-api-key: $CEMCO_API_KEY" \
  -H "content-type: application/json" \
  -d '{"id":"00000000-0000-4000-8000-000000000000"}'
              
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "ticketNumber": {
        "type": "string",
        "maxLength": 40
      }
    }
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "ticketNumber": {
        "type": "string"
      },
      "accountId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "machineId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "contactId": {
        "anyOf": [
          {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          {
            "type": "null"
          }
        ]
      },
      "title": {
        "type": "string"
      },
      "description": {
        "type": [
          "string",
          "null"
        ]
      },
      "category": {
        "type": "string",
        "enum": [
          "mechanical",
          "electrical",
          "controls",
          "hydraulic",
          "pneumatic",
          "structural",
          "calibration",
          "operator_training",
          "other"
        ]
      },
      "priority": {
        "type": "string",
        "enum": [
          "low",
          "normal",
          "high",
          "down"
        ]
      },
      "status": {
        "type": "string",
        "enum": [
          "new",
          "diagnosing",
          "parts_on_order",
          "scheduled",
          "waiting_on_customer",
          "resolved",
          "follow_up_complete"
        ]
      },
      "rootCause": {
        "anyOf": [
          {
            "type": "string",
            "enum": [
              "component_failure",
              "manufacturing_defect",
              "wear",
              "operator_error",
              "installation",
              "shipping_damage",
              "environment",
              "design",
              "unknown"
            ]
          },
          {
            "type": "null"
          }
        ]
      },
      "resolution": {
        "type": [
          "string",
          "null"
        ]
      },
      "source": {
        "type": "string",
        "enum": [
          "staff",
          "portal",
          "email",
          "agent"
        ]
      },
      "assignedToUserId": {
        "anyOf": [
          {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          {
            "type": "null"
          }
        ]
      },
      "isWarranty": {
        "type": "boolean",
        "description": "Whether the work is covered by warranty"
      },
      "onsiteHours": {
        "type": "number",
        "minimum": 0,
        "description": "Total on-site hours logged"
      },
      "travelHours": {
        "type": "number",
        "minimum": 0,
        "description": "Total travel hours logged"
      },
      "travelMiles": {
        "type": "number",
        "minimum": 0,
        "description": "Total travel miles logged"
      },
      "openedAt": {
        "type": "string",
        "format": "date-time",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
        "description": "UTC timestamp, ISO 8601 with Z"
      },
      "scheduledFor": {
        "anyOf": [
          {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
            "description": "Date as YYYY-MM-DD"
          },
          {
            "type": "null"
          }
        ]
      },
      "resolvedAt": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "UTC timestamp, ISO 8601 with Z"
          },
          {
            "type": "null"
          }
        ]
      },
      "createdAt": {
        "type": "string",
        "format": "date-time",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
        "description": "UTC timestamp, ISO 8601 with Z"
      },
      "updatedAt": {
        "type": "string",
        "format": "date-time",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
        "description": "UTC timestamp, ISO 8601 with Z"
      },
      "accountName": {
        "type": "string"
      },
      "machineSerialNumber": {
        "type": "string"
      },
      "machineModel": {
        "type": "string"
      },
      "assignedToName": {
        "type": [
          "string",
          "null"
        ]
      },
      "parts": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "ticketId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "partId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "partNumber": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "quantity": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            "unitPriceCents": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Amount in integer US cents (zero or more)"
            },
            "coveredByWarranty": {
              "type": "boolean"
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
              "description": "UTC timestamp, ISO 8601 with Z"
            }
          },
          "required": [
            "id",
            "ticketId",
            "partId",
            "partNumber",
            "description",
            "quantity",
            "unitPriceCents",
            "coveredByWarranty",
            "createdAt"
          ],
          "additionalProperties": false
        }
      },
      "timeEntries": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "ticketId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "workDate": {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "description": "Date as YYYY-MM-DD"
            },
            "onsiteHours": {
              "type": "number",
              "minimum": 0
            },
            "travelHours": {
              "type": "number",
              "minimum": 0
            },
            "travelMiles": {
              "type": "number",
              "minimum": 0
            },
            "technicianName": {
              "type": "string"
            },
            "note": {
              "type": [
                "string",
                "null"
              ]
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
              "description": "UTC timestamp, ISO 8601 with Z"
            }
          },
          "required": [
            "id",
            "ticketId",
            "workDate",
            "onsiteHours",
            "travelHours",
            "travelMiles",
            "technicianName",
            "note",
            "createdAt"
          ],
          "additionalProperties": false
        }
      },
      "warrantyClaims": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "claimNumber": {
              "type": "string"
            },
            "ticketId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "machineId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "accountId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "status": {
              "type": "string",
              "enum": [
                "submitted",
                "approved",
                "denied",
                "credited"
              ]
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "amountClaimedCents": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Amount in integer US cents (zero or more)"
            },
            "creditCents": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Credit granted to the customer"
            },
            "submittedOn": {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "description": "Date as YYYY-MM-DD"
            },
            "decidedOn": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                  "description": "Date as YYYY-MM-DD"
                },
                {
                  "type": "null"
                }
              ]
            },
            "notes": {
              "type": [
                "string",
                "null"
              ]
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
              "description": "UTC timestamp, ISO 8601 with Z"
            },
            "updatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
              "description": "UTC timestamp, ISO 8601 with Z"
            }
          },
          "required": [
            "id",
            "claimNumber",
            "ticketId",
            "machineId",
            "accountId",
            "status",
            "description",
            "amountClaimedCents",
            "creditCents",
            "submittedOn",
            "decidedOn",
            "notes",
            "createdAt",
            "updatedAt"
          ],
          "additionalProperties": false
        }
      },
      "documents": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "kind": {
              "type": "string",
              "enum": [
                "signed_quote",
                "quote",
                "purchase_order",
                "drawing",
                "manual",
                "inspection_report",
                "photo",
                "training_record",
                "invoice",
                "email_attachment",
                "export",
                "other"
              ]
            },
            "title": {
              "type": "string"
            },
            "filename": {
              "type": "string"
            },
            "contentType": {
              "type": "string"
            },
            "sizeBytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "status": {
              "type": "string",
              "enum": [
                "pending",
                "stored"
              ],
              "description": "pending until the file bytes are stored"
            },
            "accountId": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Record id (UUID)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "customerVisible": {
              "type": "boolean",
              "description": "Whether the customer can open it in the portal"
            },
            "source": {
              "type": "string",
              "enum": [
                "upload",
                "email",
                "portal",
                "system",
                "import"
              ]
            },
            "links": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "entityType": {
                    "type": "string",
                    "enum": [
                      "account",
                      "contact",
                      "site",
                      "order",
                      "machine",
                      "ticket",
                      "warranty_claim",
                      "parts_order",
                      "part",
                      "opportunity",
                      "check_in"
                    ]
                  },
                  "entityId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "Record id (UUID)"
                  }
                },
                "required": [
                  "entityType",
                  "entityId"
                ],
                "additionalProperties": false
              }
            },
            "uploadedByName": {
              "type": [
                "string",
                "null"
              ]
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
              "description": "UTC timestamp, ISO 8601 with Z"
            }
          },
          "required": [
            "id",
            "kind",
            "title",
            "filename",
            "contentType",
            "sizeBytes",
            "status",
            "accountId",
            "customerVisible",
            "source",
            "links",
            "uploadedByName",
            "createdAt"
          ],
          "additionalProperties": false
        }
      },
      "activities": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "type": {
              "type": "string",
              "enum": [
                "call",
                "email",
                "text",
                "visit",
                "note",
                "system"
              ]
            },
            "direction": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "outbound",
                    "inbound"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "subject": {
              "type": "string"
            },
            "body": {
              "type": [
                "string",
                "null"
              ]
            },
            "occurredAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
              "description": "UTC timestamp, ISO 8601 with Z"
            },
            "accountId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "contactId": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Record id (UUID)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "orderId": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Record id (UUID)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "machineId": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Record id (UUID)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "ticketId": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Record id (UUID)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "externalRef": {
              "description": "Gmail message id for imported emails; unique",
              "type": [
                "string",
                "null"
              ]
            },
            "externalThreadId": {
              "type": [
                "string",
                "null"
              ]
            },
            "fromAddress": {
              "type": [
                "string",
                "null"
              ]
            },
            "toAddresses": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "durationMinutes": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "documentIds": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Record id (UUID)"
              },
              "description": "Attachments stored as documents"
            },
            "loggedByName": {
              "type": "string"
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
              "description": "UTC timestamp, ISO 8601 with Z"
            }
          },
          "required": [
            "id",
            "type",
            "direction",
            "subject",
            "body",
            "occurredAt",
            "accountId",
            "contactId",
            "orderId",
            "machineId",
            "ticketId",
            "externalRef",
            "externalThreadId",
            "fromAddress",
            "toAddresses",
            "durationMinutes",
            "documentIds",
            "loggedByName",
            "createdAt"
          ],
          "additionalProperties": false
        }
      },
      "machine": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "serialNumber": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "plant",
              "mixer",
              "silo",
              "feeder",
              "power_pack"
            ]
          },
          "model": {
            "type": "string"
          },
          "configuration": {
            "type": [
              "string",
              "null"
            ]
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "accountId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Current owner"
          },
          "siteId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Record id (UUID)"
              },
              {
                "type": "null"
              }
            ],
            "description": "Current site"
          },
          "orderId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Record id (UUID)"
              },
              {
                "type": "null"
              }
            ],
            "description": "Order the machine was built for"
          },
          "productId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Record id (UUID)"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "in_build",
              "in_transit",
              "operating",
              "down",
              "idle",
              "retired"
            ]
          },
          "builtOn": {
            "anyOf": [
              {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                "description": "Date as YYYY-MM-DD"
              },
              {
                "type": "null"
              }
            ]
          },
          "shippedOn": {
            "anyOf": [
              {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                "description": "Date as YYYY-MM-DD"
              },
              {
                "type": "null"
              }
            ]
          },
          "commissionedOn": {
            "anyOf": [
              {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                "description": "Date as YYYY-MM-DD"
              },
              {
                "type": "null"
              }
            ]
          },
          "warrantyStart": {
            "anyOf": [
              {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                "description": "Date as YYYY-MM-DD"
              },
              {
                "type": "null"
              }
            ]
          },
          "warrantyEnd": {
            "anyOf": [
              {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                "description": "Date as YYYY-MM-DD"
              },
              {
                "type": "null"
              }
            ]
          },
          "warrantyState": {
            "type": "string",
            "enum": [
              "none",
              "active",
              "expiring",
              "expired"
            ],
            "description": "Computed from the warranty dates and today's date"
          },
          "warrantyDaysLeft": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "Days until the warranty ends; negative once expired; null if not started"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "UTC timestamp, ISO 8601 with Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "UTC timestamp, ISO 8601 with Z"
          }
        },
        "required": [
          "id",
          "serialNumber",
          "type",
          "model",
          "configuration",
          "options",
          "accountId",
          "siteId",
          "orderId",
          "productId",
          "status",
          "builtOn",
          "shippedOn",
          "commissionedOn",
          "warrantyStart",
          "warrantyEnd",
          "warrantyState",
          "warrantyDaysLeft",
          "notes",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      }
    },
    "required": [
      "id",
      "ticketNumber",
      "accountId",
      "machineId",
      "contactId",
      "title",
      "description",
      "category",
      "priority",
      "status",
      "rootCause",
      "resolution",
      "source",
      "assignedToUserId",
      "isWarranty",
      "onsiteHours",
      "travelHours",
      "travelMiles",
      "openedAt",
      "scheduledFor",
      "resolvedAt",
      "createdAt",
      "updatedAt",
      "accountName",
      "machineSerialNumber",
      "machineModel",
      "assignedToName",
      "parts",
      "timeEntries",
      "warrantyClaims",
      "documents",
      "activities",
      "machine"
    ],
    "additionalProperties": false
  }
}
            

tickets.open

Open a service ticket

Kind
Write (audited)
Who
Staff: admin, editor
MCP tool
tickets_open

Open a service ticket on a machine (by machineId or serial number). Priority down means the machine cannot produce: it marks the machine down until the ticket is resolved. The ticket number is assigned automatically and the ticket starts at status new.

Input (object)

FieldTypeDescription
machineIdstringRecord id (UUID)min length 1, max length 64
serialNumberstringmax length 60
titlerequiredstringmin length 1, max length 200
descriptionstring | nullmax length 20000
category"mechanical" | "electrical" | "controls" | "hydraulic" | "pneumatic" | "structural" | "calibration" | "operator_training" | "other"default "other"
priority"low" | "normal" | "high" | "down"default "normal"
contactIdstring | nullRecord id (UUID)min length 1, max length 64
assignedToUserIdstring | nullDefaults to the callermin length 1, max length 64
scheduledForstring (date) | nullDate as YYYY-MM-DD
isWarrantybooleanDefaults to whether the machine is under warranty today
source"staff" | "portal" | "email" | "agent"default "staff"

Output (object)

FieldTypeDescription
ticketrequiredobject
idrequiredstringRecord id (UUID)min length 1, max length 64
ticketNumberrequiredstring
accountIdrequiredstringRecord id (UUID)min length 1, max length 64
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
contactIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
titlerequiredstring
descriptionrequiredstring | null
categoryrequired"mechanical" | "electrical" | "controls" | "hydraulic" | "pneumatic" | "structural" | "calibration" | "operator_training" | "other"
priorityrequired"low" | "normal" | "high" | "down"
statusrequired"new" | "diagnosing" | "parts_on_order" | "scheduled" | "waiting_on_customer" | "resolved" | "follow_up_complete"
rootCauserequired"component_failure" | "manufacturing_defect" | "wear" | "operator_error" | "installation" | "shipping_damage" | "environment" | "design" | "unknown" | null
resolutionrequiredstring | null
sourcerequired"staff" | "portal" | "email" | "agent"
assignedToUserIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
isWarrantyrequiredbooleanWhether the work is covered by warranty
onsiteHoursrequirednumberTotal on-site hours loggedmin 0
travelHoursrequirednumberTotal travel hours loggedmin 0
travelMilesrequirednumberTotal travel miles loggedmin 0
openedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
scheduledForrequiredstring (date) | nullDate as YYYY-MM-DD
resolvedAtrequiredstring (date-time) | nullUTC timestamp, ISO 8601 with Z
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
machineEffectrequiredobject
machinerequiredobject
idrequiredstringRecord id (UUID)min length 1, max length 64
serialNumberrequiredstring
typerequired"plant" | "mixer" | "silo" | "feeder" | "power_pack"
modelrequiredstring
configurationrequiredstring | null
optionsrequiredstring[]
accountIdrequiredstringCurrent ownermin length 1, max length 64
siteIdrequiredstring | nullCurrent sitemin length 1, max length 64
orderIdrequiredstring | nullOrder the machine was built formin length 1, max length 64
productIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
statusrequired"in_build" | "in_transit" | "operating" | "down" | "idle" | "retired"
builtOnrequiredstring (date) | nullDate as YYYY-MM-DD
shippedOnrequiredstring (date) | nullDate as YYYY-MM-DD
commissionedOnrequiredstring (date) | nullDate as YYYY-MM-DD
warrantyStartrequiredstring (date) | nullDate as YYYY-MM-DD
warrantyEndrequiredstring (date) | nullDate as YYYY-MM-DD
warrantyStaterequired"none" | "active" | "expiring" | "expired"Computed from the warranty dates and today's date
warrantyDaysLeftrequiredinteger | nullDays until the warranty ends; negative once expired; null if not startedmin -9007199254740991, max 9007199254740991
notesrequiredstring | null
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
statusChangedrequiredboolean
previousStatusrequiredstring
Example request
                curl https://api.cemco.app/v1/ops/tickets.open \
  -H "x-api-key: $CEMCO_API_KEY" \
  -H "content-type: application/json" \
  -d '{"title":"example","machineId":"00000000-0000-4000-8000-000000000000"}'
              
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "machineId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "serialNumber": {
        "type": "string",
        "maxLength": 60
      },
      "title": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      },
      "description": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 20000
          },
          {
            "type": "null"
          }
        ]
      },
      "category": {
        "default": "other",
        "type": "string",
        "enum": [
          "mechanical",
          "electrical",
          "controls",
          "hydraulic",
          "pneumatic",
          "structural",
          "calibration",
          "operator_training",
          "other"
        ]
      },
      "priority": {
        "default": "normal",
        "type": "string",
        "enum": [
          "low",
          "normal",
          "high",
          "down"
        ]
      },
      "contactId": {
        "anyOf": [
          {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          {
            "type": "null"
          }
        ]
      },
      "assignedToUserId": {
        "description": "Defaults to the caller",
        "anyOf": [
          {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          {
            "type": "null"
          }
        ]
      },
      "scheduledFor": {
        "anyOf": [
          {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
            "description": "Date as YYYY-MM-DD"
          },
          {
            "type": "null"
          }
        ]
      },
      "isWarranty": {
        "description": "Defaults to whether the machine is under warranty today",
        "type": "boolean"
      },
      "source": {
        "default": "staff",
        "type": "string",
        "enum": [
          "staff",
          "portal",
          "email",
          "agent"
        ]
      }
    },
    "required": [
      "title"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "ticket": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "ticketNumber": {
            "type": "string"
          },
          "accountId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "machineId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "contactId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Record id (UUID)"
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "mechanical",
              "electrical",
              "controls",
              "hydraulic",
              "pneumatic",
              "structural",
              "calibration",
              "operator_training",
              "other"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "normal",
              "high",
              "down"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "diagnosing",
              "parts_on_order",
              "scheduled",
              "waiting_on_customer",
              "resolved",
              "follow_up_complete"
            ]
          },
          "rootCause": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "component_failure",
                  "manufacturing_defect",
                  "wear",
                  "operator_error",
                  "installation",
                  "shipping_damage",
                  "environment",
                  "design",
                  "unknown"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "resolution": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "staff",
              "portal",
              "email",
              "agent"
            ]
          },
          "assignedToUserId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Record id (UUID)"
              },
              {
                "type": "null"
              }
            ]
          },
          "isWarranty": {
            "type": "boolean",
            "description": "Whether the work is covered by warranty"
          },
          "onsiteHours": {
            "type": "number",
            "minimum": 0,
            "description": "Total on-site hours logged"
          },
          "travelHours": {
            "type": "number",
            "minimum": 0,
            "description": "Total travel hours logged"
          },
          "travelMiles": {
            "type": "number",
            "minimum": 0,
            "description": "Total travel miles logged"
          },
          "openedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "UTC timestamp, ISO 8601 with Z"
          },
          "scheduledFor": {
            "anyOf": [
              {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                "description": "Date as YYYY-MM-DD"
              },
              {
                "type": "null"
              }
            ]
          },
          "resolvedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                "description": "UTC timestamp, ISO 8601 with Z"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "UTC timestamp, ISO 8601 with Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "UTC timestamp, ISO 8601 with Z"
          }
        },
        "required": [
          "id",
          "ticketNumber",
          "accountId",
          "machineId",
          "contactId",
          "title",
          "description",
          "category",
          "priority",
          "status",
          "rootCause",
          "resolution",
          "source",
          "assignedToUserId",
          "isWarranty",
          "onsiteHours",
          "travelHours",
          "travelMiles",
          "openedAt",
          "scheduledFor",
          "resolvedAt",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "machineEffect": {
        "type": "object",
        "properties": {
          "machine": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Record id (UUID)"
              },
              "serialNumber": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "plant",
                  "mixer",
                  "silo",
                  "feeder",
                  "power_pack"
                ]
              },
              "model": {
                "type": "string"
              },
              "configuration": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "accountId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Current owner"
              },
              "siteId": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "Record id (UUID)"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Current site"
              },
              "orderId": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "Record id (UUID)"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Order the machine was built for"
              },
              "productId": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "Record id (UUID)"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "in_build",
                  "in_transit",
                  "operating",
                  "down",
                  "idle",
                  "retired"
                ]
              },
              "builtOn": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "description": "Date as YYYY-MM-DD"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "shippedOn": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "description": "Date as YYYY-MM-DD"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "commissionedOn": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "description": "Date as YYYY-MM-DD"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "warrantyStart": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "description": "Date as YYYY-MM-DD"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "warrantyEnd": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "description": "Date as YYYY-MM-DD"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "warrantyState": {
                "type": "string",
                "enum": [
                  "none",
                  "active",
                  "expiring",
                  "expired"
                ],
                "description": "Computed from the warranty dates and today's date"
              },
              "warrantyDaysLeft": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Days until the warranty ends; negative once expired; null if not started"
              },
              "notes": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                "description": "UTC timestamp, ISO 8601 with Z"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                "description": "UTC timestamp, ISO 8601 with Z"
              }
            },
            "required": [
              "id",
              "serialNumber",
              "type",
              "model",
              "configuration",
              "options",
              "accountId",
              "siteId",
              "orderId",
              "productId",
              "status",
              "builtOn",
              "shippedOn",
              "commissionedOn",
              "warrantyStart",
              "warrantyEnd",
              "warrantyState",
              "warrantyDaysLeft",
              "notes",
              "createdAt",
              "updatedAt"
            ],
            "additionalProperties": false
          },
          "statusChanged": {
            "type": "boolean"
          },
          "previousStatus": {
            "type": "string"
          }
        },
        "required": [
          "machine",
          "statusChanged",
          "previousStatus"
        ],
        "additionalProperties": false
      }
    },
    "required": [
      "ticket",
      "machineEffect"
    ],
    "additionalProperties": false
  }
}
            

tickets.update

Update a service ticket

Kind
Write (audited)
Who
Staff: admin, editor
MCP tool
tickets_update

Change a ticket's title, description, category, priority, root cause, resolution, assignee, contact, scheduled date or warranty flag. Only the fields you send are changed. Raising the priority to down marks the machine down; lowering it from down returns the machine to operating if no other down ticket is open. Use tickets.set_status to change status.

Input (object)

FieldTypeDescription
idrequiredstringRecord id (UUID)min length 1, max length 64
titlestringmin length 1, max length 200
descriptionstring | nullmax length 20000
category"mechanical" | "electrical" | "controls" | "hydraulic" | "pneumatic" | "structural" | "calibration" | "operator_training" | "other"
priority"low" | "normal" | "high" | "down"
rootCause"component_failure" | "manufacturing_defect" | "wear" | "operator_error" | "installation" | "shipping_damage" | "environment" | "design" | "unknown" | null
resolutionstring | nullmax length 20000
contactIdstring | nullRecord id (UUID)min length 1, max length 64
assignedToUserIdstring | nullRecord id (UUID)min length 1, max length 64
scheduledForstring (date) | nullDate as YYYY-MM-DD
isWarrantyboolean

Output (object)

FieldTypeDescription
ticketrequiredobject
idrequiredstringRecord id (UUID)min length 1, max length 64
ticketNumberrequiredstring
accountIdrequiredstringRecord id (UUID)min length 1, max length 64
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
contactIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
titlerequiredstring
descriptionrequiredstring | null
categoryrequired"mechanical" | "electrical" | "controls" | "hydraulic" | "pneumatic" | "structural" | "calibration" | "operator_training" | "other"
priorityrequired"low" | "normal" | "high" | "down"
statusrequired"new" | "diagnosing" | "parts_on_order" | "scheduled" | "waiting_on_customer" | "resolved" | "follow_up_complete"
rootCauserequired"component_failure" | "manufacturing_defect" | "wear" | "operator_error" | "installation" | "shipping_damage" | "environment" | "design" | "unknown" | null
resolutionrequiredstring | null
sourcerequired"staff" | "portal" | "email" | "agent"
assignedToUserIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
isWarrantyrequiredbooleanWhether the work is covered by warranty
onsiteHoursrequirednumberTotal on-site hours loggedmin 0
travelHoursrequirednumberTotal travel hours loggedmin 0
travelMilesrequirednumberTotal travel miles loggedmin 0
openedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
scheduledForrequiredstring (date) | nullDate as YYYY-MM-DD
resolvedAtrequiredstring (date-time) | nullUTC timestamp, ISO 8601 with Z
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
machineEffectrequiredobject
machinerequiredobject
idrequiredstringRecord id (UUID)min length 1, max length 64
serialNumberrequiredstring
typerequired"plant" | "mixer" | "silo" | "feeder" | "power_pack"
modelrequiredstring
configurationrequiredstring | null
optionsrequiredstring[]
accountIdrequiredstringCurrent ownermin length 1, max length 64
siteIdrequiredstring | nullCurrent sitemin length 1, max length 64
orderIdrequiredstring | nullOrder the machine was built formin length 1, max length 64
productIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
statusrequired"in_build" | "in_transit" | "operating" | "down" | "idle" | "retired"
builtOnrequiredstring (date) | nullDate as YYYY-MM-DD
shippedOnrequiredstring (date) | nullDate as YYYY-MM-DD
commissionedOnrequiredstring (date) | nullDate as YYYY-MM-DD
warrantyStartrequiredstring (date) | nullDate as YYYY-MM-DD
warrantyEndrequiredstring (date) | nullDate as YYYY-MM-DD
warrantyStaterequired"none" | "active" | "expiring" | "expired"Computed from the warranty dates and today's date
warrantyDaysLeftrequiredinteger | nullDays until the warranty ends; negative once expired; null if not startedmin -9007199254740991, max 9007199254740991
notesrequiredstring | null
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
statusChangedrequiredboolean
previousStatusrequiredstring
Example request
                curl https://api.cemco.app/v1/ops/tickets.update \
  -H "x-api-key: $CEMCO_API_KEY" \
  -H "content-type: application/json" \
  -d '{"id":"00000000-0000-4000-8000-000000000000"}'
              
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "title": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      },
      "description": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 20000
          },
          {
            "type": "null"
          }
        ]
      },
      "category": {
        "type": "string",
        "enum": [
          "mechanical",
          "electrical",
          "controls",
          "hydraulic",
          "pneumatic",
          "structural",
          "calibration",
          "operator_training",
          "other"
        ]
      },
      "priority": {
        "type": "string",
        "enum": [
          "low",
          "normal",
          "high",
          "down"
        ]
      },
      "rootCause": {
        "anyOf": [
          {
            "type": "string",
            "enum": [
              "component_failure",
              "manufacturing_defect",
              "wear",
              "operator_error",
              "installation",
              "shipping_damage",
              "environment",
              "design",
              "unknown"
            ]
          },
          {
            "type": "null"
          }
        ]
      },
      "resolution": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 20000
          },
          {
            "type": "null"
          }
        ]
      },
      "contactId": {
        "anyOf": [
          {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          {
            "type": "null"
          }
        ]
      },
      "assignedToUserId": {
        "anyOf": [
          {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          {
            "type": "null"
          }
        ]
      },
      "scheduledFor": {
        "anyOf": [
          {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
            "description": "Date as YYYY-MM-DD"
          },
          {
            "type": "null"
          }
        ]
      },
      "isWarranty": {
        "type": "boolean"
      }
    },
    "required": [
      "id"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "ticket": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "ticketNumber": {
            "type": "string"
          },
          "accountId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "machineId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "contactId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Record id (UUID)"
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "mechanical",
              "electrical",
              "controls",
              "hydraulic",
              "pneumatic",
              "structural",
              "calibration",
              "operator_training",
              "other"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "normal",
              "high",
              "down"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "diagnosing",
              "parts_on_order",
              "scheduled",
              "waiting_on_customer",
              "resolved",
              "follow_up_complete"
            ]
          },
          "rootCause": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "component_failure",
                  "manufacturing_defect",
                  "wear",
                  "operator_error",
                  "installation",
                  "shipping_damage",
                  "environment",
                  "design",
                  "unknown"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "resolution": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "staff",
              "portal",
              "email",
              "agent"
            ]
          },
          "assignedToUserId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Record id (UUID)"
              },
              {
                "type": "null"
              }
            ]
          },
          "isWarranty": {
            "type": "boolean",
            "description": "Whether the work is covered by warranty"
          },
          "onsiteHours": {
            "type": "number",
            "minimum": 0,
            "description": "Total on-site hours logged"
          },
          "travelHours": {
            "type": "number",
            "minimum": 0,
            "description": "Total travel hours logged"
          },
          "travelMiles": {
            "type": "number",
            "minimum": 0,
            "description": "Total travel miles logged"
          },
          "openedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "UTC timestamp, ISO 8601 with Z"
          },
          "scheduledFor": {
            "anyOf": [
              {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                "description": "Date as YYYY-MM-DD"
              },
              {
                "type": "null"
              }
            ]
          },
          "resolvedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                "description": "UTC timestamp, ISO 8601 with Z"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "UTC timestamp, ISO 8601 with Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "UTC timestamp, ISO 8601 with Z"
          }
        },
        "required": [
          "id",
          "ticketNumber",
          "accountId",
          "machineId",
          "contactId",
          "title",
          "description",
          "category",
          "priority",
          "status",
          "rootCause",
          "resolution",
          "source",
          "assignedToUserId",
          "isWarranty",
          "onsiteHours",
          "travelHours",
          "travelMiles",
          "openedAt",
          "scheduledFor",
          "resolvedAt",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "machineEffect": {
        "type": "object",
        "properties": {
          "machine": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Record id (UUID)"
              },
              "serialNumber": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "plant",
                  "mixer",
                  "silo",
                  "feeder",
                  "power_pack"
                ]
              },
              "model": {
                "type": "string"
              },
              "configuration": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "accountId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Current owner"
              },
              "siteId": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "Record id (UUID)"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Current site"
              },
              "orderId": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "Record id (UUID)"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Order the machine was built for"
              },
              "productId": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "Record id (UUID)"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "in_build",
                  "in_transit",
                  "operating",
                  "down",
                  "idle",
                  "retired"
                ]
              },
              "builtOn": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "description": "Date as YYYY-MM-DD"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "shippedOn": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "description": "Date as YYYY-MM-DD"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "commissionedOn": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "description": "Date as YYYY-MM-DD"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "warrantyStart": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "description": "Date as YYYY-MM-DD"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "warrantyEnd": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "description": "Date as YYYY-MM-DD"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "warrantyState": {
                "type": "string",
                "enum": [
                  "none",
                  "active",
                  "expiring",
                  "expired"
                ],
                "description": "Computed from the warranty dates and today's date"
              },
              "warrantyDaysLeft": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Days until the warranty ends; negative once expired; null if not started"
              },
              "notes": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                "description": "UTC timestamp, ISO 8601 with Z"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                "description": "UTC timestamp, ISO 8601 with Z"
              }
            },
            "required": [
              "id",
              "serialNumber",
              "type",
              "model",
              "configuration",
              "options",
              "accountId",
              "siteId",
              "orderId",
              "productId",
              "status",
              "builtOn",
              "shippedOn",
              "commissionedOn",
              "warrantyStart",
              "warrantyEnd",
              "warrantyState",
              "warrantyDaysLeft",
              "notes",
              "createdAt",
              "updatedAt"
            ],
            "additionalProperties": false
          },
          "statusChanged": {
            "type": "boolean"
          },
          "previousStatus": {
            "type": "string"
          }
        },
        "required": [
          "machine",
          "statusChanged",
          "previousStatus"
        ],
        "additionalProperties": false
      }
    },
    "required": [
      "ticket",
      "machineEffect"
    ],
    "additionalProperties": false
  }
}
            

tickets.set_status

Change a ticket's status

Kind
Write (audited)
Who
Staff: admin, editor
MCP tool
tickets_set_status

Move a ticket to any status: new, diagnosing, parts_on_order, scheduled, waiting_on_customer, resolved, follow_up_complete. This is what a drag on the service board does. Resolving a down ticket returns its machine to operating (unless another down ticket is still open); reopening a down ticket marks the machine down again. Resolving records the resolved time; a root cause and resolution can be given in the same call.

Input (object)

FieldTypeDescription
idrequiredstringRecord id (UUID)min length 1, max length 64
statusrequired"new" | "diagnosing" | "parts_on_order" | "scheduled" | "waiting_on_customer" | "resolved" | "follow_up_complete"
rootCause"component_failure" | "manufacturing_defect" | "wear" | "operator_error" | "installation" | "shipping_damage" | "environment" | "design" | "unknown"
resolutionstringmax length 20000
scheduledForstring (date) | nullDate as YYYY-MM-DD
notestring | nullmax length 2000

Output (object)

FieldTypeDescription
ticketrequiredobject
idrequiredstringRecord id (UUID)min length 1, max length 64
ticketNumberrequiredstring
accountIdrequiredstringRecord id (UUID)min length 1, max length 64
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
contactIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
titlerequiredstring
descriptionrequiredstring | null
categoryrequired"mechanical" | "electrical" | "controls" | "hydraulic" | "pneumatic" | "structural" | "calibration" | "operator_training" | "other"
priorityrequired"low" | "normal" | "high" | "down"
statusrequired"new" | "diagnosing" | "parts_on_order" | "scheduled" | "waiting_on_customer" | "resolved" | "follow_up_complete"
rootCauserequired"component_failure" | "manufacturing_defect" | "wear" | "operator_error" | "installation" | "shipping_damage" | "environment" | "design" | "unknown" | null
resolutionrequiredstring | null
sourcerequired"staff" | "portal" | "email" | "agent"
assignedToUserIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
isWarrantyrequiredbooleanWhether the work is covered by warranty
onsiteHoursrequirednumberTotal on-site hours loggedmin 0
travelHoursrequirednumberTotal travel hours loggedmin 0
travelMilesrequirednumberTotal travel miles loggedmin 0
openedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
scheduledForrequiredstring (date) | nullDate as YYYY-MM-DD
resolvedAtrequiredstring (date-time) | nullUTC timestamp, ISO 8601 with Z
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
previousStatusrequired"new" | "diagnosing" | "parts_on_order" | "scheduled" | "waiting_on_customer" | "resolved" | "follow_up_complete"
machineEffectrequiredobject
machinerequiredobject
idrequiredstringRecord id (UUID)min length 1, max length 64
serialNumberrequiredstring
typerequired"plant" | "mixer" | "silo" | "feeder" | "power_pack"
modelrequiredstring
configurationrequiredstring | null
optionsrequiredstring[]
accountIdrequiredstringCurrent ownermin length 1, max length 64
siteIdrequiredstring | nullCurrent sitemin length 1, max length 64
orderIdrequiredstring | nullOrder the machine was built formin length 1, max length 64
productIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
statusrequired"in_build" | "in_transit" | "operating" | "down" | "idle" | "retired"
builtOnrequiredstring (date) | nullDate as YYYY-MM-DD
shippedOnrequiredstring (date) | nullDate as YYYY-MM-DD
commissionedOnrequiredstring (date) | nullDate as YYYY-MM-DD
warrantyStartrequiredstring (date) | nullDate as YYYY-MM-DD
warrantyEndrequiredstring (date) | nullDate as YYYY-MM-DD
warrantyStaterequired"none" | "active" | "expiring" | "expired"Computed from the warranty dates and today's date
warrantyDaysLeftrequiredinteger | nullDays until the warranty ends; negative once expired; null if not startedmin -9007199254740991, max 9007199254740991
notesrequiredstring | null
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
statusChangedrequiredboolean
previousStatusrequiredstring
Example request
                curl https://api.cemco.app/v1/ops/tickets.set_status \
  -H "x-api-key: $CEMCO_API_KEY" \
  -H "content-type: application/json" \
  -d '{"id":"00000000-0000-4000-8000-000000000000","status":"new"}'
              
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "status": {
        "type": "string",
        "enum": [
          "new",
          "diagnosing",
          "parts_on_order",
          "scheduled",
          "waiting_on_customer",
          "resolved",
          "follow_up_complete"
        ]
      },
      "rootCause": {
        "type": "string",
        "enum": [
          "component_failure",
          "manufacturing_defect",
          "wear",
          "operator_error",
          "installation",
          "shipping_damage",
          "environment",
          "design",
          "unknown"
        ]
      },
      "resolution": {
        "type": "string",
        "maxLength": 20000
      },
      "scheduledFor": {
        "anyOf": [
          {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
            "description": "Date as YYYY-MM-DD"
          },
          {
            "type": "null"
          }
        ]
      },
      "note": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 2000
          },
          {
            "type": "null"
          }
        ]
      }
    },
    "required": [
      "id",
      "status"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "ticket": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "ticketNumber": {
            "type": "string"
          },
          "accountId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "machineId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "contactId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Record id (UUID)"
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "mechanical",
              "electrical",
              "controls",
              "hydraulic",
              "pneumatic",
              "structural",
              "calibration",
              "operator_training",
              "other"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "normal",
              "high",
              "down"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "diagnosing",
              "parts_on_order",
              "scheduled",
              "waiting_on_customer",
              "resolved",
              "follow_up_complete"
            ]
          },
          "rootCause": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "component_failure",
                  "manufacturing_defect",
                  "wear",
                  "operator_error",
                  "installation",
                  "shipping_damage",
                  "environment",
                  "design",
                  "unknown"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "resolution": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "staff",
              "portal",
              "email",
              "agent"
            ]
          },
          "assignedToUserId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Record id (UUID)"
              },
              {
                "type": "null"
              }
            ]
          },
          "isWarranty": {
            "type": "boolean",
            "description": "Whether the work is covered by warranty"
          },
          "onsiteHours": {
            "type": "number",
            "minimum": 0,
            "description": "Total on-site hours logged"
          },
          "travelHours": {
            "type": "number",
            "minimum": 0,
            "description": "Total travel hours logged"
          },
          "travelMiles": {
            "type": "number",
            "minimum": 0,
            "description": "Total travel miles logged"
          },
          "openedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "UTC timestamp, ISO 8601 with Z"
          },
          "scheduledFor": {
            "anyOf": [
              {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                "description": "Date as YYYY-MM-DD"
              },
              {
                "type": "null"
              }
            ]
          },
          "resolvedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                "description": "UTC timestamp, ISO 8601 with Z"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "UTC timestamp, ISO 8601 with Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "UTC timestamp, ISO 8601 with Z"
          }
        },
        "required": [
          "id",
          "ticketNumber",
          "accountId",
          "machineId",
          "contactId",
          "title",
          "description",
          "category",
          "priority",
          "status",
          "rootCause",
          "resolution",
          "source",
          "assignedToUserId",
          "isWarranty",
          "onsiteHours",
          "travelHours",
          "travelMiles",
          "openedAt",
          "scheduledFor",
          "resolvedAt",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "previousStatus": {
        "type": "string",
        "enum": [
          "new",
          "diagnosing",
          "parts_on_order",
          "scheduled",
          "waiting_on_customer",
          "resolved",
          "follow_up_complete"
        ]
      },
      "machineEffect": {
        "type": "object",
        "properties": {
          "machine": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Record id (UUID)"
              },
              "serialNumber": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "plant",
                  "mixer",
                  "silo",
                  "feeder",
                  "power_pack"
                ]
              },
              "model": {
                "type": "string"
              },
              "configuration": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "accountId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Current owner"
              },
              "siteId": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "Record id (UUID)"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Current site"
              },
              "orderId": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "Record id (UUID)"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Order the machine was built for"
              },
              "productId": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "Record id (UUID)"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "in_build",
                  "in_transit",
                  "operating",
                  "down",
                  "idle",
                  "retired"
                ]
              },
              "builtOn": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "description": "Date as YYYY-MM-DD"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "shippedOn": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "description": "Date as YYYY-MM-DD"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "commissionedOn": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "description": "Date as YYYY-MM-DD"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "warrantyStart": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "description": "Date as YYYY-MM-DD"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "warrantyEnd": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "description": "Date as YYYY-MM-DD"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "warrantyState": {
                "type": "string",
                "enum": [
                  "none",
                  "active",
                  "expiring",
                  "expired"
                ],
                "description": "Computed from the warranty dates and today's date"
              },
              "warrantyDaysLeft": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Days until the warranty ends; negative once expired; null if not started"
              },
              "notes": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                "description": "UTC timestamp, ISO 8601 with Z"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                "description": "UTC timestamp, ISO 8601 with Z"
              }
            },
            "required": [
              "id",
              "serialNumber",
              "type",
              "model",
              "configuration",
              "options",
              "accountId",
              "siteId",
              "orderId",
              "productId",
              "status",
              "builtOn",
              "shippedOn",
              "commissionedOn",
              "warrantyStart",
              "warrantyEnd",
              "warrantyState",
              "warrantyDaysLeft",
              "notes",
              "createdAt",
              "updatedAt"
            ],
            "additionalProperties": false
          },
          "statusChanged": {
            "type": "boolean"
          },
          "previousStatus": {
            "type": "string"
          }
        },
        "required": [
          "machine",
          "statusChanged",
          "previousStatus"
        ],
        "additionalProperties": false
      }
    },
    "required": [
      "ticket",
      "previousStatus",
      "machineEffect"
    ],
    "additionalProperties": false
  }
}
            

tickets.log_parts

Log parts used on a ticket

Kind
Write (audited)
Who
Staff: admin, editor
MCP tool
tickets_log_parts

Record parts used to fix a ticket, by part id or part number. With deductStock true (the default) each part is taken out of stock through a ledger row. Parts on a warranty ticket are marked covered unless stated otherwise.

Input (object)

FieldTypeDescription
ticketIdrequiredstringRecord id (UUID)min length 1, max length 64
partsrequiredobject[]at least 1
partIdstringRecord id (UUID)min length 1, max length 64
partNumberstringmax length 60
quantityintegerdefault 1, min 1, max 9007199254740991
unitPriceCentsintegerDefaults to the catalog pricemin 0, max 9007199254740991
coveredByWarrantyboolean
deductStockbooleandefault true

Output (object)

FieldTypeDescription
partsrequiredobject[]
idrequiredstringRecord id (UUID)min length 1, max length 64
ticketIdrequiredstringRecord id (UUID)min length 1, max length 64
partIdrequiredstringRecord id (UUID)min length 1, max length 64
partNumberrequiredstring
descriptionrequiredstring
quantityrequiredintegermin 1, max 9007199254740991
unitPriceCentsrequiredintegerAmount in integer US cents (zero or more)min 0, max 9007199254740991
coveredByWarrantyrequiredboolean
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
stockMovementIdsrequiredstring[]
lowStockPartNumbersrequiredstring[]Parts now at or below their reorder point
Example request
                curl https://api.cemco.app/v1/ops/tickets.log_parts \
  -H "x-api-key: $CEMCO_API_KEY" \
  -H "content-type: application/json" \
  -d '{"ticketId":"00000000-0000-4000-8000-000000000000","parts":[{"partId":"00000000-0000-4000-8000-000000000000"}]}'
              
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "ticketId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "parts": {
        "minItems": 1,
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "partId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "partNumber": {
              "type": "string",
              "maxLength": 60
            },
            "quantity": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            "unitPriceCents": {
              "description": "Defaults to the catalog price",
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "coveredByWarranty": {
              "type": "boolean"
            }
          }
        }
      },
      "deductStock": {
        "default": true,
        "type": "boolean"
      }
    },
    "required": [
      "ticketId",
      "parts"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "parts": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "ticketId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "partId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "partNumber": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "quantity": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            "unitPriceCents": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Amount in integer US cents (zero or more)"
            },
            "coveredByWarranty": {
              "type": "boolean"
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
              "description": "UTC timestamp, ISO 8601 with Z"
            }
          },
          "required": [
            "id",
            "ticketId",
            "partId",
            "partNumber",
            "description",
            "quantity",
            "unitPriceCents",
            "coveredByWarranty",
            "createdAt"
          ],
          "additionalProperties": false
        }
      },
      "stockMovementIds": {
        "type": "array",
        "items": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64,
          "description": "Record id (UUID)"
        }
      },
      "lowStockPartNumbers": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Parts now at or below their reorder point"
      }
    },
    "required": [
      "parts",
      "stockMovementIds",
      "lowStockPartNumbers"
    ],
    "additionalProperties": false
  }
}
            

tickets.remove_part

Remove a part from a ticket

Kind
Write (audited)
Who
Staff: admin, editor
MCP tool
tickets_remove_part

Remove a part line logged on a ticket by mistake. If stock was deducted for it, the stock is returned through a ledger row.

Input (object)

FieldTypeDescription
ticketPartIdrequiredstringRecord id (UUID)min length 1, max length 64

Output (object)

FieldTypeDescription
okrequiredtrue
idrequiredstringRecord id (UUID)min length 1, max length 64
Example request
                curl https://api.cemco.app/v1/ops/tickets.remove_part \
  -H "x-api-key: $CEMCO_API_KEY" \
  -H "content-type: application/json" \
  -d '{"ticketPartId":"00000000-0000-4000-8000-000000000000"}'
              
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "ticketPartId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      }
    },
    "required": [
      "ticketPartId"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "ok": {
        "type": "boolean",
        "const": true
      },
      "id": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      }
    },
    "required": [
      "ok",
      "id"
    ],
    "additionalProperties": false
  }
}
            

tickets.log_time

Log time and travel on a ticket

Kind
Write (audited)
Who
Staff: admin, editor
MCP tool
tickets_log_time

Record on-site hours, travel hours and travel miles for a day of work on a ticket. The ticket's totals are the sum of its time entries.

Input (object)

FieldTypeDescription
ticketIdrequiredstringRecord id (UUID)min length 1, max length 64
workDatestring (date)Defaults to today
onsiteHoursnumberdefault 0, min 0, max 24
travelHoursnumberdefault 0, min 0, max 48
travelMilesnumberdefault 0, min 0, max 10000
technicianNamestringDefaults to the caller's namemax length 200
notestring | nullmax length 2000

Output (object)

FieldTypeDescription
entryrequiredobject
idrequiredstringRecord id (UUID)min length 1, max length 64
ticketIdrequiredstringRecord id (UUID)min length 1, max length 64
workDaterequiredstring (date)Date as YYYY-MM-DD
onsiteHoursrequirednumbermin 0
travelHoursrequirednumbermin 0
travelMilesrequirednumbermin 0
technicianNamerequiredstring
noterequiredstring | null
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
ticketrequiredobject
idrequiredstringRecord id (UUID)min length 1, max length 64
ticketNumberrequiredstring
accountIdrequiredstringRecord id (UUID)min length 1, max length 64
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
contactIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
titlerequiredstring
descriptionrequiredstring | null
categoryrequired"mechanical" | "electrical" | "controls" | "hydraulic" | "pneumatic" | "structural" | "calibration" | "operator_training" | "other"
priorityrequired"low" | "normal" | "high" | "down"
statusrequired"new" | "diagnosing" | "parts_on_order" | "scheduled" | "waiting_on_customer" | "resolved" | "follow_up_complete"
rootCauserequired"component_failure" | "manufacturing_defect" | "wear" | "operator_error" | "installation" | "shipping_damage" | "environment" | "design" | "unknown" | null
resolutionrequiredstring | null
sourcerequired"staff" | "portal" | "email" | "agent"
assignedToUserIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
isWarrantyrequiredbooleanWhether the work is covered by warranty
onsiteHoursrequirednumberTotal on-site hours loggedmin 0
travelHoursrequirednumberTotal travel hours loggedmin 0
travelMilesrequirednumberTotal travel miles loggedmin 0
openedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
scheduledForrequiredstring (date) | nullDate as YYYY-MM-DD
resolvedAtrequiredstring (date-time) | nullUTC timestamp, ISO 8601 with Z
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
Example request
                curl https://api.cemco.app/v1/ops/tickets.log_time \
  -H "x-api-key: $CEMCO_API_KEY" \
  -H "content-type: application/json" \
  -d '{"ticketId":"00000000-0000-4000-8000-000000000000","onsiteHours":1}'
              
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "ticketId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "workDate": {
        "description": "Defaults to today",
        "type": "string",
        "format": "date",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
      },
      "onsiteHours": {
        "default": 0,
        "type": "number",
        "minimum": 0,
        "maximum": 24
      },
      "travelHours": {
        "default": 0,
        "type": "number",
        "minimum": 0,
        "maximum": 48
      },
      "travelMiles": {
        "default": 0,
        "type": "number",
        "minimum": 0,
        "maximum": 10000
      },
      "technicianName": {
        "description": "Defaults to the caller's name",
        "type": "string",
        "maxLength": 200
      },
      "note": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 2000
          },
          {
            "type": "null"
          }
        ]
      }
    },
    "required": [
      "ticketId"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "entry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "ticketId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "workDate": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
            "description": "Date as YYYY-MM-DD"
          },
          "onsiteHours": {
            "type": "number",
            "minimum": 0
          },
          "travelHours": {
            "type": "number",
            "minimum": 0
          },
          "travelMiles": {
            "type": "number",
            "minimum": 0
          },
          "technicianName": {
            "type": "string"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "UTC timestamp, ISO 8601 with Z"
          }
        },
        "required": [
          "id",
          "ticketId",
          "workDate",
          "onsiteHours",
          "travelHours",
          "travelMiles",
          "technicianName",
          "note",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "ticket": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "ticketNumber": {
            "type": "string"
          },
          "accountId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "machineId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "contactId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Record id (UUID)"
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "mechanical",
              "electrical",
              "controls",
              "hydraulic",
              "pneumatic",
              "structural",
              "calibration",
              "operator_training",
              "other"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "normal",
              "high",
              "down"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "diagnosing",
              "parts_on_order",
              "scheduled",
              "waiting_on_customer",
              "resolved",
              "follow_up_complete"
            ]
          },
          "rootCause": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "component_failure",
                  "manufacturing_defect",
                  "wear",
                  "operator_error",
                  "installation",
                  "shipping_damage",
                  "environment",
                  "design",
                  "unknown"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "resolution": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "staff",
              "portal",
              "email",
              "agent"
            ]
          },
          "assignedToUserId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Record id (UUID)"
              },
              {
                "type": "null"
              }
            ]
          },
          "isWarranty": {
            "type": "boolean",
            "description": "Whether the work is covered by warranty"
          },
          "onsiteHours": {
            "type": "number",
            "minimum": 0,
            "description": "Total on-site hours logged"
          },
          "travelHours": {
            "type": "number",
            "minimum": 0,
            "description": "Total travel hours logged"
          },
          "travelMiles": {
            "type": "number",
            "minimum": 0,
            "description": "Total travel miles logged"
          },
          "openedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "UTC timestamp, ISO 8601 with Z"
          },
          "scheduledFor": {
            "anyOf": [
              {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                "description": "Date as YYYY-MM-DD"
              },
              {
                "type": "null"
              }
            ]
          },
          "resolvedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                "description": "UTC timestamp, ISO 8601 with Z"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "UTC timestamp, ISO 8601 with Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "UTC timestamp, ISO 8601 with Z"
          }
        },
        "required": [
          "id",
          "ticketNumber",
          "accountId",
          "machineId",
          "contactId",
          "title",
          "description",
          "category",
          "priority",
          "status",
          "rootCause",
          "resolution",
          "source",
          "assignedToUserId",
          "isWarranty",
          "onsiteHours",
          "travelHours",
          "travelMiles",
          "openedAt",
          "scheduledFor",
          "resolvedAt",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      }
    },
    "required": [
      "entry",
      "ticket"
    ],
    "additionalProperties": false
  }
}