Skip to content

Installed base, warranty, training, service plans and contracts

Generated at build time from packages/core/src/operations/machines.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.

machines.list

List the installed base

Kind
Read
Who
Staff: admin, editor, viewer
MCP tool
machines_list
In-chat view
ui://cemco/installed-base.html

Every plant, mixer, silo, feeder belt and power pack Cemco has built, as a table. Filter by owner, site, state, model, type, status and warranty state. Each row carries the owner and site names, the warranty state and days left, and the count of open tickets.

Input (object)

FieldTypeDescription
accountIdstringOwnermin length 1, max length 64
siteIdstringRecord id (UUID)min length 1, max length 64
statestringState of the current site, for example TXmax length 40
modelstringmax length 100
type"plant" | "mixer" | "silo" | "feeder" | "power_pack"
status"in_build" | "in_transit" | "operating" | "down" | "idle" | "retired"
warranty"none" | "active" | "expiring" | "expired"none, active, expiring (ends within 60 days) or expired
orderIdstringRecord id (UUID)min length 1, max length 64
querystringMatches serial number, model, configuration or owner namemax length 200
sort"serial" | "owner" | "warranty_end" | "newest"default "serial"
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
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
accountNamerequiredstring
siteNamerequiredstring | null
siteCityrequiredstring | null
siteStaterequiredstring | null
latituderequirednumber | null
longituderequirednumber | null
openTicketCountrequiredintegermin -9007199254740991, max 9007199254740991
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/machines.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": {
        "description": "Owner",
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      },
      "siteId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "state": {
        "description": "State of the current site, for example TX",
        "type": "string",
        "maxLength": 40
      },
      "model": {
        "type": "string",
        "maxLength": 100
      },
      "type": {
        "type": "string",
        "enum": [
          "plant",
          "mixer",
          "silo",
          "feeder",
          "power_pack"
        ]
      },
      "status": {
        "type": "string",
        "enum": [
          "in_build",
          "in_transit",
          "operating",
          "down",
          "idle",
          "retired"
        ]
      },
      "warranty": {
        "description": "none, active, expiring (ends within 60 days) or expired",
        "type": "string",
        "enum": [
          "none",
          "active",
          "expiring",
          "expired"
        ]
      },
      "orderId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "query": {
        "description": "Matches serial number, model, configuration or owner name",
        "type": "string",
        "maxLength": 200
      },
      "sort": {
        "default": "serial",
        "type": "string",
        "enum": [
          "serial",
          "owner",
          "warranty_end",
          "newest"
        ]
      },
      "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)"
            },
            "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"
            },
            "accountName": {
              "type": "string"
            },
            "siteName": {
              "type": [
                "string",
                "null"
              ]
            },
            "siteCity": {
              "type": [
                "string",
                "null"
              ]
            },
            "siteState": {
              "type": [
                "string",
                "null"
              ]
            },
            "latitude": {
              "type": [
                "number",
                "null"
              ]
            },
            "longitude": {
              "type": [
                "number",
                "null"
              ]
            },
            "openTicketCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "id",
            "serialNumber",
            "type",
            "model",
            "configuration",
            "options",
            "accountId",
            "siteId",
            "orderId",
            "productId",
            "status",
            "builtOn",
            "shippedOn",
            "commissionedOn",
            "warrantyStart",
            "warrantyEnd",
            "warrantyState",
            "warrantyDaysLeft",
            "notes",
            "createdAt",
            "updatedAt",
            "accountName",
            "siteName",
            "siteCity",
            "siteState",
            "latitude",
            "longitude",
            "openTicketCount"
          ],
          "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
  }
}
            

machines.map

Get installed-base map points

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

Machines as map points (latitude and longitude of their current site), with the same filters as machines.list. Machines whose site has no coordinates are counted in unmapped and left off.

Input (object)

FieldTypeDescription
accountIdstringOwnermin length 1, max length 64
siteIdstringRecord id (UUID)min length 1, max length 64
statestringState of the current site, for example TXmax length 40
modelstringmax length 100
type"plant" | "mixer" | "silo" | "feeder" | "power_pack"
status"in_build" | "in_transit" | "operating" | "down" | "idle" | "retired"
warranty"none" | "active" | "expiring" | "expired"none, active, expiring (ends within 60 days) or expired
orderIdstringRecord id (UUID)min length 1, max length 64
querystringMatches serial number, model, configuration or owner namemax length 200

Output (object)

FieldTypeDescription
pointsrequiredobject[]
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
serialNumberrequiredstring
modelrequiredstring
typerequired"plant" | "mixer" | "silo" | "feeder" | "power_pack"
statusrequired"in_build" | "in_transit" | "operating" | "down" | "idle" | "retired"
warrantyStaterequired"none" | "active" | "expiring" | "expired"
accountIdrequiredstringRecord id (UUID)min length 1, max length 64
accountNamerequiredstring
siteIdrequiredstringRecord id (UUID)min length 1, max length 64
siteNamerequiredstring
cityrequiredstring | null
staterequiredstring | null
latituderequirednumber
longituderequirednumber
unmappedrequiredintegermin -9007199254740991, max 9007199254740991
Example request
                curl https://api.cemco.app/v1/ops/machines.map \
  -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": {
        "description": "Owner",
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      },
      "siteId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "state": {
        "description": "State of the current site, for example TX",
        "type": "string",
        "maxLength": 40
      },
      "model": {
        "type": "string",
        "maxLength": 100
      },
      "type": {
        "type": "string",
        "enum": [
          "plant",
          "mixer",
          "silo",
          "feeder",
          "power_pack"
        ]
      },
      "status": {
        "type": "string",
        "enum": [
          "in_build",
          "in_transit",
          "operating",
          "down",
          "idle",
          "retired"
        ]
      },
      "warranty": {
        "description": "none, active, expiring (ends within 60 days) or expired",
        "type": "string",
        "enum": [
          "none",
          "active",
          "expiring",
          "expired"
        ]
      },
      "orderId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "query": {
        "description": "Matches serial number, model, configuration or owner name",
        "type": "string",
        "maxLength": 200
      }
    }
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "points": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "machineId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "serialNumber": {
              "type": "string"
            },
            "model": {
              "type": "string"
            },
            "type": {
              "type": "string",
              "enum": [
                "plant",
                "mixer",
                "silo",
                "feeder",
                "power_pack"
              ]
            },
            "status": {
              "type": "string",
              "enum": [
                "in_build",
                "in_transit",
                "operating",
                "down",
                "idle",
                "retired"
              ]
            },
            "warrantyState": {
              "type": "string",
              "enum": [
                "none",
                "active",
                "expiring",
                "expired"
              ]
            },
            "accountId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "accountName": {
              "type": "string"
            },
            "siteId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "siteName": {
              "type": "string"
            },
            "city": {
              "type": [
                "string",
                "null"
              ]
            },
            "state": {
              "type": [
                "string",
                "null"
              ]
            },
            "latitude": {
              "type": "number"
            },
            "longitude": {
              "type": "number"
            }
          },
          "required": [
            "machineId",
            "serialNumber",
            "model",
            "type",
            "status",
            "warrantyState",
            "accountId",
            "accountName",
            "siteId",
            "siteName",
            "city",
            "state",
            "latitude",
            "longitude"
          ],
          "additionalProperties": false
        }
      },
      "unmapped": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      }
    },
    "required": [
      "points",
      "unmapped"
    ],
    "additionalProperties": false
  }
}
            

machines.get

Get a machine

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

One machine by id or serial number with its full history: site moves, owners, service plans and contracts, commissioning and training records, check-ins, tickets, warranty claims and documents.

