Skip to content

Customer portal

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

portal.me

Portal: my account

Kind
Read
Who
Customers (portal), scoped to their own account

The signed-in customer's own account: company name and address, their contact details, and Cemco's service contact.

Input (empty object)

No input. Send {}.

Output (object)

FieldTypeDescription
userrequiredobject
idrequiredstringRecord id (UUID)min length 1, max length 64
namerequiredstring
emailrequiredstring
accountrequiredobject
idrequiredstringRecord id (UUID)min length 1, max length 64
namerequiredstring
phonerequiredstring | null
hqLine1requiredstring | null
hqLine2requiredstring | null
hqCityrequiredstring | null
hqStaterequiredstring | nullTwo-letter US state or region code
hqPostalCoderequiredstring | null
hqCountryrequiredstring | null
contactrequiredobject | null
idrequiredstringRecord id (UUID)min length 1, max length 64
firstNamerequiredstring
lastNamerequiredstring
rolerequiredstring | nullJob title or role at the customer, for example Plant manager
emailrequiredstring | null
mobilerequiredstring | null
phonerequiredstring | null
preferredChannelrequired"email" | "phone" | "text"
cemcoContactrequiredobject
namerequiredstring
emailrequiredstring
phonerequiredstring | null
countsrequiredobject
openOrdersrequiredintegermin -9007199254740991, max 9007199254740991
machinesrequiredintegermin -9007199254740991, max 9007199254740991
openTicketsrequiredintegermin -9007199254740991, max 9007199254740991
ordersNeedingSignaturerequiredintegermin -9007199254740991, max 9007199254740991
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {}
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "user": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "email"
        ],
        "additionalProperties": false
      },
      "account": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "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"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "phone",
          "hqLine1",
          "hqLine2",
          "hqCity",
          "hqState",
          "hqPostalCode",
          "hqCountry"
        ],
        "additionalProperties": false
      },
      "contact": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Record id (UUID)"
              },
              "firstName": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              },
              "role": {
                "description": "Job title or role at the customer, for example Plant manager",
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "mobile": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "preferredChannel": {
                "type": "string",
                "enum": [
                  "email",
                  "phone",
                  "text"
                ]
              }
            },
            "required": [
              "id",
              "firstName",
              "lastName",
              "role",
              "email",
              "mobile",
              "phone",
              "preferredChannel"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "cemcoContact": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "name",
          "email",
          "phone"
        ],
        "additionalProperties": false
      },
      "counts": {
        "type": "object",
        "properties": {
          "openOrders": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "machines": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "openTickets": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "ordersNeedingSignature": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "openOrders",
          "machines",
          "openTickets",
          "ordersNeedingSignature"
        ],
        "additionalProperties": false
      }
    },
    "required": [
      "user",
      "account",
      "contact",
      "cemcoContact",
      "counts"
    ],
    "additionalProperties": false
  }
}
            

portal.orders

Portal: my orders

Kind
Read
Who
Customers (portal), scoped to their own account

The customer's own orders, newest first, with the current stage and whether a quote is waiting for signature.

Input (object)

FieldTypeDescription
openboolean

Output (object)

