Skip to content

Warranty claims

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

warranty_claims.list

List warranty claims

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

Warranty claims with filters for account, machine, ticket and status. Each claim is linked to a service ticket and records the credit granted.

Input (object)

FieldTypeDescription
accountIdstringRecord id (UUID)min length 1, max length 64
machineIdstringRecord id (UUID)min length 1, max length 64
ticketIdstringRecord id (UUID)min length 1, max length 64
status"submitted" | "approved" | "denied" | "credited"
limitintegerMaximum rows to return (default 50, max 500)default 50, min 1, max 500
offsetintegerRows to skip, for pagingdefault 0, min 0, max 9007199254740991

Output (object)

FieldTypeDescription
itemsrequiredobject[]
idrequiredstringRecord id (UUID)min length 1, max length 64
claimNumberrequiredstring
ticketIdrequiredstringRecord id (UUID)min length 1, max length 64
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
accountIdrequiredstringRecord id (UUID)min length 1, max length 64
statusrequired"submitted" | "approved" | "denied" | "credited"
descriptionrequiredstring | null
amountClaimedCentsrequiredintegerAmount in integer US cents (zero or more)min 0, max 9007199254740991
creditCentsrequiredintegerCredit granted to the customermin 0, max 9007199254740991
submittedOnrequiredstring (date)Date as YYYY-MM-DD
decidedOnrequiredstring (date) | nullDate as YYYY-MM-DD
notesrequiredstring | null
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
ticketNumberrequiredstring
machineSerialNumberrequiredstring
accountNamerequiredstring
totalrequiredintegerTotal rows matching the filters, ignoring limit and offsetmin 0, max 9007199254740991
limitrequiredintegermin -9007199254740991, max 9007199254740991
offsetrequiredintegermin -9007199254740991, max 9007199254740991
Example request
                curl https://api.cemco.app/v1/ops/warranty_claims.list \
  -H "x-api-key: $CEMCO_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
              
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "accountId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "machineId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "ticketId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "status": {
        "type": "string",
        "enum": [
          "submitted",
          "approved",
          "denied",
          "credited"
        ]
      },
      "limit": {
        "default": 50,
        "description": "Maximum rows to return (default 50, max 500)",
        "type": "integer",
        "minimum": 1,
        "maximum": 500
      },
      "offset": {
        "default": 0,
        "description": "Rows to skip, for paging",
        "type": "integer",
        "minimum": 0,
        "maximum": 9007199254740991
      }
    }
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "items": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "claimNumber": {
              "type": "string"
            },
            "ticketId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "machineId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "accountId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Record id (UUID)"
            },
            "status": {
              "type": "string",
              "enum": [
                "submitted",
                "approved",
                "denied",
                "credited"
              ]
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "amountClaimedCents": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Amount in integer US cents (zero or more)"
            },
            "creditCents": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Credit granted to the customer"
            },
            "submittedOn": {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "description": "Date as YYYY-MM-DD"
            },
            "decidedOn": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                  "description": "Date as YYYY-MM-DD"
                },
                {
                  "type": "null"
                }
              ]
            },
            "notes": {
              "type": [
                "string",
                "null"
              ]
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
              "description": "UTC timestamp, ISO 8601 with Z"
            },
            "updatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
              "description": "UTC timestamp, ISO 8601 with Z"
            },
            "ticketNumber": {
              "type": "string"
            },
            "machineSerialNumber": {
              "type": "string"
            },
            "accountName": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "claimNumber",
            "ticketId",
            "machineId",
            "accountId",
            "status",
            "description",
            "amountClaimedCents",
            "creditCents",
            "submittedOn",
            "decidedOn",
            "notes",
            "createdAt",
            "updatedAt",
            "ticketNumber",
            "machineSerialNumber",
            "accountName"
          ],
          "additionalProperties": false
        }
      },
      "total": {
        "type": "integer",
        "minimum": 0,
        "maximum": 9007199254740991,
        "description": "Total rows matching the filters, ignoring limit and offset"
      },
      "limit": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      },
      "offset": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      }
    },
    "required": [
      "items",
      "total",
      "limit",
      "offset"
    ],
    "additionalProperties": false
  }
}
            

warranty_claims.create

File a warranty claim on a ticket

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

Create a warranty claim linked to a service ticket. The machine and account come from the ticket. The response says whether the machine was under warranty on the ticket's open date; a claim on a machine out of warranty is allowed but flagged.

Input (object)

FieldTypeDescription
ticketIdrequiredstringRecord id (UUID)min length 1, max length 64
descriptionstring | nullmax length 5000
amountClaimedCentsintegerAmount in integer US cents (zero or more)default 0, min 0, max 9007199254740991
submittedOnstring (date)Defaults to today
notesstring | nullmax length 5000

Output (object)

