Skip to content

Dashboard and reports

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

reports.dashboard

Get the home dashboard

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

The home dashboard in one call: open orders by stage, orders not yet valid (with what each is missing), open and down tickets, warranties ending within 60 days, overdue tasks, accounts not contacted in 90 days, and low-stock parts. Counts come with the top rows of each list.

Input (object)

FieldTypeDescription
listLimitintegerRows to include in each listdefault 8, min 0, max 50

Output (object)

FieldTypeDescription
generatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
todayrequiredstring (date)Date as YYYY-MM-DD
ordersByStagerequiredobject[]
stagerequired"received" | "in_build" | "ready_to_ship" | "shipped" | "delivered" | "set_up" | "commissioned" | "trained" | "closed"
labelrequiredstring
countrequiredintegermin -9007199254740991, max 9007199254740991
totalCentsrequiredintegerAmount in integer US cents (zero or more)min 0, max 9007199254740991
openOrderCountrequiredintegermin -9007199254740991, max 9007199254740991
openOrderValueCentsrequiredintegerAmount in integer US cents (zero or more)min 0, max 9007199254740991
invalidOrdersrequiredobject
countrequiredintegermin -9007199254740991, max 9007199254740991
itemsrequiredobject[]
idrequiredstringRecord id (UUID)min length 1, max length 64
orderNumberrequiredstring
accountIdrequiredstringRecord id (UUID)min length 1, max length 64
siteIdrequiredstring | nullDelivery sitemin length 1, max length 64
titlerequiredstring | null
stagerequired"received" | "in_build" | "ready_to_ship" | "shipped" | "delivered" | "set_up" | "commissioned" | "trained" | "closed"
stageDatesrequiredobjectDate each stage was reached; null if not yet
receivedrequiredstring (date) | nullDate as YYYY-MM-DD
in_buildrequiredstring (date) | nullDate as YYYY-MM-DD
ready_to_shiprequiredstring (date) | nullDate as YYYY-MM-DD
shippedrequiredstring (date) | nullDate as YYYY-MM-DD
deliveredrequiredstring (date) | nullDate as YYYY-MM-DD
set_uprequiredstring (date) | nullDate as YYYY-MM-DD
commissionedrequiredstring (date) | nullDate as YYYY-MM-DD
trainedrequiredstring (date) | nullDate as YYYY-MM-DD
closedrequiredstring (date) | nullDate as YYYY-MM-DD
signedQuoteDocumentIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
signedQuoteReceivedOnrequiredstring (date) | nullDate as YYYY-MM-DD
totalCentsrequiredintegerAmount in integer US cents (zero or more)min 0, max 9007199254740991
balanceRemainingCentsrequiredinteger | nullNull until someone records it; 0 means paid in fullmin 0, max 9007199254740991
isValidrequiredboolean
financingPartnerrequired"none" | "commercial_capital" | "northland_capital" | "other"
financingStatusrequired"not_applicable" | "pending" | "approved" | "declined" | "funded"
financingNotesrequiredstring | null
poNumberrequiredstring | null
expectedShipOnrequiredstring (date) | nullDate as YYYY-MM-DD
ownerUserIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
notesrequiredstring | null
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
accountNamerequiredstring
siteNamerequiredstring | null
missingrequired("signed_quote" | "signed_quote_received_on" | "balance_remaining")[]
nextStagerequired"received" | "in_build" | "ready_to_ship" | "shipped" | "delivered" | "set_up" | "commissioned" | "trained" | "closed" | null
lineCountrequiredintegermin -9007199254740991, max 9007199254740991
machineCountrequiredintegermin -9007199254740991, max 9007199254740991
ticketsrequiredobject
openCountrequiredintegermin -9007199254740991, max 9007199254740991
downCountrequiredintegermin -9007199254740991, max 9007199254740991
downrequiredobject[]
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
recentrequiredobject[]
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
expiringWarrantiesrequiredobject
countrequiredintegermin -9007199254740991, max 9007199254740991
withinDaysrequiredintegermin -9007199254740991, max 9007199254740991
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
overdueTasksrequiredobject
countrequiredintegermin -9007199254740991, max 9007199254740991
itemsrequiredobject[]
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
accountsNotContactedrequiredobject
countrequiredintegermin -9007199254740991, max 9007199254740991
daysrequiredintegermin -9007199254740991, max 9007199254740991
itemsrequiredobject[]
idrequiredstringRecord id (UUID)min length 1, max length 64
namerequiredstring
normalizedNamerequiredstringLower-cased name without punctuation or company suffixes; used for duplicate checks
segmentrequired"concrete_producer" | "multiservice"
statusrequired"active" | "prospect" | "inactive"
phonerequiredstring | null
websiterequiredstring | null
hqLine1requiredstring | null
hqLine2requiredstring | null
hqCityrequiredstring | null
hqStaterequiredstring | nullTwo-letter US state or region code
hqPostalCoderequiredstring | null
hqCountryrequiredstring | null
hubspotCompanyIdrequiredstring | null
ownerUserIdrequiredstring | nullStaff user who owns the accountmin length 1, max length 64
notesrequiredstring | null
lastContactedAtrequiredstring (date-time) | nullMost recent call, email, text or visit
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
machineCountrequiredintegermin -9007199254740991, max 9007199254740991
openOrderCountrequiredintegermin -9007199254740991, max 9007199254740991
openTicketCountrequiredintegermin -9007199254740991, max 9007199254740991
primaryContactNamerequiredstring | null
daysSinceContactrequiredinteger | nullmin -9007199254740991, max 9007199254740991
lowStockrequiredobject
countrequiredintegermin -9007199254740991, max 9007199254740991
machinesrequiredobject
totalrequiredintegermin -9007199254740991, max 9007199254740991
operatingrequiredintegermin -9007199254740991, max 9007199254740991
downrequiredintegermin -9007199254740991, max 9007199254740991
underWarrantyrequiredintegermin -9007199254740991, max 9007199254740991
Example request
                curl https://api.cemco.app/v1/ops/reports.dashboard \
  -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": {
      "listLimit": {
        "default": 8,
        "description": "Rows to include in each list",
        "type": "integer",
        "minimum": 0,
        "maximum": 50
      }
    }
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "generatedAt": {
        "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"
      },
      "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])))$",
        "description": "Date as YYYY-MM-DD"
      },
      "ordersByStage": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "stage": {
              "type": "string",
              "enum": [
                "received",
                "in_build",
                "ready_to_ship",
                "shipped",
                "delivered",
                "set_up",
                "commissioned",
                "trained",
                "closed"
              ]
            },
            "label": {
              "type": "string"
            },
            "count": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "totalCents": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Amount in integer US cents (zero or more)"
            }
          },
          "required": [
            "stage",
            "label",
            "count",
            "totalCents"
          ],
          "additionalProperties": false
        }
      },
      "openOrderCount": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      },
      "openOrderValueCents": {
        "type": "integer",
        "minimum": 0,
        "maximum": 9007199254740991,
        "description": "Amount in integer US cents (zero or more)"
      },
      "invalidOrders": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Record id (UUID)"
                },
                "orderNumber": {
                  "type": "string"
                },
                "accountId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Record id (UUID)"
                },
                "siteId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "description": "Record id (UUID)"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Delivery site"
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "stage": {
                  "type": "string",
                  "enum": [
                    "received",
                    "in_build",
                    "ready_to_ship",
                    "shipped",
                    "delivered",
                    "set_up",
                    "commissioned",
                    "trained",
                    "closed"
                  ]
                },
                "stageDates": {
                  "type": "object",
                  "properties": {
                    "received": {
                      "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"
                        }
                      ]
                    },
                    "in_build": {
                      "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"
                        }
                      ]
                    },
                    "ready_to_ship": {
                      "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"
                        }
                      ]
                    },
                    "shipped": {
                      "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"
                        }
                      ]
                    },
                    "delivered": {
                      "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"
                        }
                      ]
                    },
                    "set_up": {
                      "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"
                        }
                      ]
                    },
                    "commissioned": {
                      "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"
                        }
                      ]
                    },
                    "trained": {
                      "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"
                        }
                      ]
                    },
                    "closed": {
                      "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"
                        }
                      ]
                    }
                  },
                  "required": [
                    "received",
                    "in_build",
                    "ready_to_ship",
                    "shipped",
                    "delivered",
                    "set_up",
                    "commissioned",
                    "trained",
                    "closed"
                  ],
                  "additionalProperties": false,
                  "description": "Date each stage was reached; null if not yet"
                },
                "signedQuoteDocumentId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "description": "Record id (UUID)"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "signedQuoteReceivedOn": {
                  "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"
                    }
                  ]
                },
                "totalCents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991,
                  "description": "Amount in integer US cents (zero or more)"
                },
                "balanceRemainingCents": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991,
                      "description": "Amount in integer US cents (zero or more)"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Null until someone records it; 0 means paid in full"
                },
                "isValid": {
                  "type": "boolean"
                },
                "financingPartner": {
                  "type": "string",
                  "enum": [
                    "none",
                    "commercial_capital",
                    "northland_capital",
                    "other"
                  ]
                },
                "financingStatus": {
                  "type": "string",
                  "enum": [
                    "not_applicable",
                    "pending",
                    "approved",
                    "declined",
                    "funded"
                  ]
                },
                "financingNotes": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "poNumber": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expectedShipOn": {
                  "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"
                    }
                  ]
                },
                "ownerUserId": {
                  "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"
                },
                "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"
                  ]
                },
                "missing": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "signed_quote",
                      "signed_quote_received_on",
                      "balance_remaining"
                    ]
                  }
                },
                "nextStage": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "received",
                        "in_build",
                        "ready_to_ship",
                        "shipped",
                        "delivered",
                        "set_up",
                        "commissioned",
                        "trained",
                        "closed"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "lineCount": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "machineCount": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "id",
                "orderNumber",
                "accountId",
                "siteId",
                "title",
                "stage",
                "stageDates",
                "signedQuoteDocumentId",
                "signedQuoteReceivedOn",
                "totalCents",
                "balanceRemainingCents",
                "isValid",
                "financingPartner",
                "financingStatus",
                "financingNotes",
                "poNumber",
                "expectedShipOn",
                "ownerUserId",
                "notes",
                "createdAt",
                "updatedAt",
                "accountName",
                "siteName",
                "missing",
                "nextStage",
                "lineCount",
                "machineCount"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "count",
          "items"
        ],
        "additionalProperties": false
      },
      "tickets": {
        "type": "object",
        "properties": {
          "openCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "downCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "down": {
            "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
            }
          },
          "recent": {
            "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
            }
          }
        },
        "required": [
          "openCount",
          "downCount",
          "down",
          "recent"
        ],
        "additionalProperties": false
      },
      "expiringWarranties": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "withinDays": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "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
            }
          }
        },
        "required": [
          "count",
          "withinDays",
          "items"
        ],
        "additionalProperties": false
      },
      "overdueTasks": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "items": {
            "type": "array",
            "items": {
              "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
            }
          }
        },
        "required": [
          "count",
          "items"
        ],
        "additionalProperties": false
      },
      "accountsNotContacted": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "days": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Record id (UUID)"
                },
                "name": {
                  "type": "string"
                },
                "normalizedName": {
                  "type": "string",
                  "description": "Lower-cased name without punctuation or company suffixes; used for duplicate checks"
                },
                "segment": {
                  "type": "string",
                  "enum": [
                    "concrete_producer",
                    "multiservice"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "prospect",
                    "inactive"
                  ]
                },
                "phone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "website": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "hqLine1": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "hqLine2": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "hqCity": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "hqState": {
                  "description": "Two-letter US state or region code",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "hqPostalCode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "hqCountry": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "hubspotCompanyId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "ownerUserId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "description": "Record id (UUID)"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Staff user who owns the account"
                },
                "notes": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lastContactedAt": {
                  "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": "Most recent call, email, text or visit"
                },
                "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"
                },
                "machineCount": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "openOrderCount": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "openTicketCount": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "primaryContactName": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "daysSinceContact": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "normalizedName",
                "segment",
                "status",
                "phone",
                "website",
                "hqLine1",
                "hqLine2",
                "hqCity",
                "hqState",
                "hqPostalCode",
                "hqCountry",
                "hubspotCompanyId",
                "ownerUserId",
                "notes",
                "lastContactedAt",
                "createdAt",
                "updatedAt",
                "machineCount",
                "openOrderCount",
                "openTicketCount",
                "primaryContactName",
                "daysSinceContact"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "count",
          "days",
          "items"
        ],
        "additionalProperties": false
      },
      "lowStock": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "count"
        ],
        "additionalProperties": false
      },
      "machines": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "operating": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "down": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "underWarranty": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "total",
          "operating",
          "down",
          "underWarranty"
        ],
        "additionalProperties": false
      }
    },
    "required": [
      "generatedAt",
      "today",
      "ordersByStage",
      "openOrderCount",
      "openOrderValueCents",
      "invalidOrders",
      "tickets",
      "expiringWarranties",
      "overdueTasks",
      "accountsNotContacted",
      "lowStock",
      "machines"
    ],
    "additionalProperties": false
  }
}
            