FieldTypeDescription
itemsrequiredobject[]
idrequiredstringRecord id (UUID)min length 1, max length 64
orderNumberrequiredstring
titlerequiredstring | null
stagerequired"received" | "in_build" | "ready_to_ship" | "shipped" | "delivered" | "set_up" | "commissioned" | "trained" | "closed"
stageLabelrequiredstring
totalCentsrequiredintegerAmount in integer US cents (zero or more)min 0, max 9007199254740991
balanceRemainingCentsrequiredinteger | nullAmount in integer US cents (zero or more)min 0, max 9007199254740991
financingPartnerrequired"none" | "commercial_capital" | "northland_capital" | "other"
financingStatusrequired"not_applicable" | "pending" | "approved" | "declined" | "funded"
poNumberrequiredstring | null
expectedShipOnrequiredstring (date) | nullDate as YYYY-MM-DD
siteNamerequiredstring | null
quoteSignedrequiredboolean
quoteSignedOnrequiredstring (date) | nullDate as YYYY-MM-DD
needsSignaturerequiredbooleanTrue when a quote is waiting for the customer's signature
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "open": {
        "type": "boolean"
      }
    }
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "items": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "orderNumber": {
              "type": "string"
            },
            "title": {
              "type": [
                "string",
                "null"
              ]
            },
            "stage": {
              "type": "string",
              "enum": [
                "received",
                "in_build",
                "ready_to_ship",
                "shipped",
                "delivered",
                "set_up",
                "commissioned",
                "trained",
                "closed"
              ]
            },
            "stageLabel": {
              "type": "string"
            },
            "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"
                }
              ]
            },
            "financingPartner": {
              "type": "string",
              "enum": [
                "none",
                "commercial_capital",
                "northland_capital",
                "other"
              ]
            },
            "financingStatus": {
              "type": "string",
              "enum": [
                "not_applicable",
                "pending",
                "approved",
                "declined",
                "funded"
              ]
            },
            "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"
                }
              ]
            },
            "siteName": {
              "type": [
                "string",
                "null"
              ]
            },
            "quoteSigned": {
              "type": "boolean"
            },
            "quoteSignedOn": {
              "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"
                }
              ]
            },
            "needsSignature": {
              "type": "boolean",
              "description": "True when a quote is waiting for the customer's signature"
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
              "description": "UTC timestamp, ISO 8601 with Z"
            }
          },
          "required": [
            "id",
            "orderNumber",
            "title",
            "stage",
            "stageLabel",
            "totalCents",
            "balanceRemainingCents",
            "financingPartner",
            "financingStatus",
            "poNumber",
            "expectedShipOn",
            "siteName",
            "quoteSigned",
            "quoteSignedOn",
            "needsSignature",
            "createdAt"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "items"
    ],
    "additionalProperties": false
  }
}
            

portal.order

Portal: one order

Kind
Read
Who
Customers (portal), scoped to their own account

One of the customer's own orders with line items, the status timeline, documents and the machines built for it. Not found if the order belongs to another account.

Input (object)

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

Output (object)