Input (object)

FieldTypeDescription
idstringRecord id (UUID)min length 1, max length 64
serialNumberstringmax length 60

Output (object)

FieldTypeDescription
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
accountNamerequiredstring
siteNamerequiredstring | null
siteCityrequiredstring | null
siteStaterequiredstring | null
latituderequirednumber | null
longituderequirednumber | null
openTicketCountrequiredintegermin -9007199254740991, max 9007199254740991
locationsrequiredobject[]
idrequiredstringRecord id (UUID)min length 1, max length 64
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
siteIdrequiredstringRecord id (UUID)min length 1, max length 64
siteNamerequiredstring
movedInOnrequiredstring (date)Date as YYYY-MM-DD
movedOutOnrequiredstring (date) | nullDate as YYYY-MM-DD
noterequiredstring | null
ownersrequiredobject[]
idrequiredstringRecord 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
accountNamerequiredstring
fromDaterequiredstring (date)Date as YYYY-MM-DD
toDaterequiredstring (date) | nullDate as YYYY-MM-DD
noterequiredstring | null
servicePlansrequiredobject[]
idrequiredstringRecord id (UUID)min length 1, max length 64
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
namerequiredstringFor example Gearbox oil change
intervalDaysrequiredintegermin 1, max 9007199254740991
lastDoneOnrequiredstring (date) | nullDate as YYYY-MM-DD
nextDueOnrequiredstring (date)Date as YYYY-MM-DD
recommendedPartIdsrequiredstring[]Spare parts normally used for this service
notesrequiredstring | null
activerequiredboolean
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
serviceContractsrequiredobject[]
idrequiredstringRecord 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
planNamerequiredstring
startsOnrequiredstring (date)Date as YYYY-MM-DD
renewsOnrequiredstring (date)Date as YYYY-MM-DD
priceCentsrequiredintegerAmount in integer US cents (zero or more)min 0, max 9007199254740991
statusrequired"active" | "expired" | "cancelled"
notesrequiredstring | null
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
trainingRecordsrequiredobject[]
idrequiredstringRecord id (UUID)min length 1, max length 64
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
orderIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
setUpOnrequiredstring (date) | nullDate as YYYY-MM-DD
firstBatchOnrequiredstring (date) | nullDate as YYYY-MM-DD
trainedOnrequiredstring (date)Date as YYYY-MM-DD
trainerNamerequiredstring
traineesrequiredobject[]
namerequiredstringmin length 1
rolestring | null
contactIdstring | nullRecord id (UUID)min length 1, max length 64
topicsrequiredstring | null
punchListrequiredobject[]
itemrequiredstringmin length 1
donerequiredboolean
customerSignoffNamerequiredstring | null
customerSignedOnrequiredstring (date) | nullDate as YYYY-MM-DD
signoffDocumentIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
notesrequiredstring | null
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
checkInsrequiredobject[]
idrequiredstringRecord id (UUID)min length 1, max length 64
accountIdrequiredstringRecord id (UUID)min length 1, max length 64
machineIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
orderIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
kindrequired"day_30" | "day_90" | "day_365" | "pre_season" | "ad_hoc"
dueOnrequiredstring (date)Date as YYYY-MM-DD
statusrequired"scheduled" | "completed" | "skipped"
completedOnrequiredstring (date) | nullDate as YYYY-MM-DD
outcomerequiredstring | nullWhat was learned on the call or visit
taskIdrequiredstring | nullTask that puts the check-in on the agenda and calendarmin length 1, max length 64
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
ticketsrequiredobject[]
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
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
Example request
                curl https://api.cemco.app/v1/ops/machines.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)"
      },
      "serialNumber": {
        "type": "string",
        "maxLength": 60
      }
    }
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "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"
      },
      "accountName": {
        "type": "string"
      },
      "siteName": {
        "type": [
          "string",
          "null"
        ]
      },
      "siteCity": {
        "type": [
          "string",
          "null"
        ]
      },
      "siteState": {
        "type": [
          "string",
          "null"
        ]
      },
      "latitude": {
        "type": [
          "number",
          "null"
        ]
      },
      "longitude": {
        "type": [
          "number",
          "null"
        ]
      },
      "openTicketCount": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      },
      "locations": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "machineId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "siteId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "siteName": {
              "type": "string"
            },
            "movedInOn": {
              "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"
            },
            "movedOutOn": {
              "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": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "id",
            "machineId",
            "siteId",
            "siteName",
            "movedInOn",
            "movedOutOn",
            "note"
          ],
          "additionalProperties": false
        }
      },
      "owners": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "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)"
            },
            "accountName": {
              "type": "string"
            },
            "fromDate": {
              "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"
            },
            "toDate": {
              "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": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "id",
            "machineId",
            "accountId",
            "accountName",
            "fromDate",
            "toDate",
            "note"
          ],
          "additionalProperties": false
        }
      },
      "servicePlans": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "machineId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "name": {
              "type": "string",
              "description": "For example Gearbox oil change"
            },
            "intervalDays": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            "lastDoneOn": {
              "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"
                }
              ]
            },
            "nextDueOn": {
              "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"
            },
            "recommendedPartIds": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Record id (UUID)"
              },
              "description": "Spare parts normally used for this service"
            },
            "notes": {
              "type": [
                "string",
                "null"
              ]
            },
            "active": {
              "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"
            },
            "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",
            "machineId",
            "name",
            "intervalDays",
            "lastDoneOn",
            "nextDueOn",
            "recommendedPartIds",
            "notes",
            "active",
            "createdAt",
            "updatedAt"
          ],
          "additionalProperties": false
        }
      },
      "serviceContracts": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "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)"
            },
            "planName": {
              "type": "string"
            },
            "startsOn": {
              "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"
            },
            "renewsOn": {
              "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"
            },
            "priceCents": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Amount in integer US cents (zero or more)"
            },
            "status": {
              "type": "string",
              "enum": [
                "active",
                "expired",
                "cancelled"
              ]
            },
            "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",
            "machineId",
            "accountId",
            "planName",
            "startsOn",
            "renewsOn",
            "priceCents",
            "status",
            "notes",
            "createdAt",
            "updatedAt"
          ],
          "additionalProperties": false
        }
      },
      "trainingRecords": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "machineId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "orderId": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Record id (UUID)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "setUpOn": {
              "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"
                }
              ]
            },
            "firstBatchOn": {
              "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"
                }
              ]
            },
            "trainedOn": {
              "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"
            },
            "trainerName": {
              "type": "string"
            },
            "trainees": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "role": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "contactId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "description": "Record id (UUID)"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            },
            "topics": {
              "type": [
                "string",
                "null"
              ]
            },
            "punchList": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "item": {
                    "type": "string",
                    "minLength": 1
                  },
                  "done": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "item",
                  "done"
                ],
                "additionalProperties": false
              }
            },
            "customerSignoffName": {
              "type": [
                "string",
                "null"
              ]
            },
            "customerSignedOn": {
              "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"
                }
              ]
            },
            "signoffDocumentId": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Record id (UUID)"
                },
                {
                  "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"
            }
          },
          "required": [
            "id",
            "machineId",
            "orderId",
            "setUpOn",
            "firstBatchOn",
            "trainedOn",
            "trainerName",
            "trainees",
            "topics",
            "punchList",
            "customerSignoffName",
            "customerSignedOn",
            "signoffDocumentId",
            "notes",
            "createdAt"
          ],
          "additionalProperties": false
        }
      },
      "checkIns": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "accountId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "machineId": {
              "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"
                }
              ]
            },
            "kind": {
              "type": "string",
              "enum": [
                "day_30",
                "day_90",
                "day_365",
                "pre_season",
                "ad_hoc"
              ]
            },
            "dueOn": {
              "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"
            },
            "status": {
              "type": "string",
              "enum": [
                "scheduled",
                "completed",
                "skipped"
              ]
            },
            "completedOn": {
              "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"
                }
              ]
            },
            "outcome": {
              "description": "What was learned on the call or visit",
              "type": [
                "string",
                "null"
              ]
            },
            "taskId": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Record id (UUID)"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Task that puts the check-in on the agenda and calendar"
            },
            "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",
            "accountId",
            "machineId",
            "orderId",
            "kind",
            "dueOn",
            "status",
            "completedOn",
            "outcome",
            "taskId",
            "createdAt",
            "updatedAt"
          ],
          "additionalProperties": false
        }
      },
      "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
        }
      },
      "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
        }
      }
    },
    "required": [
      "id",
      "serialNumber",
      "type",
      "model",
      "configuration",
      "options",
      "accountId",
      "siteId",
      "orderId",
      "productId",
      "status",
      "builtOn",
      "shippedOn",
      "commissionedOn",
      "warrantyStart",
      "warrantyEnd",
      "warrantyState",
      "warrantyDaysLeft",
      "notes",
      "createdAt",
      "updatedAt",
      "accountName",
      "siteName",
      "siteCity",
      "siteState",
      "latitude",
      "longitude",
      "openTicketCount",
      "locations",
      "owners",
      "servicePlans",
      "serviceContracts",
      "trainingRecords",
      "checkIns",
      "tickets",
      "warrantyClaims",
      "documents"
    ],
    "additionalProperties": false
  }
}
            