reports.installed_base

Report: installed base by state and model

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

Counts of machines by the state of their current site and by model, plus totals by type and status. Retired machines are left out unless asked for.

Input (object)

FieldTypeDescription
includeRetiredbooleandefault false
type"plant" | "mixer" | "silo" | "feeder" | "power_pack"

Output (object)

FieldTypeDescription
totalrequiredintegermin -9007199254740991, max 9007199254740991
byStaterequiredobject[]
staterequiredstringState code, or Unknown when the machine has no site
countrequiredintegermin -9007199254740991, max 9007199254740991
byModelrequiredobject[]
modelrequiredstring
countrequiredintegermin -9007199254740991, max 9007199254740991
byStateAndModelrequiredobject[]
staterequiredstring
modelrequiredstring
countrequiredintegermin -9007199254740991, max 9007199254740991
byTyperequiredobject[]
typerequired"plant" | "mixer" | "silo" | "feeder" | "power_pack"
countrequiredintegermin -9007199254740991, max 9007199254740991
byStatusrequiredobject[]
statusrequiredstring
countrequiredintegermin -9007199254740991, max 9007199254740991
Example request
                curl https://api.cemco.app/v1/ops/reports.installed_base \
  -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": {
      "includeRetired": {
        "default": false,
        "type": "boolean"
      },
      "type": {
        "type": "string",
        "enum": [
          "plant",
          "mixer",
          "silo",
          "feeder",
          "power_pack"
        ]
      }
    }
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "total": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      },
      "byState": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "state": {
              "type": "string",
              "description": "State code, or Unknown when the machine has no site"
            },
            "count": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "state",
            "count"
          ],
          "additionalProperties": false
        }
      },
      "byModel": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "model": {
              "type": "string"
            },
            "count": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "model",
            "count"
          ],
          "additionalProperties": false
        }
      },
      "byStateAndModel": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "state": {
              "type": "string"
            },
            "model": {
              "type": "string"
            },
            "count": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "state",
            "model",
            "count"
          ],
          "additionalProperties": false
        }
      },
      "byType": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "plant",
                "mixer",
                "silo",
                "feeder",
                "power_pack"
              ]
            },
            "count": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "type",
            "count"
          ],
          "additionalProperties": false
        }
      },
      "byStatus": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string"
            },
            "count": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "status",
            "count"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "total",
      "byState",
      "byModel",
      "byStateAndModel",
      "byType",
      "byStatus"
    ],
    "additionalProperties": false
  }
}
            