FieldTypeDescription
idrequiredstringRecord id (UUID)min length 1, max length 64
orderNumberrequiredstring
titlerequiredstring | null
stagerequired"received" | "in_build" | "ready_to_ship" | "shipped" | "delivered" | "set_up" | "commissioned" | "trained" | "closed"
stageLabelrequiredstring
totalCentsrequiredintegerAmount in integer US cents (zero or more)min 0, max 9007199254740991
balanceRemainingCentsrequiredinteger | nullAmount in integer US cents (zero or more)min 0, max 9007199254740991
financingPartnerrequired"none" | "commercial_capital" | "northland_capital" | "other"
financingStatusrequired"not_applicable" | "pending" | "approved" | "declined" | "funded"
poNumberrequiredstring | null
expectedShipOnrequiredstring (date) | nullDate as YYYY-MM-DD
siteNamerequiredstring | null
quoteSignedrequiredboolean
quoteSignedOnrequiredstring (date) | nullDate as YYYY-MM-DD
needsSignaturerequiredbooleanTrue when a quote is waiting for the customer's signature
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
linesrequiredobject[]
idrequiredstringRecord id (UUID)min length 1, max length 64
skurequiredstring | null
descriptionrequiredstring
quantityrequiredintegermin 1, max 9007199254740991
unitPriceCentsrequiredintegerAmount in integer US cents (zero or more)min 0, max 9007199254740991
totalCentsrequiredintegerAmount in integer US cents (zero or more)min 0, max 9007199254740991
timelinerequiredobject[]
stagerequired"received" | "in_build" | "ready_to_ship" | "shipped" | "delivered" | "set_up" | "commissioned" | "trained" | "closed"
labelrequiredstring
staterequired"done" | "current" | "upcoming"
daterequiredstring (date) | nullDate as YYYY-MM-DD
documentsrequiredobject[]
idrequiredstringRecord id (UUID)min length 1, max length 64
kindrequired"signed_quote" | "quote" | "purchase_order" | "drawing" | "manual" | "inspection_report" | "photo" | "training_record" | "invoice" | "email_attachment" | "export" | "other"
titlerequiredstring
filenamerequiredstring
contentTyperequiredstring
sizeBytesrequiredintegermin 0, max 9007199254740991
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
orderIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
orderNumberrequiredstring | null
machinesrequiredobject[]
idrequiredstringRecord id (UUID)min length 1, max length 64
serialNumberrequiredstring
typerequired"plant" | "mixer" | "silo" | "feeder" | "power_pack"
modelrequiredstring
configurationrequiredstring | null
optionsrequiredstring[]
statusrequired"in_build" | "in_transit" | "operating" | "down" | "idle" | "retired"
siteNamerequiredstring | null
siteCityrequiredstring | null
siteStaterequiredstring | null
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"
warrantyDaysLeftrequiredinteger | nullmin -9007199254740991, max 9007199254740991
orderIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
quoteDocumentIdrequiredstring | nullThe quote to review and sign, if one is waitingmin length 1, max length 64
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      }
    },
    "required": [
      "id"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "orderNumber": {
        "type": "string"
      },
      "title": {
        "type": [
          "string",
          "null"
        ]
      },
      "stage": {
        "type": "string",
        "enum": [
          "received",
          "in_build",
          "ready_to_ship",
          "shipped",
          "delivered",
          "set_up",
          "commissioned",
          "trained",
          "closed"
        ]
      },
      "stageLabel": {
        "type": "string"
      },
      "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"
          }
        ]
      },
      "financingPartner": {
        "type": "string",
        "enum": [
          "none",
          "commercial_capital",
          "northland_capital",
          "other"
        ]
      },
      "financingStatus": {
        "type": "string",
        "enum": [
          "not_applicable",
          "pending",
          "approved",
          "declined",
          "funded"
        ]
      },
      "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"
          }
        ]
      },
      "siteName": {
        "type": [
          "string",
          "null"
        ]
      },
      "quoteSigned": {
        "type": "boolean"
      },
      "quoteSignedOn": {
        "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"
          }
        ]
      },
      "needsSignature": {
        "type": "boolean",
        "description": "True when a quote is waiting for the customer's signature"
      },
      "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"
      },
      "lines": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "sku": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": {
              "type": "string"
            },
            "quantity": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            "unitPriceCents": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Amount in integer US cents (zero or more)"
            },
            "totalCents": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Amount in integer US cents (zero or more)"
            }
          },
          "required": [
            "id",
            "sku",
            "description",
            "quantity",
            "unitPriceCents",
            "totalCents"
          ],
          "additionalProperties": false
        }
      },
      "timeline": {
        "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"
            },
            "state": {
              "type": "string",
              "enum": [
                "done",
                "current",
                "upcoming"
              ]
            },
            "date": {
              "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": [
            "stage",
            "label",
            "state",
            "date"
          ],
          "additionalProperties": false
        }
      },
      "documents": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "kind": {
              "type": "string",
              "enum": [
                "signed_quote",
                "quote",
                "purchase_order",
                "drawing",
                "manual",
                "inspection_report",
                "photo",
                "training_record",
                "invoice",
                "email_attachment",
                "export",
                "other"
              ]
            },
            "title": {
              "type": "string"
            },
            "filename": {
              "type": "string"
            },
            "contentType": {
              "type": "string"
            },
            "sizeBytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "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"
            },
            "orderId": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Record id (UUID)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "orderNumber": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "id",
            "kind",
            "title",
            "filename",
            "contentType",
            "sizeBytes",
            "createdAt",
            "orderId",
            "orderNumber"
          ],
          "additionalProperties": false
        }
      },
      "machines": {
        "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"
              }
            },
            "status": {
              "type": "string",
              "enum": [
                "in_build",
                "in_transit",
                "operating",
                "down",
                "idle",
                "retired"
              ]
            },
            "siteName": {
              "type": [
                "string",
                "null"
              ]
            },
            "siteCity": {
              "type": [
                "string",
                "null"
              ]
            },
            "siteState": {
              "type": [
                "string",
                "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"
              ]
            },
            "warrantyDaysLeft": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "orderId": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Record id (UUID)"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "id",
            "serialNumber",
            "type",
            "model",
            "configuration",
            "options",
            "status",
            "siteName",
            "siteCity",
            "siteState",
            "commissionedOn",
            "warrantyStart",
            "warrantyEnd",
            "warrantyState",
            "warrantyDaysLeft",
            "orderId"
          ],
          "additionalProperties": false
        }
      },
      "quoteDocumentId": {
        "anyOf": [
          {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          {
            "type": "null"
          }
        ],
        "description": "The quote to review and sign, if one is waiting"
      }
    },
    "required": [
      "id",
      "orderNumber",
      "title",
      "stage",
      "stageLabel",
      "totalCents",
      "balanceRemainingCents",
      "financingPartner",
      "financingStatus",
      "poNumber",
      "expectedShipOn",
      "siteName",
      "quoteSigned",
      "quoteSignedOn",
      "needsSignature",
      "createdAt",
      "lines",
      "timeline",
      "documents",
      "machines",
      "quoteDocumentId"
    ],
    "additionalProperties": false
  }
}
            