machines.lookup_serial

Find a machine by serial number

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

Field lookup: find machines from a full or partial serial number as read off the nameplate. Case, spaces and dashes are ignored. Returns the closest matches, exact match first.

Input (object)

FieldTypeDescription
serialrequiredstringSerial number or part of itmin length 2, max length 60
limitintegerdefault 10, min 1, max 25

Output (object)

FieldTypeDescription
exactrequiredobject | null
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
accountNamerequiredstring
siteNamerequiredstring | null
siteCityrequiredstring | null
siteStaterequiredstring | null
latituderequirednumber | null
longituderequirednumber | null
openTicketCountrequiredintegermin -9007199254740991, max 9007199254740991
matchesrequiredobject[]
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
accountNamerequiredstring
siteNamerequiredstring | null
siteCityrequiredstring | null
siteStaterequiredstring | null
latituderequirednumber | null
longituderequirednumber | null
openTicketCountrequiredintegermin -9007199254740991, max 9007199254740991
Example request
                curl https://api.cemco.app/v1/ops/machines.lookup_serial \
  -H "x-api-key: $CEMCO_API_KEY" \
  -H "content-type: application/json" \
  -d '{"serial":"example"}'
              
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "serial": {
        "type": "string",
        "minLength": 2,
        "maxLength": 60,
        "description": "Serial number or part of it"
      },
      "limit": {
        "default": 10,
        "type": "integer",
        "minimum": 1,
        "maximum": 25
      }
    },
    "required": [
      "serial"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "exact": {
        "anyOf": [
          {
            "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"
              },
              "accountName": {
                "type": "string"
              },
              "siteName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "siteCity": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "siteState": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "latitude": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "longitude": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "openTicketCount": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "id",
              "serialNumber",
              "type",
              "model",
              "configuration",
              "options",
              "accountId",
              "siteId",
              "orderId",
              "productId",
              "status",
              "builtOn",
              "shippedOn",
              "commissionedOn",
              "warrantyStart",
              "warrantyEnd",
              "warrantyState",
              "warrantyDaysLeft",
              "notes",
              "createdAt",
              "updatedAt",
              "accountName",
              "siteName",
              "siteCity",
              "siteState",
              "latitude",
              "longitude",
              "openTicketCount"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "matches": {
        "type": "array",
        "items": {
          "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"
            },
            "accountName": {
              "type": "string"
            },
            "siteName": {
              "type": [
                "string",
                "null"
              ]
            },
            "siteCity": {
              "type": [
                "string",
                "null"
              ]
            },
            "siteState": {
              "type": [
                "string",
                "null"
              ]
            },
            "latitude": {
              "type": [
                "number",
                "null"
              ]
            },
            "longitude": {
              "type": [
                "number",
                "null"
              ]
            },
            "openTicketCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "id",
            "serialNumber",
            "type",
            "model",
            "configuration",
            "options",
            "accountId",
            "siteId",
            "orderId",
            "productId",
            "status",
            "builtOn",
            "shippedOn",
            "commissionedOn",
            "warrantyStart",
            "warrantyEnd",
            "warrantyState",
            "warrantyDaysLeft",
            "notes",
            "createdAt",
            "updatedAt",
            "accountName",
            "siteName",
            "siteCity",
            "siteState",
            "latitude",
            "longitude",
            "openTicketCount"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "exact",
      "matches"
    ],
    "additionalProperties": false
  }
}
            

machines.identify_nameplate

Find a machine from a nameplate photo

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

Field lookup from a photo: reads the serial number off a nameplate photo and looks the machine up. Returns the text that was read, candidate serial numbers and matching machines. available is false when no vision model is configured; in that case read the serial yourself and call machines.lookup_serial.

Input (object)

FieldTypeDescription
imageBase64requiredstringJPEG, PNG or WebP photo of the nameplate, base64 encoded, at most 5 MB once decodedmin length 1, max length 7200000
contentType"image/jpeg" | "image/png" | "image/webp"default "image/jpeg"

Output (object)

FieldTypeDescription
availablerequiredboolean
textrequiredstring | nullText read from the nameplate
candidatesrequiredstring[]Serial numbers found in the text
matchesrequiredobject[]
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
accountNamerequiredstring
siteNamerequiredstring | null
siteCityrequiredstring | null
siteStaterequiredstring | null
latituderequirednumber | null
longituderequirednumber | null
openTicketCountrequiredintegermin -9007199254740991, max 9007199254740991
Example request
                curl https://api.cemco.app/v1/ops/machines.identify_nameplate \
  -H "x-api-key: $CEMCO_API_KEY" \
  -H "content-type: application/json" \
  -d '{"imageBase64":"example"}'
              
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "imageBase64": {
        "type": "string",
        "minLength": 1,
        "maxLength": 7200000,
        "description": "JPEG, PNG or WebP photo of the nameplate, base64 encoded, at most 5 MB once decoded"
      },
      "contentType": {
        "default": "image/jpeg",
        "type": "string",
        "enum": [
          "image/jpeg",
          "image/png",
          "image/webp"
        ]
      }
    },
    "required": [
      "imageBase64"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "available": {
        "type": "boolean"
      },
      "text": {
        "description": "Text read from the nameplate",
        "type": [
          "string",
          "null"
        ]
      },
      "candidates": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Serial numbers found in the text"
      },
      "matches": {
        "type": "array",
        "items": {
          "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"
            },
            "accountName": {
              "type": "string"
            },
            "siteName": {
              "type": [
                "string",
                "null"
              ]
            },
            "siteCity": {
              "type": [
                "string",
                "null"
              ]
            },
            "siteState": {
              "type": [
                "string",
                "null"
              ]
            },
            "latitude": {
              "type": [
                "number",
                "null"
              ]
            },
            "longitude": {
              "type": [
                "number",
                "null"
              ]
            },
            "openTicketCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "id",
            "serialNumber",
            "type",
            "model",
            "configuration",
            "options",
            "accountId",
            "siteId",
            "orderId",
            "productId",
            "status",
            "builtOn",
            "shippedOn",
            "commissionedOn",
            "warrantyStart",
            "warrantyEnd",
            "warrantyState",
            "warrantyDaysLeft",
            "notes",
            "createdAt",
            "updatedAt",
            "accountName",
            "siteName",
            "siteCity",
            "siteState",
            "latitude",
            "longitude",
            "openTicketCount"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "available",
      "text",
      "candidates",
      "matches"
    ],
    "additionalProperties": false
  }
}
            