FieldTypeDescription
claimrequiredobject
idrequiredstringRecord id (UUID)min length 1, max length 64
claimNumberrequiredstring
ticketIdrequiredstringRecord id (UUID)min length 1, max length 64
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
accountIdrequiredstringRecord id (UUID)min length 1, max length 64
statusrequired"submitted" | "approved" | "denied" | "credited"
descriptionrequiredstring | null
amountClaimedCentsrequiredintegerAmount in integer US cents (zero or more)min 0, max 9007199254740991
creditCentsrequiredintegerCredit granted to the customermin 0, max 9007199254740991
submittedOnrequiredstring (date)Date as YYYY-MM-DD
decidedOnrequiredstring (date) | nullDate as YYYY-MM-DD
notesrequiredstring | null
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
underWarrantyrequiredboolean
Example request
                curl https://api.cemco.app/v1/ops/warranty_claims.create \
  -H "x-api-key: $CEMCO_API_KEY" \
  -H "content-type: application/json" \
  -d '{"ticketId":"00000000-0000-4000-8000-000000000000"}'
              
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "ticketId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "description": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 5000
          },
          {
            "type": "null"
          }
        ]
      },
      "amountClaimedCents": {
        "default": 0,
        "type": "integer",
        "minimum": 0,
        "maximum": 9007199254740991,
        "description": "Amount in integer US cents (zero or more)"
      },
      "submittedOn": {
        "description": "Defaults to today",
        "type": "string",
        "format": "date",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
      },
      "notes": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 5000
          },
          {
            "type": "null"
          }
        ]
      }
    },
    "required": [
      "ticketId"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "claim": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "claimNumber": {
            "type": "string"
          },
          "ticketId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "machineId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "accountId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "status": {
            "type": "string",
            "enum": [
              "submitted",
              "approved",
              "denied",
              "credited"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "amountClaimedCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991,
            "description": "Amount in integer US cents (zero or more)"
          },
          "creditCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991,
            "description": "Credit granted to the customer"
          },
          "submittedOn": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
            "description": "Date as YYYY-MM-DD"
          },
          "decidedOn": {
            "anyOf": [
              {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                "description": "Date as YYYY-MM-DD"
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "UTC timestamp, ISO 8601 with Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "UTC timestamp, ISO 8601 with Z"
          }
        },
        "required": [
          "id",
          "claimNumber",
          "ticketId",
          "machineId",
          "accountId",
          "status",
          "description",
          "amountClaimedCents",
          "creditCents",
          "submittedOn",
          "decidedOn",
          "notes",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "underWarranty": {
        "type": "boolean"
      }
    },
    "required": [
      "claim",
      "underWarranty"
    ],
    "additionalProperties": false
  }
}
            

warranty_claims.update

Update a warranty claim

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

Change a claim's status (submitted, approved, denied, credited), the amount claimed, the credit granted, the decision date or notes. Setting status credited requires a credit amount.

Input (object)

FieldTypeDescription
idrequiredstringRecord id (UUID)min length 1, max length 64
status"submitted" | "approved" | "denied" | "credited"
descriptionstring | nullmax length 5000
amountClaimedCentsintegerAmount in integer US cents (zero or more)min 0, max 9007199254740991
creditCentsintegerAmount in integer US cents (zero or more)min 0, max 9007199254740991
decidedOnstring (date) | nullDate as YYYY-MM-DD
notesstring | nullmax length 5000

Output (object)

FieldTypeDescription
claimrequiredobject
idrequiredstringRecord id (UUID)min length 1, max length 64
claimNumberrequiredstring
ticketIdrequiredstringRecord id (UUID)min length 1, max length 64
machineIdrequiredstringRecord id (UUID)min length 1, max length 64
accountIdrequiredstringRecord id (UUID)min length 1, max length 64
statusrequired"submitted" | "approved" | "denied" | "credited"
descriptionrequiredstring | null
amountClaimedCentsrequiredintegerAmount in integer US cents (zero or more)min 0, max 9007199254740991
creditCentsrequiredintegerCredit granted to the customermin 0, max 9007199254740991
submittedOnrequiredstring (date)Date as YYYY-MM-DD
decidedOnrequiredstring (date) | nullDate as YYYY-MM-DD
notesrequiredstring | null
createdAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
updatedAtrequiredstring (date-time)UTC timestamp, ISO 8601 with Z
Example request
                curl https://api.cemco.app/v1/ops/warranty_claims.update \
  -H "x-api-key: $CEMCO_API_KEY" \
  -H "content-type: application/json" \
  -d '{"id":"00000000-0000-4000-8000-000000000000"}'
              
JSON Schema
              {
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Record id (UUID)"
      },
      "status": {
        "type": "string",
        "enum": [
          "submitted",
          "approved",
          "denied",
          "credited"
        ]
      },
      "description": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 5000
          },
          {
            "type": "null"
          }
        ]
      },
      "amountClaimedCents": {
        "type": "integer",
        "minimum": 0,
        "maximum": 9007199254740991,
        "description": "Amount in integer US cents (zero or more)"
      },
      "creditCents": {
        "type": "integer",
        "minimum": 0,
        "maximum": 9007199254740991,
        "description": "Amount in integer US cents (zero or more)"
      },
      "decidedOn": {
        "anyOf": [
          {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
            "description": "Date as YYYY-MM-DD"
          },
          {
            "type": "null"
          }
        ]
      },
      "notes": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 5000
          },
          {
            "type": "null"
          }
        ]
      }
    },
    "required": [
      "id"
    ]
  },
  "output": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "claim": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "claimNumber": {
            "type": "string"
          },
          "ticketId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "machineId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "accountId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Record id (UUID)"
          },
          "status": {
            "type": "string",
            "enum": [
              "submitted",
              "approved",
              "denied",
              "credited"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "amountClaimedCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991,
            "description": "Amount in integer US cents (zero or more)"
          },
          "creditCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991,
            "description": "Credit granted to the customer"
          },
          "submittedOn": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
            "description": "Date as YYYY-MM-DD"
          },
          "decidedOn": {
            "anyOf": [
              {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                "description": "Date as YYYY-MM-DD"
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "UTC timestamp, ISO 8601 with Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "UTC timestamp, ISO 8601 with Z"
          }
        },
        "required": [
          "id",
          "claimNumber",
          "ticketId",
          "machineId",
          "accountId",
          "status",
          "description",
          "amountClaimedCents",
          "creditCents",
          "submittedOn",
          "decidedOn",
          "notes",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      }
    },
    "required": [
      "claim"
    ],
    "additionalProperties": false
  }
}