portal.order_timeline

Portal: order status timeline

Kind
Read
Who
Customers (portal), scoped to their own account

The nine lifecycle stages of one of the customer's own orders, each marked done, current or upcoming, with the date reached.

Input (object)

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

Output (object)

FieldTypeDescription
orderIdrequiredstringRecord id (UUID)min length 1, max length 64
orderNumberrequiredstring
stagerequired"received" | "in_build" | "ready_to_ship" | "shipped" | "delivered" | "set_up" | "commissioned" | "trained" | "closed"
timelinerequiredobject[]
stagerequired"received" | "in_build" | "ready_to_ship" | "shipped" | "delivered" | "set_up" | "commissioned" | "trained" | "closed"
labelrequiredstring
staterequired"done" | "current" | "upcoming"
daterequiredstring (date) | nullDate as YYYY-MM-DD
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      }
    },
    "required": [
      "id"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "orderId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "orderNumber": {
        "type": "string"
      },
      "stage": {
        "type": "string",
        "enum": [
          "received",
          "in_build",
          "ready_to_ship",
          "shipped",
          "delivered",
          "set_up",
          "commissioned",
          "trained",
          "closed"
        ]
      },
      "timeline": {
        "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"
            },
            "state": {
              "type": "string",
              "enum": [
                "done",
                "current",
                "upcoming"
              ]
            },
            "date": {
              "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": [
            "stage",
            "label",
            "state",
            "date"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "orderId",
      "orderNumber",
      "stage",
      "timeline"
    ],
    "additionalProperties": false
  }
}
            

portal.sign_quote

Portal: sign the quote

Kind
Write (audited)
Who
Customers (portal), scoped to their own account

The customer signs the quote (the contract) for one of their own orders. Stores a signed record containing the quote reference, the signer's typed name and title, the drawn signature, the time and the signer's login, as the order's signed quote document, and sets the signed-quote received date to today. Fails with a conflict if the order already has a signed quote.

Input (object)

FieldTypeDescription
orderIdrequiredstringRecord id (UUID)min length 1, max length 64
signerNamerequiredstringmin length 2, max length 200
signerTitlestring | nullmax length 200
signatureDataUrlstringDrawn signature as a PNG or SVG data URLmax length 500000, pattern ^data:image\/(png|svg\+xml);base64,
agreerequiredtrueThe customer ticked the box agreeing to the quote's terms

Output (object)