reports.tickets_by_root_cause

Report: tickets by root cause

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

Service tickets opened in a date range (default the last 365 days) grouped by root cause and by category, with on-site hours, travel hours and parts cost for each.

Input (object)

FieldTypeDescription
fromstring (date)Date as YYYY-MM-DD
tostring (date)Date as YYYY-MM-DD
modelstringmax length 100
accountIdstringRecord id (UUID)min length 1, max length 64

Output (object)

FieldTypeDescription
fromrequiredstring (date)Date as YYYY-MM-DD
torequiredstring (date)Date as YYYY-MM-DD
totalrequiredintegermin -9007199254740991, max 9007199254740991
byRootCauserequiredobject[]
rootCauserequired"component_failure" | "manufacturing_defect" | "wear" | "operator_error" | "installation" | "shipping_damage" | "environment" | "design" | "unknown" | nullNull for tickets with no root cause recorded yet
labelrequiredstring
countrequiredintegermin -9007199254740991, max 9007199254740991
onsiteHoursrequirednumber
travelHoursrequirednumber
partsCentsrequiredintegerAmount in integer US cents (zero or more)min 0, max 9007199254740991
warrantyCountrequiredintegermin -9007199254740991, max 9007199254740991
byCategoryrequiredobject[]
categoryrequired"mechanical" | "electrical" | "controls" | "hydraulic" | "pneumatic" | "structural" | "calibration" | "operator_training" | "other"
labelrequiredstring
countrequiredintegermin -9007199254740991, max 9007199254740991
Example request
                curl https://api.cemco.app/v1/ops/reports.tickets_by_root_cause \
  -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": {
      "from": {
        "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"
      },
      "to": {
        "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"
      },
      "model": {
        "type": "string",
        "maxLength": 100
      },
      "accountId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      }
    }
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "from": {
        "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"
      },
      "to": {
        "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"
      },
      "total": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      },
      "byRootCause": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "rootCause": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "component_failure",
                    "manufacturing_defect",
                    "wear",
                    "operator_error",
                    "installation",
                    "shipping_damage",
                    "environment",
                    "design",
                    "unknown"
                  ]
                },
                {
                  "type": "null"
                }
              ],
              "description": "Null for tickets with no root cause recorded yet"
            },
            "label": {
              "type": "string"
            },
            "count": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "onsiteHours": {
              "type": "number"
            },
            "travelHours": {
              "type": "number"
            },
            "partsCents": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Amount in integer US cents (zero or more)"
            },
            "warrantyCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "rootCause",
            "label",
            "count",
            "onsiteHours",
            "travelHours",
            "partsCents",
            "warrantyCount"
          ],
          "additionalProperties": false
        }
      },
      "byCategory": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "category": {
              "type": "string",
              "enum": [
                "mechanical",
                "electrical",
                "controls",
                "hydraulic",
                "pneumatic",
                "structural",
                "calibration",
                "operator_training",
                "other"
              ]
            },
            "label": {
              "type": "string"
            },
            "count": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "category",
            "label",
            "count"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "from",
      "to",
      "total",
      "byRootCause",
      "byCategory"
    ],
    "additionalProperties": false
  }
}
            