machines.register

Register a machine

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

Add a machine to the installed base with its unique serial number, type, model, configuration and options, owner and (optionally) the order it was built for and its current site. Fails with a conflict if the serial number already exists. Warranty dates are normally left empty; they are set when the order is commissioned.

Input (object)

FieldTypeDescription
serialNumberrequiredstringmin length 1, max length 60
typerequired"plant" | "mixer" | "silo" | "feeder" | "power_pack"
modelrequiredstringmin length 1, max length 100
configurationstring | nullmax length 500
optionsstring[]default []
accountIdrequiredstringOwnermin length 1, max length 64
siteIdstring | nullRecord id (UUID)min length 1, max length 64
orderIdstring | nullRecord id (UUID)min length 1, max length 64
productIdstring | nullRecord id (UUID)min length 1, max length 64
status"in_build" | "in_transit" | "operating" | "down" | "idle" | "retired"default "in_build"
builtOnstring (date) | nullDate as YYYY-MM-DD
shippedOnstring (date) | nullDate as YYYY-MM-DD
commissionedOnstring (date) | nullDate as YYYY-MM-DD
warrantyStartstring (date) | nullDate as YYYY-MM-DD
warrantyEndstring (date) | nullDate as YYYY-MM-DD
notesstring | nullmax length 20000

Output (object)

FieldTypeDescription
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/machines.register \
  -H "x-api-key: $CEMCO_API_KEY" \
  -H "content-type: application/json" \
  -d '{"serialNumber":"example","type":"plant","model":"example","accountId":"00000000-0000-4000-8000-000000000000"}'
              
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "serialNumber": {
        "type": "string",
        "minLength": 1,
        "maxLength": 60
      },
      "type": {
        "type": "string",
        "enum": [
          "plant",
          "mixer",
          "silo",
          "feeder",
          "power_pack"
        ]
      },
      "model": {
        "type": "string",
        "minLength": 1,
        "maxLength": 100
      },
      "configuration": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 500
          },
          {
            "type": "null"
          }
        ]
      },
      "options": {
        "default": [],
        "type": "array",
        "items": {
          "type": "string",
          "maxLength": 200
        }
      },
      "accountId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Owner"
      },
      "siteId": {
        "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"
          }
        ]
      },
      "productId": {
        "anyOf": [
          {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          {
            "type": "null"
          }
        ]
      },
      "status": {
        "default": "in_build",
        "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"
          }
        ]
      },
      "notes": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 20000
          },
          {
            "type": "null"
          }
        ]
      }
    },
    "required": [
      "serialNumber",
      "type",
      "model",
      "accountId"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "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
      }
    },
    "required": [
      "machine"
    ],
    "additionalProperties": false
  }
}
            

machines.update

Update a machine

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

Change a machine's model, configuration, options, status, dates, warranty dates or notes. Only the fields you send are changed. To move it to another site use machines.move_site; to change the owner use machines.change_owner.

Input (object)

FieldTypeDescription
idrequiredstringRecord id (UUID)min length 1, max length 64
serialNumberstringmin length 1, max length 60
type"plant" | "mixer" | "silo" | "feeder" | "power_pack"
modelstringmin length 1, max length 100
configurationstring | nullmax length 500
optionsstring[]
orderIdstring | nullRecord id (UUID)min length 1, max length 64
productIdstring | nullRecord id (UUID)min length 1, max length 64
status"in_build" | "in_transit" | "operating" | "down" | "idle" | "retired"
builtOnstring (date) | nullDate as YYYY-MM-DD
shippedOnstring (date) | nullDate as YYYY-MM-DD
commissionedOnstring (date) | nullDate as YYYY-MM-DD
warrantyStartstring (date) | nullDate as YYYY-MM-DD
warrantyEndstring (date) | nullDate as YYYY-MM-DD
notesstring | nullmax length 20000

Output (object)

FieldTypeDescription
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/machines.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)"
      },
      "serialNumber": {
        "type": "string",
        "minLength": 1,
        "maxLength": 60
      },
      "type": {
        "type": "string",
        "enum": [
          "plant",
          "mixer",
          "silo",
          "feeder",
          "power_pack"
        ]
      },
      "model": {
        "type": "string",
        "minLength": 1,
        "maxLength": 100
      },
      "configuration": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 500
          },
          {
            "type": "null"
          }
        ]
      },
      "options": {
        "type": "array",
        "items": {
          "type": "string",
          "maxLength": 200
        }
      },
      "orderId": {
        "anyOf": [
          {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          {
            "type": "null"
          }
        ]
      },
      "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"
          }
        ]
      },
      "notes": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 20000
          },
          {
            "type": "null"
          }
        ]
      }
    },
    "required": [
      "id"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "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
      }
    },
    "required": [
      "machine"
    ],
    "additionalProperties": false
  }
}
            

machines.move_site

Move a machine to another site

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

Record that a machine moved to a different job site. Closes the current location row with the move date and opens a new one, so the machine keeps its full location history. The site must belong to the machine's owner.

Input (object)

FieldTypeDescription
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
siteIdrequiredstringRecord id (UUID)min length 1, max length 64
movedOnstring (date)Defaults to today
notestring | nullmax length 2000

Output (object)

FieldTypeDescription
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
locationrequiredobject
idrequiredstringRecord id (UUID)min length 1, max length 64
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
siteIdrequiredstringRecord id (UUID)min length 1, max length 64
siteNamerequiredstring
movedInOnrequiredstring (date)Date as YYYY-MM-DD
movedOutOnrequiredstring (date) | nullDate as YYYY-MM-DD
noterequiredstring | null
Example request
                curl https://api.cemco.app/v1/ops/machines.move_site \
  -H "x-api-key: $CEMCO_API_KEY" \
  -H "content-type: application/json" \
  -d '{"machineId":"00000000-0000-4000-8000-000000000000","siteId":"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)"
      },
      "siteId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "movedOn": {
        "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])))$"
      },
      "note": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 2000
          },
          {
            "type": "null"
          }
        ]
      }
    },
    "required": [
      "machineId",
      "siteId"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "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
      },
      "location": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "machineId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "siteId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "siteName": {
            "type": "string"
          },
          "movedInOn": {
            "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"
          },
          "movedOutOn": {
            "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": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "machineId",
          "siteId",
          "siteName",
          "movedInOn",
          "movedOutOn",
          "note"
        ],
        "additionalProperties": false
      }
    },
    "required": [
      "machine",
      "location"
    ],
    "additionalProperties": false
  }
}
            

machines.change_owner

Change a machine's owner

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

Record a resale or transfer: the machine now belongs to another account. Closes the current owner row and opens a new one. Optionally moves the machine to one of the new owner's sites in the same call. Warranty dates are kept.

Input (object)

FieldTypeDescription
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
accountIdrequiredstringNew ownermin length 1, max length 64
siteIdstring | nullNew owner's site; omit to leave the machine without a sitemin length 1, max length 64
changedOnstring (date)Defaults to today
notestring | nullmax length 2000

Output (object)