FieldTypeDescription
orderrequiredobject
idrequiredstringRecord id (UUID)min length 1, max length 64
orderNumberrequiredstring
titlerequiredstring | null
stagerequired"received" | "in_build" | "ready_to_ship" | "shipped" | "delivered" | "set_up" | "commissioned" | "trained" | "closed"
stageLabelrequiredstring
totalCentsrequiredintegerAmount in integer US cents (zero or more)min 0, max 9007199254740991
balanceRemainingCentsrequiredinteger | nullAmount in integer US cents (zero or more)min 0, max 9007199254740991
financingPartnerrequired"none" | "commercial_capital" | "northland_capital" | "other"
financingStatusrequired"not_applicable" | "pending" | "approved" | "declined" | "funded"
poNumberrequiredstring | null
expectedShipOnrequiredstring (date) | nullDate as YYYY-MM-DD
siteNamerequiredstring | null
quoteSignedrequiredboolean
quoteSignedOnrequiredstring (date) | nullDate as YYYY-MM-DD
needsSignaturerequiredbooleanTrue when a quote is waiting for the customer's signature
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
documentrequiredobject
idrequiredstringRecord id (UUID)min length 1, max length 64
kindrequired"signed_quote" | "quote" | "purchase_order" | "drawing" | "manual" | "inspection_report" | "photo" | "training_record" | "invoice" | "email_attachment" | "export" | "other"
titlerequiredstring
filenamerequiredstring
contentTyperequiredstring
sizeBytesrequiredintegermin 0, max 9007199254740991
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
orderIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
orderNumberrequiredstring | null
signedOnrequiredstring (date)Date as YYYY-MM-DD
orderIsValidrequiredbooleanWhether the order now has everything it needs to go into build
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "orderId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "signerName": {
        "type": "string",
        "minLength": 2,
        "maxLength": 200
      },
      "signerTitle": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 200
          },
          {
            "type": "null"
          }
        ]
      },
      "signatureDataUrl": {
        "description": "Drawn signature as a PNG or SVG data URL",
        "type": "string",
        "maxLength": 500000,
        "pattern": "^data:image\\/(png|svg\\+xml);base64,"
      },
      "agree": {
        "type": "boolean",
        "const": true,
        "description": "The customer ticked the box agreeing to the quote's terms"
      }
    },
    "required": [
      "orderId",
      "signerName",
      "agree"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "order": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "orderNumber": {
            "type": "string"
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "stage": {
            "type": "string",
            "enum": [
              "received",
              "in_build",
              "ready_to_ship",
              "shipped",
              "delivered",
              "set_up",
              "commissioned",
              "trained",
              "closed"
            ]
          },
          "stageLabel": {
            "type": "string"
          },
          "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"
              }
            ]
          },
          "financingPartner": {
            "type": "string",
            "enum": [
              "none",
              "commercial_capital",
              "northland_capital",
              "other"
            ]
          },
          "financingStatus": {
            "type": "string",
            "enum": [
              "not_applicable",
              "pending",
              "approved",
              "declined",
              "funded"
            ]
          },
          "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"
              }
            ]
          },
          "siteName": {
            "type": [
              "string",
              "null"
            ]
          },
          "quoteSigned": {
            "type": "boolean"
          },
          "quoteSignedOn": {
            "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"
              }
            ]
          },
          "needsSignature": {
            "type": "boolean",
            "description": "True when a quote is waiting for the customer's signature"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "UTC timestamp, ISO 8601 with Z"
          }
        },
        "required": [
          "id",
          "orderNumber",
          "title",
          "stage",
          "stageLabel",
          "totalCents",
          "balanceRemainingCents",
          "financingPartner",
          "financingStatus",
          "poNumber",
          "expectedShipOn",
          "siteName",
          "quoteSigned",
          "quoteSignedOn",
          "needsSignature",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "document": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "kind": {
            "type": "string",
            "enum": [
              "signed_quote",
              "quote",
              "purchase_order",
              "drawing",
              "manual",
              "inspection_report",
              "photo",
              "training_record",
              "invoice",
              "email_attachment",
              "export",
              "other"
            ]
          },
          "title": {
            "type": "string"
          },
          "filename": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "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"
          },
          "orderId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "description": "Record id (UUID)"
              },
              {
                "type": "null"
              }
            ]
          },
          "orderNumber": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "title",
          "filename",
          "contentType",
          "sizeBytes",
          "createdAt",
          "orderId",
          "orderNumber"
        ],
        "additionalProperties": false
      },
      "signedOn": {
        "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"
      },
      "orderIsValid": {
        "type": "boolean",
        "description": "Whether the order now has everything it needs to go into build"
      }
    },
    "required": [
      "order",
      "document",
      "signedOn",
      "orderIsValid"
    ],
    "additionalProperties": false
  }
}
            