reports.parts_revenue

Report: parts revenue

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

Revenue from parts orders (ordered, shipped or delivered) in a date range, by month, by account and by part. Default range is the last 12 months.

Input (object)

FieldTypeDescription
fromstring (date)Date as YYYY-MM-DD
tostring (date)Date as YYYY-MM-DD
topintegerdefault 10, min 1, max 100

Output (object)

FieldTypeDescription
fromrequiredstring (date)Date as YYYY-MM-DD
torequiredstring (date)Date as YYYY-MM-DD
totalCentsrequiredintegerAmount in integer US cents (zero or more)min 0, max 9007199254740991
orderCountrequiredintegermin -9007199254740991, max 9007199254740991
byMonthrequiredobject[]
monthrequiredstringYYYY-MM
totalCentsrequiredintegerAmount in integer US cents (zero or more)min 0, max 9007199254740991
orderCountrequiredintegermin -9007199254740991, max 9007199254740991
byAccountrequiredobject[]
accountIdrequiredstringRecord id (UUID)min length 1, max length 64
accountNamerequiredstring
totalCentsrequiredintegerAmount in integer US cents (zero or more)min 0, max 9007199254740991
orderCountrequiredintegermin -9007199254740991, max 9007199254740991
byPartrequiredobject[]
partIdrequiredstringRecord id (UUID)min length 1, max length 64
partNumberrequiredstring
descriptionrequiredstring
quantityrequiredintegermin -9007199254740991, max 9007199254740991
totalCentsrequiredintegerAmount in integer US cents (zero or more)min 0, max 9007199254740991
Example request
                curl https://api.cemco.app/v1/ops/reports.parts_revenue \
  -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": {
      "from": {
        "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"
      },
      "to": {
        "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"
      },
      "top": {
        "default": 10,
        "type": "integer",
        "minimum": 1,
        "maximum": 100
      }
    }
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "from": {
        "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"
      },
      "to": {
        "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"
      },
      "totalCents": {
        "type": "integer",
        "minimum": 0,
        "maximum": 9007199254740991,
        "description": "Amount in integer US cents (zero or more)"
      },
      "orderCount": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      },
      "byMonth": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "month": {
              "type": "string",
              "description": "YYYY-MM"
            },
            "totalCents": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Amount in integer US cents (zero or more)"
            },
            "orderCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "month",
            "totalCents",
            "orderCount"
          ],
          "additionalProperties": false
        }
      },
      "byAccount": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "accountId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "accountName": {
              "type": "string"
            },
            "totalCents": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Amount in integer US cents (zero or more)"
            },
            "orderCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "accountId",
            "accountName",
            "totalCents",
            "orderCount"
          ],
          "additionalProperties": false
        }
      },
      "byPart": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "partId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "partNumber": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "quantity": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "totalCents": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Amount in integer US cents (zero or more)"
            }
          },
          "required": [
            "partId",
            "partNumber",
            "description",
            "quantity",
            "totalCents"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "from",
      "to",
      "totalCents",
      "orderCount",
      "byMonth",
      "byAccount",
      "byPart"
    ],
    "additionalProperties": false
  }
}
            