FieldTypeDescription
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
ownerrequiredobject
idrequiredstringRecord 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
accountNamerequiredstring
fromDaterequiredstring (date)Date as YYYY-MM-DD
toDaterequiredstring (date) | nullDate as YYYY-MM-DD
noterequiredstring | null
Example request
                curl https://api.cemco.app/v1/ops/machines.change_owner \
  -H "x-api-key: $CEMCO_API_KEY" \
  -H "content-type: application/json" \
  -d '{"machineId":"00000000-0000-4000-8000-000000000000","accountId":"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)"
      },
      "accountId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "New owner"
      },
      "siteId": {
        "description": "New owner's site; omit to leave the machine without a site",
        "anyOf": [
          {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          {
            "type": "null"
          }
        ]
      },
      "changedOn": {
        "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])))$"
      },
      "note": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 2000
          },
          {
            "type": "null"
          }
        ]
      }
    },
    "required": [
      "machineId",
      "accountId"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "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
      },
      "owner": {
        "type": "object",
        "properties": {
          "id": {
            "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)"
          },
          "accountName": {
            "type": "string"
          },
          "fromDate": {
            "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"
          },
          "toDate": {
            "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": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "machineId",
          "accountId",
          "accountName",
          "fromDate",
          "toDate",
          "note"
        ],
        "additionalProperties": false
      }
    },
    "required": [
      "machine",
      "owner"
    ],
    "additionalProperties": false
  }
}
            

machines.warranty_status

Check warranty status

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

Warranty coverage for one machine (by id or serial number): start and end dates, state (none, active, expiring, expired), days left, and any warranty claims made against it.

Input (object)

FieldTypeDescription
machineIdstringRecord id (UUID)min length 1, max length 64
serialNumberstringmax length 60

Output (object)

FieldTypeDescription
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
serialNumberrequiredstring
modelrequiredstring
accountIdrequiredstringRecord id (UUID)min length 1, max length 64
accountNamerequiredstring
warrantyStartrequiredstring (date) | nullDate as YYYY-MM-DD
warrantyEndrequiredstring (date) | nullDate as YYYY-MM-DD
staterequired"none" | "active" | "expiring" | "expired"
daysLeftrequiredinteger | nullmin -9007199254740991, max 9007199254740991
coveredrequiredbooleanTrue while the warranty is active or expiring
claimsrequiredobject[]
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
Example request
                curl https://api.cemco.app/v1/ops/machines.warranty_status \
  -H "x-api-key: $CEMCO_API_KEY" \
  -H "content-type: application/json" \
  -d '{"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
      }
    }
  },
  "output": {
    "$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"
      },
      "model": {
        "type": "string"
      },
      "accountId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "accountName": {
        "type": "string"
      },
      "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"
          }
        ]
      },
      "state": {
        "type": "string",
        "enum": [
          "none",
          "active",
          "expiring",
          "expired"
        ]
      },
      "daysLeft": {
        "anyOf": [
          {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          {
            "type": "null"
          }
        ]
      },
      "covered": {
        "type": "boolean",
        "description": "True while the warranty is active or expiring"
      },
      "claims": {
        "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
        }
      }
    },
    "required": [
      "machineId",
      "serialNumber",
      "model",
      "accountId",
      "accountName",
      "warrantyStart",
      "warrantyEnd",
      "state",
      "daysLeft",
      "covered",
      "claims"
    ],
    "additionalProperties": false
  }
}
            

machines.add_training_record

Record commissioning and training

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

Save the commissioning and training record for a machine: set-up date, first batch date, training date, trainer, who was trained, topics covered, the punch list and the customer's sign-off.

Input (object)

FieldTypeDescription
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
orderIdstring | nullRecord id (UUID)min length 1, max length 64
setUpOnstring (date) | nullDate as YYYY-MM-DD
firstBatchOnstring (date) | nullDate as YYYY-MM-DD
trainedOnrequiredstring (date)Date as YYYY-MM-DD
trainerNamerequiredstringmin length 1, max length 200
traineesrequiredobject[]at least 1
namerequiredstringmin length 1
rolestring | null
contactIdstring | nullRecord id (UUID)min length 1, max length 64
topicsstring | nullmax length 5000
punchListobject[]default []
itemrequiredstringmin length 1
donerequiredboolean
customerSignoffNamestring | nullmax length 200
customerSignedOnstring (date) | nullDate as YYYY-MM-DD
signoffDocumentIdstring | nullRecord id (UUID)min length 1, max length 64
notesstring | nullmax length 20000

Output (object)

FieldTypeDescription
recordrequiredobject
idrequiredstringRecord id (UUID)min length 1, max length 64
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
orderIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
setUpOnrequiredstring (date) | nullDate as YYYY-MM-DD
firstBatchOnrequiredstring (date) | nullDate as YYYY-MM-DD
trainedOnrequiredstring (date)Date as YYYY-MM-DD
trainerNamerequiredstring
traineesrequiredobject[]
namerequiredstringmin length 1
rolestring | null
contactIdstring | nullRecord id (UUID)min length 1, max length 64
topicsrequiredstring | null
punchListrequiredobject[]
itemrequiredstringmin length 1
donerequiredboolean
customerSignoffNamerequiredstring | null
customerSignedOnrequiredstring (date) | nullDate as YYYY-MM-DD
signoffDocumentIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
notesrequiredstring | null
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
Example request
                curl https://api.cemco.app/v1/ops/machines.add_training_record \
  -H "x-api-key: $CEMCO_API_KEY" \
  -H "content-type: application/json" \
  -d '{"machineId":"00000000-0000-4000-8000-000000000000","trainedOn":"2026-12-06","trainerName":"example","trainees":[{"name":"example"}]}'
              
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)"
      },
      "orderId": {
        "anyOf": [
          {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          {
            "type": "null"
          }
        ]
      },
      "setUpOn": {
        "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"
          }
        ]
      },
      "firstBatchOn": {
        "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"
          }
        ]
      },
      "trainedOn": {
        "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"
      },
      "trainerName": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      },
      "trainees": {
        "minItems": 1,
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "minLength": 1
            },
            "role": {
              "type": [
                "string",
                "null"
              ]
            },
            "contactId": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Record id (UUID)"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "name"
          ]
        }
      },
      "topics": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 5000
          },
          {
            "type": "null"
          }
        ]
      },
      "punchList": {
        "default": [],
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "item": {
              "type": "string",
              "minLength": 1
            },
            "done": {
              "type": "boolean"
            }
          },
          "required": [
            "item",
            "done"
          ]
        }
      },
      "customerSignoffName": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 200
          },
          {
            "type": "null"
          }
        ]
      },
      "customerSignedOn": {
        "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"
          }
        ]
      },
      "signoffDocumentId": {
        "anyOf": [
          {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          {
            "type": "null"
          }
        ]
      },
      "notes": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 20000
          },
          {
            "type": "null"
          }
        ]
      }
    },
    "required": [
      "machineId",
      "trainedOn",
      "trainerName",
      "trainees"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "record": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "machineId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "orderId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Record id (UUID)"
              },
              {
                "type": "null"
              }
            ]
          },
          "setUpOn": {
            "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"
              }
            ]
          },
          "firstBatchOn": {
            "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"
              }
            ]
          },
          "trainedOn": {
            "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"
          },
          "trainerName": {
            "type": "string"
          },
          "trainees": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "role": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "contactId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "description": "Record id (UUID)"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "name"
              ],
              "additionalProperties": false
            }
          },
          "topics": {
            "type": [
              "string",
              "null"
            ]
          },
          "punchList": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "item": {
                  "type": "string",
                  "minLength": 1
                },
                "done": {
                  "type": "boolean"
                }
              },
              "required": [
                "item",
                "done"
              ],
              "additionalProperties": false
            }
          },
          "customerSignoffName": {
            "type": [
              "string",
              "null"
            ]
          },
          "customerSignedOn": {
            "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"
              }
            ]
          },
          "signoffDocumentId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Record id (UUID)"
              },
              {
                "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"
          }
        },
        "required": [
          "id",
          "machineId",
          "orderId",
          "setUpOn",
          "firstBatchOn",
          "trainedOn",
          "trainerName",
          "trainees",
          "topics",
          "punchList",
          "customerSignoffName",
          "customerSignedOn",
          "signoffDocumentId",
          "notes",
          "createdAt"
        ],
        "additionalProperties": false
      }
    },
    "required": [
      "record"
    ],
    "additionalProperties": false
  }
}
            