portal.export_order

Portal: export an order

Kind
Read
Who
Customers (portal), scoped to their own account

Download one of the customer's own orders as printable HTML, CSV of the line items, or JSON.

Input (object)

FieldTypeDescription
idrequiredstringRecord id (UUID)min length 1, max length 64
format"json" | "csv" | "html"default "html"

Output (object)

FieldTypeDescription
filenamerequiredstring
contentTyperequiredstring
contentrequiredstringThe exported file as text (JSON, CSV or printable HTML)
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "format": {
        "default": "html",
        "type": "string",
        "enum": [
          "json",
          "csv",
          "html"
        ]
      }
    },
    "required": [
      "id"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "filename": {
        "type": "string"
      },
      "contentType": {
        "type": "string"
      },
      "content": {
        "type": "string",
        "description": "The exported file as text (JSON, CSV or printable HTML)"
      }
    },
    "required": [
      "filename",
      "contentType",
      "content"
    ],
    "additionalProperties": false
  }
}
            

portal.machines

Portal: my machines

Kind
Read
Who
Customers (portal), scoped to their own account

The customer's installed machines with serial number, model, site, status and warranty start, end and days left.

Input (empty object)

No input. Send {}.

Output (object)

FieldTypeDescription
itemsrequiredobject[]
idrequiredstringRecord id (UUID)min length 1, max length 64
serialNumberrequiredstring
typerequired"plant" | "mixer" | "silo" | "feeder" | "power_pack"
modelrequiredstring
configurationrequiredstring | null
optionsrequiredstring[]
statusrequired"in_build" | "in_transit" | "operating" | "down" | "idle" | "retired"
siteNamerequiredstring | null
siteCityrequiredstring | null
siteStaterequiredstring | null
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"
warrantyDaysLeftrequiredinteger | nullmin -9007199254740991, max 9007199254740991
orderIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {}
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "items": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "serialNumber": {
              "type": "string"
            },
            "type": {
              "type": "string",
              "enum": [
                "plant",
                "mixer",
                "silo",
                "feeder",
                "power_pack"
              ]
            },
            "model": {
              "type": "string"
            },
            "configuration": {
              "type": [
                "string",
                "null"
              ]
            },
            "options": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "status": {
              "type": "string",
              "enum": [
                "in_build",
                "in_transit",
                "operating",
                "down",
                "idle",
                "retired"
              ]
            },
            "siteName": {
              "type": [
                "string",
                "null"
              ]
            },
            "siteCity": {
              "type": [
                "string",
                "null"
              ]
            },
            "siteState": {
              "type": [
                "string",
                "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"
              ]
            },
            "warrantyDaysLeft": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "orderId": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Record id (UUID)"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "id",
            "serialNumber",
            "type",
            "model",
            "configuration",
            "options",
            "status",
            "siteName",
            "siteCity",
            "siteState",
            "commissionedOn",
            "warrantyStart",
            "warrantyEnd",
            "warrantyState",
            "warrantyDaysLeft",
            "orderId"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "items"
    ],
    "additionalProperties": false
  }
}
            

portal.documents

Portal: my documents

Kind
Read
Who
Customers (portal), scoped to their own account

Documents shared with the customer: quotes, signed quotes, drawings, manuals and inspection reports on their own orders and machines.