reports.expiring_warranties

Report: expiring warranties

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

Machines whose warranty ends within a number of days (default 60), soonest first, with owner and site. Set includeExpiredDays to also see warranties that ended recently.

Input (object)

FieldTypeDescription
withinDaysintegerdefault 60, min 1, max 730
includeExpiredDaysintegerdefault 0, min 0, max 365
accountIdstringRecord id (UUID)min length 1, max length 64

Output (object)

FieldTypeDescription
withinDaysrequiredintegermin -9007199254740991, max 9007199254740991
todayrequiredstring (date)Date as YYYY-MM-DD
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
Example request
                curl https://api.cemco.app/v1/ops/reports.expiring_warranties \
  -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": {
      "withinDays": {
        "default": 60,
        "type": "integer",
        "minimum": 1,
        "maximum": 730
      },
      "includeExpiredDays": {
        "default": 0,
        "type": "integer",
        "minimum": 0,
        "maximum": 365
      },
      "accountId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      }
    }
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "withinDays": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      },
      "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])))$",
        "description": "Date as YYYY-MM-DD"
      },
      "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
        }
      }
    },
    "required": [
      "withinDays",
      "today",
      "items"
    ],
    "additionalProperties": false
  }
}
            

reports.accounts_not_contacted

Report: accounts not contacted

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