machines.update_training_record

Update a commissioning and training record

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

Change a training record, for example to tick off punch-list items or add the customer's sign-off.

Input (object)

FieldTypeDescription
idrequiredstringRecord id (UUID)min length 1, max length 64
setUpOnstring (date) | nullDate as YYYY-MM-DD
firstBatchOnstring (date) | nullDate as YYYY-MM-DD
trainedOnstring (date)Date as YYYY-MM-DD
trainerNamestringmin length 1, max length 200
traineesobject[]at least 1
namerequiredstringmin length 1
rolestring | null
contactIdstring | nullRecord id (UUID)min length 1, max length 64
topicsstring | nullmax length 5000
punchListobject[]
itemrequiredstringmin length 1
donerequiredboolean
customerSignoffNamestring | nullmax length 200
customerSignedOnstring (date) | nullDate as YYYY-MM-DD
signoffDocumentIdstring | nullRecord id (UUID)min length 1, max length 64
notesstring | nullmax length 20000

Output (object)

FieldTypeDescription
recordrequiredobject
idrequiredstringRecord id (UUID)min length 1, max length 64
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
orderIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
setUpOnrequiredstring (date) | nullDate as YYYY-MM-DD
firstBatchOnrequiredstring (date) | nullDate as YYYY-MM-DD
trainedOnrequiredstring (date)Date as YYYY-MM-DD
trainerNamerequiredstring
traineesrequiredobject[]
namerequiredstringmin length 1
rolestring | null
contactIdstring | nullRecord id (UUID)min length 1, max length 64
topicsrequiredstring | null
punchListrequiredobject[]
itemrequiredstringmin length 1
donerequiredboolean
customerSignoffNamerequiredstring | null
customerSignedOnrequiredstring (date) | nullDate as YYYY-MM-DD
signoffDocumentIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
notesrequiredstring | null
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
Example request
                curl https://api.cemco.app/v1/ops/machines.update_training_record \
  -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)"
      },
      "setUpOn": {
        "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"
          }
        ]
      },
      "firstBatchOn": {
        "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"
          }
        ]
      },
      "trainedOn": {
        "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"
      },
      "trainerName": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      },
      "trainees": {
        "minItems": 1,
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "minLength": 1
            },
            "role": {
              "type": [
                "string",
                "null"
              ]
            },
            "contactId": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Record id (UUID)"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "name"
          ]
        }
      },
      "topics": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 5000
          },
          {
            "type": "null"
          }
        ]
      },
      "punchList": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "item": {
              "type": "string",
              "minLength": 1
            },
            "done": {
              "type": "boolean"
            }
          },
          "required": [
            "item",
            "done"
          ]
        }
      },
      "customerSignoffName": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 200
          },
          {
            "type": "null"
          }
        ]
      },
      "customerSignedOn": {
        "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"
          }
        ]
      },
      "signoffDocumentId": {
        "anyOf": [
          {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          {
            "type": "null"
          }
        ]
      },
      "notes": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 20000
          },
          {
            "type": "null"
          }
        ]
      }
    },
    "required": [
      "id"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "record": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "machineId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "orderId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Record id (UUID)"
              },
              {
                "type": "null"
              }
            ]
          },
          "setUpOn": {
            "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"
              }
            ]
          },
          "firstBatchOn": {
            "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"
              }
            ]
          },
          "trainedOn": {
            "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"
          },
          "trainerName": {
            "type": "string"
          },
          "trainees": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "role": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "contactId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "description": "Record id (UUID)"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "name"
              ],
              "additionalProperties": false
            }
          },
          "topics": {
            "type": [
              "string",
              "null"
            ]
          },
          "punchList": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "item": {
                  "type": "string",
                  "minLength": 1
                },
                "done": {
                  "type": "boolean"
                }
              },
              "required": [
                "item",
                "done"
              ],
              "additionalProperties": false
            }
          },
          "customerSignoffName": {
            "type": [
              "string",
              "null"
            ]
          },
          "customerSignedOn": {
            "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"
              }
            ]
          },
          "signoffDocumentId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Record id (UUID)"
              },
              {
                "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"
          }
        },
        "required": [
          "id",
          "machineId",
          "orderId",
          "setUpOn",
          "firstBatchOn",
          "trainedOn",
          "trainerName",
          "trainees",
          "topics",
          "punchList",
          "customerSignoffName",
          "customerSignedOn",
          "signoffDocumentId",
          "notes",
          "createdAt"
        ],
        "additionalProperties": false
      }
    },
    "required": [
      "record"
    ],
    "additionalProperties": false
  }
}
            

machines.list_training_records

List commissioning and training records

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

Commissioning and training records for one machine or for every machine of an order, newest first.

Input (object)

FieldTypeDescription
machineIdstringRecord id (UUID)min length 1, max length 64
orderIdstringRecord id (UUID)min length 1, max length 64

Output (object)

FieldTypeDescription
itemsrequiredobject[]
idrequiredstringRecord id (UUID)min length 1, max length 64
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
orderIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
setUpOnrequiredstring (date) | nullDate as YYYY-MM-DD
firstBatchOnrequiredstring (date) | nullDate as YYYY-MM-DD
trainedOnrequiredstring (date)Date as YYYY-MM-DD
trainerNamerequiredstring
traineesrequiredobject[]
namerequiredstringmin length 1
rolestring | null
contactIdstring | nullRecord id (UUID)min length 1, max length 64
topicsrequiredstring | null
punchListrequiredobject[]
itemrequiredstringmin length 1
donerequiredboolean
customerSignoffNamerequiredstring | null
customerSignedOnrequiredstring (date) | nullDate as YYYY-MM-DD
signoffDocumentIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
notesrequiredstring | null
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
Example request
                curl https://api.cemco.app/v1/ops/machines.list_training_records \
  -H "x-api-key: $CEMCO_API_KEY" \
  -H "content-type: application/json" \
  -d '{"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)"
      },
      "orderId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      }
    }
  },
  "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)"
            },
            "machineId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "orderId": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Record id (UUID)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "setUpOn": {
              "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"
                }
              ]
            },
            "firstBatchOn": {
              "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"
                }
              ]
            },
            "trainedOn": {
              "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"
            },
            "trainerName": {
              "type": "string"
            },
            "trainees": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "role": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "contactId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "description": "Record id (UUID)"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            },
            "topics": {
              "type": [
                "string",
                "null"
              ]
            },
            "punchList": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "item": {
                    "type": "string",
                    "minLength": 1
                  },
                  "done": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "item",
                  "done"
                ],
                "additionalProperties": false
              }
            },
            "customerSignoffName": {
              "type": [
                "string",
                "null"
              ]
            },
            "customerSignedOn": {
              "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"
                }
              ]
            },
            "signoffDocumentId": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Record id (UUID)"
                },
                {
                  "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"
            }
          },
          "required": [
            "id",
            "machineId",
            "orderId",
            "setUpOn",
            "firstBatchOn",
            "trainedOn",
            "trainerName",
            "trainees",
            "topics",
            "punchList",
            "customerSignoffName",
            "customerSignedOn",
            "signoffDocumentId",
            "notes",
            "createdAt"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "items"
    ],
    "additionalProperties": false
  }
}
            