Input (object)

FieldTypeDescription
orderIdstringRecord id (UUID)min length 1, max length 64
machineIdstringRecord id (UUID)min length 1, max length 64
kind"signed_quote" | "quote" | "purchase_order" | "drawing" | "manual" | "inspection_report" | "photo" | "training_record" | "invoice" | "email_attachment" | "export" | "other"

Output (object)

FieldTypeDescription
itemsrequiredobject[]
idrequiredstringRecord id (UUID)min length 1, max length 64
kindrequired"signed_quote" | "quote" | "purchase_order" | "drawing" | "manual" | "inspection_report" | "photo" | "training_record" | "invoice" | "email_attachment" | "export" | "other"
titlerequiredstring
filenamerequiredstring
contentTyperequiredstring
sizeBytesrequiredintegermin 0, max 9007199254740991
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
orderIdrequiredstring | nullRecord id (UUID)min length 1, max length 64
orderNumberrequiredstring | null
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "orderId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "machineId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "kind": {
        "type": "string",
        "enum": [
          "signed_quote",
          "quote",
          "purchase_order",
          "drawing",
          "manual",
          "inspection_report",
          "photo",
          "training_record",
          "invoice",
          "email_attachment",
          "export",
          "other"
        ]
      }
    }
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "items": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "kind": {
              "type": "string",
              "enum": [
                "signed_quote",
                "quote",
                "purchase_order",
                "drawing",
                "manual",
                "inspection_report",
                "photo",
                "training_record",
                "invoice",
                "email_attachment",
                "export",
                "other"
              ]
            },
            "title": {
              "type": "string"
            },
            "filename": {
              "type": "string"
            },
            "contentType": {
              "type": "string"
            },
            "sizeBytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "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"
            },
            "orderId": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Record id (UUID)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "orderNumber": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "id",
            "kind",
            "title",
            "filename",
            "contentType",
            "sizeBytes",
            "createdAt",
            "orderId",
            "orderNumber"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "items"
    ],
    "additionalProperties": false
  }
}
            

Portal: open a document

Kind
Read
Who
Customers (portal), scoped to their own account

A 15-minute signed link to one of the customer's own documents. Not found if the document belongs to another account or is not shared with customers.

Input (object)

FieldTypeDescription
idrequiredstringRecord id (UUID)min length 1, max length 64
disposition"inline" | "attachment"default "inline"

Output (object)

FieldTypeDescription
documentIdrequiredstringRecord id (UUID)min length 1, max length 64
urlrequiredstringAbsolute URL that opens the file without signing in; valid for 15 minutes
expiresAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
filenamerequiredstring
contentTyperequiredstring
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "disposition": {
        "default": "inline",
        "type": "string",
        "enum": [
          "inline",
          "attachment"
        ]
      }
    },
    "required": [
      "id"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "documentId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "url": {
        "type": "string",
        "description": "Absolute URL that opens the file without signing in; valid for 15 minutes"
      },
      "expiresAt": {
        "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"
      },
      "filename": {
        "type": "string"
      },
      "contentType": {
        "type": "string"
      }
    },
    "required": [
      "documentId",
      "url",
      "expiresAt",
      "filename",
      "contentType"
    ],
    "additionalProperties": false
  }
}
            

portal.request_service

Portal: request service

Kind
Write (audited)
Who
Customers (portal), scoped to their own account

The customer asks for service on one of their own machines. Opens a service ticket for Cemco (source portal) and emails a confirmation. Saying the plant is down sets priority down, which marks the machine down.

Input (object)

FieldTypeDescription
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
titlerequiredstringShort summary of the problemmin length 3, max length 200
descriptionstring | nullmax length 10000
plantDownbooleanThe machine cannot producedefault false
category"mechanical" | "electrical" | "controls" | "hydraulic" | "pneumatic" | "structural" | "calibration" | "operator_training" | "other"default "other"
preferredContactstring | nullBest phone number or time to reach themmax length 200

Output (object)