Active accounts with no call, email, text or visit in a number of days (default 90), longest silence first. Accounts never contacted come first.

Input (object)

FieldTypeDescription
daysintegerdefault 90, min 1, max 3650
limitintegerdefault 100, min 1, max 500

Output (object)

FieldTypeDescription
daysrequiredintegermin -9007199254740991, max 9007199254740991
todayrequiredstring (date)Date as YYYY-MM-DD
itemsrequiredobject[]
idrequiredstringRecord id (UUID)min length 1, max length 64
namerequiredstring
normalizedNamerequiredstringLower-cased name without punctuation or company suffixes; used for duplicate checks
segmentrequired"concrete_producer" | "multiservice"
statusrequired"active" | "prospect" | "inactive"
phonerequiredstring | null
websiterequiredstring | null
hqLine1requiredstring | null
hqLine2requiredstring | null
hqCityrequiredstring | null
hqStaterequiredstring | nullTwo-letter US state or region code
hqPostalCoderequiredstring | null
hqCountryrequiredstring | null
hubspotCompanyIdrequiredstring | null
ownerUserIdrequiredstring | nullStaff user who owns the accountmin length 1, max length 64
notesrequiredstring | null
lastContactedAtrequiredstring (date-time) | nullMost recent call, email, text or visit
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
machineCountrequiredintegermin -9007199254740991, max 9007199254740991
openOrderCountrequiredintegermin -9007199254740991, max 9007199254740991
openTicketCountrequiredintegermin -9007199254740991, max 9007199254740991
primaryContactNamerequiredstring | null
daysSinceContactrequiredinteger | nullmin -9007199254740991, max 9007199254740991
Example request
                curl https://api.cemco.app/v1/ops/reports.accounts_not_contacted \
  -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": {
      "days": {
        "default": 90,
        "type": "integer",
        "minimum": 1,
        "maximum": 3650
      },
      "limit": {
        "default": 100,
        "type": "integer",
        "minimum": 1,
        "maximum": 500
      }
    }
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "days": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      },
      "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])))$",
        "description": "Date as YYYY-MM-DD"
      },
      "items": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "name": {
              "type": "string"
            },
            "normalizedName": {
              "type": "string",
              "description": "Lower-cased name without punctuation or company suffixes; used for duplicate checks"
            },
            "segment": {
              "type": "string",
              "enum": [
                "concrete_producer",
                "multiservice"
              ]
            },
            "status": {
              "type": "string",
              "enum": [
                "active",
                "prospect",
                "inactive"
              ]
            },
            "phone": {
              "type": [
                "string",
                "null"
              ]
            },
            "website": {
              "type": [
                "string",
                "null"
              ]
            },
            "hqLine1": {
              "type": [
                "string",
                "null"
              ]
            },
            "hqLine2": {
              "type": [
                "string",
                "null"
              ]
            },
            "hqCity": {
              "type": [
                "string",
                "null"
              ]
            },
            "hqState": {
              "description": "Two-letter US state or region code",
              "type": [
                "string",
                "null"
              ]
            },
            "hqPostalCode": {
              "type": [
                "string",
                "null"
              ]
            },
            "hqCountry": {
              "type": [
                "string",
                "null"
              ]
            },
            "hubspotCompanyId": {
              "type": [
                "string",
                "null"
              ]
            },
            "ownerUserId": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Record id (UUID)"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Staff user who owns the account"
            },
            "notes": {
              "type": [
                "string",
                "null"
              ]
            },
            "lastContactedAt": {
              "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": "Most recent call, email, text or visit"
            },
            "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"
            },
            "machineCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "openOrderCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "openTicketCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "primaryContactName": {
              "type": [
                "string",
                "null"
              ]
            },
            "daysSinceContact": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "id",
            "name",
            "normalizedName",
            "segment",
            "status",
            "phone",
            "website",
            "hqLine1",
            "hqLine2",
            "hqCity",
            "hqState",
            "hqPostalCode",
            "hqCountry",
            "hubspotCompanyId",
            "ownerUserId",
            "notes",
            "lastContactedAt",
            "createdAt",
            "updatedAt",
            "machineCount",
            "openOrderCount",
            "openTicketCount",
            "primaryContactName",
            "daysSinceContact"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "days",
      "today",
      "items"
    ],
    "additionalProperties": false
  }
}