machines.upsert_service_plan

Create or update a preventive maintenance plan

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

Set a recurring service for a machine (for example gearbox oil every 180 days) with the spare parts normally used. Give id to change an existing plan. The next due date is last done plus the interval unless given.

Input (object)

FieldTypeDescription
idstringRecord id (UUID)min length 1, max length 64
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
namerequiredstringmin length 1, max length 200
intervalDaysrequiredintegermin 1, max 3650
lastDoneOnstring (date) | nullDate as YYYY-MM-DD
nextDueOnstring (date)Date as YYYY-MM-DD
recommendedPartIdsstring[]default []
notesstring | nullmax length 5000
activebooleandefault true

Output (object)

FieldTypeDescription
planrequiredobject
idrequiredstringRecord id (UUID)min length 1, max length 64
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
namerequiredstringFor example Gearbox oil change
intervalDaysrequiredintegermin 1, max 9007199254740991
lastDoneOnrequiredstring (date) | nullDate as YYYY-MM-DD
nextDueOnrequiredstring (date)Date as YYYY-MM-DD
recommendedPartIdsrequiredstring[]Spare parts normally used for this service
notesrequiredstring | null
activerequiredboolean
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
createdrequiredboolean
Example request
                curl https://api.cemco.app/v1/ops/machines.upsert_service_plan \
  -H "x-api-key: $CEMCO_API_KEY" \
  -H "content-type: application/json" \
  -d '{"machineId":"00000000-0000-4000-8000-000000000000","name":"example","intervalDays":1}'
              
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)"
      },
      "machineId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "name": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      },
      "intervalDays": {
        "type": "integer",
        "minimum": 1,
        "maximum": 3650
      },
      "lastDoneOn": {
        "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"
          }
        ]
      },
      "nextDueOn": {
        "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"
      },
      "recommendedPartIds": {
        "default": [],
        "type": "array",
        "items": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64,
          "description": "Record id (UUID)"
        }
      },
      "notes": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 5000
          },
          {
            "type": "null"
          }
        ]
      },
      "active": {
        "default": true,
        "type": "boolean"
      }
    },
    "required": [
      "machineId",
      "name",
      "intervalDays"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "plan": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "machineId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "name": {
            "type": "string",
            "description": "For example Gearbox oil change"
          },
          "intervalDays": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "lastDoneOn": {
            "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"
              }
            ]
          },
          "nextDueOn": {
            "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"
          },
          "recommendedPartIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "description": "Spare parts normally used for this service"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "active": {
            "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"
          },
          "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",
          "machineId",
          "name",
          "intervalDays",
          "lastDoneOn",
          "nextDueOn",
          "recommendedPartIds",
          "notes",
          "active",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "created": {
        "type": "boolean"
      }
    },
    "required": [
      "plan",
      "created"
    ],
    "additionalProperties": false
  }
}
            

machines.complete_service

Mark preventive maintenance done

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

Record that a service plan was carried out on a date. Sets last done, moves the next due date forward by the interval and creates the reminder task for the next one.

Input (object)

FieldTypeDescription
planIdrequiredstringRecord id (UUID)min length 1, max length 64
doneOnstring (date)Defaults to today
notestring | nullmax length 2000

Output (object)

FieldTypeDescription
planrequiredobject
idrequiredstringRecord id (UUID)min length 1, max length 64
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
namerequiredstringFor example Gearbox oil change
intervalDaysrequiredintegermin 1, max 9007199254740991
lastDoneOnrequiredstring (date) | nullDate as YYYY-MM-DD
nextDueOnrequiredstring (date)Date as YYYY-MM-DD
recommendedPartIdsrequiredstring[]Spare parts normally used for this service
notesrequiredstring | null
activerequiredboolean
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
reminderTaskrequiredobject | null
idrequiredstringRecord id (UUID)min length 1, max length 64
typerequired"task" | "call" | "visit" | "delivery" | "commissioning" | "service" | "check_in"
titlerequiredstring
notesrequiredstring | null
statusrequired"open" | "done" | "cancelled"
dueOnrequiredstring (date)Day the task is due or the appointment happens
startsAtrequiredstring (date-time) | nullStart time for timed appointments; null for all-day items
endsAtrequiredstring (date-time) | nullUTC timestamp, ISO 8601 with Z
locationrequiredstring | null
assignedToUserIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
assignedToNamerequiredstring | null
accountIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
accountNamerequiredstring | null
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
siteIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
checkInIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
isOverduerequiredbooleanOpen and due before today
googleEventIdrequiredstring | null
syncStaterequired"not_synced" | "pending" | "synced" | "error"
syncedAtrequiredstring (date-time) | nullUTC timestamp, ISO 8601 with Z
syncErrorrequiredstring | null
completedAtrequiredstring (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/machines.complete_service \
  -H "x-api-key: $CEMCO_API_KEY" \
  -H "content-type: application/json" \
  -d '{"planId":"00000000-0000-4000-8000-000000000000"}'
              
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "planId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "doneOn": {
        "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])))$"
      },
      "note": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 2000
          },
          {
            "type": "null"
          }
        ]
      }
    },
    "required": [
      "planId"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "plan": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "machineId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "name": {
            "type": "string",
            "description": "For example Gearbox oil change"
          },
          "intervalDays": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "lastDoneOn": {
            "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"
              }
            ]
          },
          "nextDueOn": {
            "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"
          },
          "recommendedPartIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "description": "Spare parts normally used for this service"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "active": {
            "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"
          },
          "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",
          "machineId",
          "name",
          "intervalDays",
          "lastDoneOn",
          "nextDueOn",
          "recommendedPartIds",
          "notes",
          "active",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "reminderTask": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Record id (UUID)"
              },
              "type": {
                "type": "string",
                "enum": [
                  "task",
                  "call",
                  "visit",
                  "delivery",
                  "commissioning",
                  "service",
                  "check_in"
                ]
              },
              "title": {
                "type": "string"
              },
              "notes": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "open",
                  "done",
                  "cancelled"
                ]
              },
              "dueOn": {
                "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": "Day the task is due or the appointment happens"
              },
              "startsAt": {
                "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"
                  }
                ],
                "description": "Start time for timed appointments; null for all-day items"
              },
              "endsAt": {
                "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"
                  }
                ]
              },
              "location": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "assignedToUserId": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "Record id (UUID)"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "assignedToName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "accountId": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "Record id (UUID)"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "accountName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "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"
                  }
                ]
              },
              "siteId": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "Record id (UUID)"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "checkInId": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "Record id (UUID)"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "isOverdue": {
                "type": "boolean",
                "description": "Open and due before today"
              },
              "googleEventId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "syncState": {
                "type": "string",
                "enum": [
                  "not_synced",
                  "pending",
                  "synced",
                  "error"
                ]
              },
              "syncedAt": {
                "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"
                  }
                ]
              },
              "syncError": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "completedAt": {
                "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",
              "type",
              "title",
              "notes",
              "status",
              "dueOn",
              "startsAt",
              "endsAt",
              "location",
              "assignedToUserId",
              "assignedToName",
              "accountId",
              "accountName",
              "contactId",
              "orderId",
              "machineId",
              "ticketId",
              "siteId",
              "checkInId",
              "isOverdue",
              "googleEventId",
              "syncState",
              "syncedAt",
              "syncError",
              "completedAt",
              "createdAt",
              "updatedAt"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      }
    },
    "required": [
      "plan",
      "reminderTask"
    ],
    "additionalProperties": false
  }
}
            