FieldTypeDescription
ticketrequiredobject
idrequiredstringRecord id (UUID)min length 1, max length 64
ticketNumberrequiredstring
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"
statusLabelrequiredstring
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
machineSerialNumberrequiredstring
machineModelrequiredstring
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
resolutionrequiredstring | null
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "machineId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "title": {
        "type": "string",
        "minLength": 3,
        "maxLength": 200,
        "description": "Short summary of the problem"
      },
      "description": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 10000
          },
          {
            "type": "null"
          }
        ]
      },
      "plantDown": {
        "default": false,
        "description": "The machine cannot produce",
        "type": "boolean"
      },
      "category": {
        "default": "other",
        "type": "string",
        "enum": [
          "mechanical",
          "electrical",
          "controls",
          "hydraulic",
          "pneumatic",
          "structural",
          "calibration",
          "operator_training",
          "other"
        ]
      },
      "preferredContact": {
        "description": "Best phone number or time to reach them",
        "anyOf": [
          {
            "type": "string",
            "maxLength": 200
          },
          {
            "type": "null"
          }
        ]
      }
    },
    "required": [
      "machineId",
      "title"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "ticket": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "ticketNumber": {
            "type": "string"
          },
          "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"
            ]
          },
          "statusLabel": {
            "type": "string"
          },
          "machineId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "machineSerialNumber": {
            "type": "string"
          },
          "machineModel": {
            "type": "string"
          },
          "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"
              }
            ]
          },
          "resolution": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "ticketNumber",
          "title",
          "description",
          "category",
          "priority",
          "status",
          "statusLabel",
          "machineId",
          "machineSerialNumber",
          "machineModel",
          "openedAt",
          "scheduledFor",
          "resolvedAt",
          "resolution"
        ],
        "additionalProperties": false
      }
    },
    "required": [
      "ticket"
    ],
    "additionalProperties": false
  }
}
            

portal.tickets

Portal: my service requests

Kind
Read
Who
Customers (portal), scoped to their own account

Service tickets on the customer's own machines with their current status.

Input (object)

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

Output (object)

FieldTypeDescription
itemsrequiredobject[]
idrequiredstringRecord id (UUID)min length 1, max length 64
ticketNumberrequiredstring
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"
statusLabelrequiredstring
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
machineSerialNumberrequiredstring
machineModelrequiredstring
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
resolutionrequiredstring | null
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "open": {
        "type": "boolean"
      },
      "machineId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      }
    }
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "items": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "ticketNumber": {
              "type": "string"
            },
            "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"
              ]
            },
            "statusLabel": {
              "type": "string"
            },
            "machineId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "machineSerialNumber": {
              "type": "string"
            },
            "machineModel": {
              "type": "string"
            },
            "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"
                }
              ]
            },
            "resolution": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "id",
            "ticketNumber",
            "title",
            "description",
            "category",
            "priority",
            "status",
            "statusLabel",
            "machineId",
            "machineSerialNumber",
            "machineModel",
            "openedAt",
            "scheduledFor",
            "resolvedAt",
            "resolution"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "items"
    ],
    "additionalProperties": false
  }
}
            

portal.update_profile

Portal: update my contact details

Kind
Write (audited)
Who
Customers (portal), scoped to their own account

The customer changes their own name, phone numbers and preferred contact channel.

Input (object)

FieldTypeDescription
namestringmin length 1, max length 200
mobilestring | nullmax length 40
phonestring | nullmax length 40
preferredChannel"email" | "phone" | "text"

Output (object)

FieldTypeDescription
okrequiredtrue
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      },
      "mobile": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 40
          },
          {
            "type": "null"
          }
        ]
      },
      "phone": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 40
          },
          {
            "type": "null"
          }
        ]
      },
      "preferredChannel": {
        "type": "string",
        "enum": [
          "email",
          "phone",
          "text"
        ]
      }
    }
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "ok": {
        "type": "boolean",
        "const": true
      }
    },
    "required": [
      "ok"
    ],
    "additionalProperties": false
  }
}