machines.list_service_plans

List preventive maintenance plans

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

Service plans for one machine, one account, or everything due within a number of days. Each plan has its interval, last done and next due dates and recommended spare parts.

Input (object)

FieldTypeDescription
machineIdstringRecord id (UUID)min length 1, max length 64
accountIdstringRecord id (UUID)min length 1, max length 64
dueWithinDaysintegerOnly plans due within this many days (overdue included)min 0, max 3650
activeOnlybooleandefault true

Output (object)

FieldTypeDescription
itemsrequiredobject[]
idrequiredstringRecord id (UUID)min length 1, max length 64
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
namerequiredstringFor example Gearbox oil change
intervalDaysrequiredintegermin 1, max 9007199254740991
lastDoneOnrequiredstring (date) | nullDate as YYYY-MM-DD
nextDueOnrequiredstring (date)Date as YYYY-MM-DD
recommendedPartIdsrequiredstring[]Spare parts normally used for this service
notesrequiredstring | null
activerequiredboolean
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
machineSerialNumberrequiredstring
accountNamerequiredstring
overduerequiredboolean
Example request
                curl https://api.cemco.app/v1/ops/machines.list_service_plans \
  -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": {
      "machineId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "accountId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "dueWithinDays": {
        "description": "Only plans due within this many days (overdue included)",
        "type": "integer",
        "minimum": 0,
        "maximum": 3650
      },
      "activeOnly": {
        "default": true,
        "type": "boolean"
      }
    }
  },
  "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)"
            },
            "machineId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "name": {
              "type": "string",
              "description": "For example Gearbox oil change"
            },
            "intervalDays": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            "lastDoneOn": {
              "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"
                }
              ]
            },
            "nextDueOn": {
              "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"
            },
            "recommendedPartIds": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Record id (UUID)"
              },
              "description": "Spare parts normally used for this service"
            },
            "notes": {
              "type": [
                "string",
                "null"
              ]
            },
            "active": {
              "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"
            },
            "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"
            },
            "machineSerialNumber": {
              "type": "string"
            },
            "accountName": {
              "type": "string"
            },
            "overdue": {
              "type": "boolean"
            }
          },
          "required": [
            "id",
            "machineId",
            "name",
            "intervalDays",
            "lastDoneOn",
            "nextDueOn",
            "recommendedPartIds",
            "notes",
            "active",
            "createdAt",
            "updatedAt",
            "machineSerialNumber",
            "accountName",
            "overdue"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "items"
    ],
    "additionalProperties": false
  }
}
            

machines.upsert_service_contract

Create or update a service contract

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

Record a service contract on a machine: plan name, start date, renewal date, price and status. Give id to change an existing contract. Renewal dates appear on the agenda.

Input (object)

FieldTypeDescription
idstringRecord id (UUID)min length 1, max length 64
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
planNamerequiredstringmin length 1, max length 200
startsOnrequiredstring (date)Date as YYYY-MM-DD
renewsOnrequiredstring (date)Date as YYYY-MM-DD
priceCentsintegerAmount in integer US cents (zero or more)default 0, min 0, max 9007199254740991
status"active" | "expired" | "cancelled"default "active"
notesstring | nullmax length 5000

Output (object)

FieldTypeDescription
contractrequiredobject
idrequiredstringRecord 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
planNamerequiredstring
startsOnrequiredstring (date)Date as YYYY-MM-DD
renewsOnrequiredstring (date)Date as YYYY-MM-DD
priceCentsrequiredintegerAmount in integer US cents (zero or more)min 0, max 9007199254740991
statusrequired"active" | "expired" | "cancelled"
notesrequiredstring | null
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
createdrequiredboolean
Example request
                curl https://api.cemco.app/v1/ops/machines.upsert_service_contract \
  -H "x-api-key: $CEMCO_API_KEY" \
  -H "content-type: application/json" \
  -d '{"machineId":"00000000-0000-4000-8000-000000000000","planName":"example","startsOn":"2026-12-06","renewsOn":"2026-12-06"}'
              
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)"
      },
      "machineId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "planName": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      },
      "startsOn": {
        "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"
      },
      "renewsOn": {
        "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"
      },
      "priceCents": {
        "default": 0,
        "type": "integer",
        "minimum": 0,
        "maximum": 9007199254740991,
        "description": "Amount in integer US cents (zero or more)"
      },
      "status": {
        "default": "active",
        "type": "string",
        "enum": [
          "active",
          "expired",
          "cancelled"
        ]
      },
      "notes": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 5000
          },
          {
            "type": "null"
          }
        ]
      }
    },
    "required": [
      "machineId",
      "planName",
      "startsOn",
      "renewsOn"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "contract": {
        "type": "object",
        "properties": {
          "id": {
            "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)"
          },
          "planName": {
            "type": "string"
          },
          "startsOn": {
            "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"
          },
          "renewsOn": {
            "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"
          },
          "priceCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991,
            "description": "Amount in integer US cents (zero or more)"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "expired",
              "cancelled"
            ]
          },
          "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",
          "machineId",
          "accountId",
          "planName",
          "startsOn",
          "renewsOn",
          "priceCents",
          "status",
          "notes",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "created": {
        "type": "boolean"
      }
    },
    "required": [
      "contract",
      "created"
    ],
    "additionalProperties": false
  }
}
            

machines.list_service_contracts

List service contracts

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

Service contracts for one machine, one account, or all contracts renewing within a number of days.

Input (object)

FieldTypeDescription
machineIdstringRecord id (UUID)min length 1, max length 64
accountIdstringRecord id (UUID)min length 1, max length 64
status"active" | "expired" | "cancelled"
renewingWithinDaysintegermin 0, max 3650

Output (object)

FieldTypeDescription
itemsrequiredobject[]
idrequiredstringRecord 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
planNamerequiredstring
startsOnrequiredstring (date)Date as YYYY-MM-DD
renewsOnrequiredstring (date)Date as YYYY-MM-DD
priceCentsrequiredintegerAmount in integer US cents (zero or more)min 0, max 9007199254740991
statusrequired"active" | "expired" | "cancelled"
notesrequiredstring | null
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
machineSerialNumberrequiredstring
accountNamerequiredstring
Example request
                curl https://api.cemco.app/v1/ops/machines.list_service_contracts \
  -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": {
      "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": [
          "active",
          "expired",
          "cancelled"
        ]
      },
      "renewingWithinDays": {
        "type": "integer",
        "minimum": 0,
        "maximum": 3650
      }
    }
  },
  "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)"
            },
            "machineId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "accountId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "planName": {
              "type": "string"
            },
            "startsOn": {
              "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"
            },
            "renewsOn": {
              "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"
            },
            "priceCents": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Amount in integer US cents (zero or more)"
            },
            "status": {
              "type": "string",
              "enum": [
                "active",
                "expired",
                "cancelled"
              ]
            },
            "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"
            },
            "machineSerialNumber": {
              "type": "string"
            },
            "accountName": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "machineId",
            "accountId",
            "planName",
            "startsOn",
            "renewsOn",
            "priceCents",
            "status",
            "notes",
            "createdAt",
            "updatedAt",
            "machineSerialNumber",
            "accountName"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "items"
    ],
    "additionalProperties": false
  }
}