Parts catalog
Generated at build time from packages/core/src/operations/parts.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.
parts.search
Search the parts catalog
Search the Master Parts List by part number or description, optionally only parts that fit a model. Each part shows price, the date of the price list it came from, a stale flag when that price is older than the current list, stock on hand and whether it is low.
Input (object)
| Field | Type | Description |
|---|---|---|
query | string | Part number or words from the descriptionmax length 200 |
fitsModel | string | For example Model 300max length 100 |
category | string | max length 100 |
staleOnly | boolean | default false |
lowStockOnly | boolean | default false |
inStockOnly | boolean | default false |
activeOnly | boolean | default true |
sort | "part_number" | "description" | "on_hand" | "price" | default "part_number" |
limit | integer | Maximum rows to return (default 50, max 500)default 50, min 1, max 500 |
offset | integer | Rows to skip, for pagingdefault 0, min 0, max 9007199254740991 |
Output (object)
| Field | Type | Description |
|---|---|---|
itemsrequired | object[] | |
idrequired | string | Record id (UUID)min length 1, max length 64 |
partNumberrequired | string | |
descriptionrequired | string | |
categoryrequired | string | null | |
unitrequired | string | Unit of measure, for example each, ft, set |
priceCentsrequired | integer | Amount in integer US cents (zero or more)min 0, max 9007199254740991 |
priceListDaterequired | string (date) | Date of the price list this price comes from |
isStalerequired | boolean | True when the price is older than the current price list |
fitsModelsrequired | string[] | Machine models the part fits |
onHandrequired | integer | Stock on hand; changes only through stock movementsmin -9007199254740991, max 9007199254740991 |
reorderPointrequired | integer | min 0, max 9007199254740991 |
reorderQuantityrequired | integer | min 0, max 9007199254740991 |
isLowrequired | boolean | True when on hand is at or below the reorder point |
binLocationrequired | string | null | |
recommendedSparerequired | boolean | Recommended to keep on the customer's shelf |
activerequired | boolean | |
createdAtrequired | string (date-time) | UTC timestamp, ISO 8601 with Z |
updatedAtrequired | string (date-time) | UTC timestamp, ISO 8601 with Z |
totalrequired | integer | Total rows matching the filters, ignoring limit and offsetmin 0, max 9007199254740991 |
limitrequired | integer | min -9007199254740991, max 9007199254740991 |
offsetrequired | integer | min -9007199254740991, max 9007199254740991 |
Example request
curl https://api.cemco.app/v1/ops/parts.search \
-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": {
"query": {
"description": "Part number or words from the description",
"type": "string",
"maxLength": 200
},
"fitsModel": {
"description": "For example Model 300",
"type": "string",
"maxLength": 100
},
"category": {
"type": "string",
"maxLength": 100
},
"staleOnly": {
"default": false,
"type": "boolean"
},
"lowStockOnly": {
"default": false,
"type": "boolean"
},
"inStockOnly": {
"default": false,
"type": "boolean"
},
"activeOnly": {
"default": true,
"type": "boolean"
},
"sort": {
"default": "part_number",
"type": "string",
"enum": [
"part_number",
"description",
"on_hand",
"price"
]
},
"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)"
},
"partNumber": {
"type": "string"
},
"description": {
"type": "string"
},
"category": {
"type": [
"string",
"null"
]
},
"unit": {
"type": "string",
"description": "Unit of measure, for example each, ft, set"
},
"priceCents": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Amount in integer US cents (zero or more)"
},
"priceListDate": {
"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 of the price list this price comes from"
},
"isStale": {
"type": "boolean",
"description": "True when the price is older than the current price list"
},
"fitsModels": {
"type": "array",
"items": {
"type": "string"
},
"description": "Machine models the part fits"
},
"onHand": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Stock on hand; changes only through stock movements"
},
"reorderPoint": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"reorderQuantity": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"isLow": {
"type": "boolean",
"description": "True when on hand is at or below the reorder point"
},
"binLocation": {
"type": [
"string",
"null"
]
},
"recommendedSpare": {
"type": "boolean",
"description": "Recommended to keep on the customer's shelf"
},
"active": {
"type": "boolean"
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "UTC timestamp, ISO 8601 with Z"
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "UTC timestamp, ISO 8601 with Z"
}
},
"required": [
"id",
"partNumber",
"description",
"category",
"unit",
"priceCents",
"priceListDate",
"isStale",
"fitsModels",
"onHand",
"reorderPoint",
"reorderQuantity",
"isLow",
"binLocation",
"recommendedSpare",
"active",
"createdAt",
"updatedAt"
],
"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
}
}
parts.get
Get a part
One part by id or part number, with its latest stock movements.
Input (object)
| Field | Type | Description |
|---|---|---|
id | string | Record id (UUID)min length 1, max length 64 |
partNumber | string | max length 60 |
Output (object)
| Field | Type | Description |
|---|---|---|
partrequired | object | |
idrequired | string | Record id (UUID)min length 1, max length 64 |
partNumberrequired | string | |
descriptionrequired | string | |
categoryrequired | string | null | |
unitrequired | string | Unit of measure, for example each, ft, set |
priceCentsrequired | integer | Amount in integer US cents (zero or more)min 0, max 9007199254740991 |
priceListDaterequired | string (date) | Date of the price list this price comes from |
isStalerequired | boolean | True when the price is older than the current price list |
fitsModelsrequired | string[] | Machine models the part fits |
onHandrequired | integer | Stock on hand; changes only through stock movementsmin -9007199254740991, max 9007199254740991 |
reorderPointrequired | integer | min 0, max 9007199254740991 |
reorderQuantityrequired | integer | min 0, max 9007199254740991 |
isLowrequired | boolean | True when on hand is at or below the reorder point |
binLocationrequired | string | null | |
recommendedSparerequired | boolean | Recommended to keep on the customer's shelf |
activerequired | boolean | |
createdAtrequired | string (date-time) | UTC timestamp, ISO 8601 with Z |
updatedAtrequired | string (date-time) | UTC timestamp, ISO 8601 with Z |
recentMovementsrequired | object[] | |
idrequired | string | Record id (UUID)min length 1, max length 64 |
partIdrequired | string | Record id (UUID)min length 1, max length 64 |
partNumberrequired | string | |
typerequired | "receive" | "adjust" | "ship" | "return" | |
quantityrequired | integer | Signed change: positive adds stock, negative removes itmin -9007199254740991, max 9007199254740991 |
balanceAfterrequired | integer | Stock on hand after this movementmin -9007199254740991, max 9007199254740991 |
reasonrequired | string | null | |
partsOrderIdrequired | string | null | Record id (UUID)min length 1, max length 64 |
ticketIdrequired | string | null | Record id (UUID)min length 1, max length 64 |
unitCostCentsrequired | integer | null | Amount in integer US cents (zero or more)min 0, max 9007199254740991 |
actorNamerequired | string | |
createdAtrequired | string (date-time) | UTC timestamp, ISO 8601 with Z |
Example request
curl https://api.cemco.app/v1/ops/parts.get \
-H "x-api-key: $CEMCO_API_KEY" \
-H "content-type: application/json" \
-d '{"id":"00000000-0000-4000-8000-000000000000"}'
JSON Schema
{
"input": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "Record id (UUID)"
},
"partNumber": {
"type": "string",
"maxLength": 60
}
}
},
"output": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"part": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "Record id (UUID)"
},
"partNumber": {
"type": "string"
},
"description": {
"type": "string"
},
"category": {
"type": [
"string",
"null"
]
},
"unit": {
"type": "string",
"description": "Unit of measure, for example each, ft, set"
},
"priceCents": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Amount in integer US cents (zero or more)"
},
"priceListDate": {
"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 of the price list this price comes from"
},
"isStale": {
"type": "boolean",
"description": "True when the price is older than the current price list"
},
"fitsModels": {
"type": "array",
"items": {
"type": "string"
},
"description": "Machine models the part fits"
},
"onHand": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Stock on hand; changes only through stock movements"
},
"reorderPoint": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"reorderQuantity": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"isLow": {
"type": "boolean",
"description": "True when on hand is at or below the reorder point"
},
"binLocation": {
"type": [
"string",
"null"
]
},
"recommendedSpare": {
"type": "boolean",
"description": "Recommended to keep on the customer's shelf"
},
"active": {
"type": "boolean"
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "UTC timestamp, ISO 8601 with Z"
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "UTC timestamp, ISO 8601 with Z"
}
},
"required": [
"id",
"partNumber",
"description",
"category",
"unit",
"priceCents",
"priceListDate",
"isStale",
"fitsModels",
"onHand",
"reorderPoint",
"reorderQuantity",
"isLow",
"binLocation",
"recommendedSpare",
"active",
"createdAt",
"updatedAt"
],
"additionalProperties": false
},
"recentMovements": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "Record id (UUID)"
},
"partId": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "Record id (UUID)"
},
"partNumber": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"receive",
"adjust",
"ship",
"return"
]
},
"quantity": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Signed change: positive adds stock, negative removes it"
},
"balanceAfter": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Stock on hand after this movement"
},
"reason": {
"type": [
"string",
"null"
]
},
"partsOrderId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "Record id (UUID)"
},
{
"type": "null"
}
]
},
"ticketId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "Record id (UUID)"
},
{
"type": "null"
}
]
},
"unitCostCents": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Amount in integer US cents (zero or more)"
},
{
"type": "null"
}
]
},
"actorName": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "UTC timestamp, ISO 8601 with Z"
}
},
"required": [
"id",
"partId",
"partNumber",
"type",
"quantity",
"balanceAfter",
"reason",
"partsOrderId",
"ticketId",
"unitCostCents",
"actorName",
"createdAt"
],
"additionalProperties": false
}
}
},
"required": [
"part",
"recentMovements"
],
"additionalProperties": false
}
}
parts.upsert
Create or update a part
Add a part to the catalog or change one (matched by id, else by part number, which is unique). Stock on hand cannot be set here: use stock.receive or stock.adjust so the ledger stays complete.
Input (object)
| Field | Type | Description |
|---|---|---|
id | string | Record id (UUID)min length 1, max length 64 |
partNumberrequired | string | min length 1, max length 60 |
descriptionrequired | string | min length 1, max length 500 |
category | string | null | max length 100 |
unit | string | default "each", max length 20 |
priceCentsrequired | integer | Amount in integer US cents (zero or more)min 0, max 9007199254740991 |
priceListDate | string (date) | Defaults to the current price list date for new parts |
fitsModels | string[] | default [] |
reorderPoint | integer | default 0, min 0, max 9007199254740991 |
reorderQuantity | integer | default 0, min 0, max 9007199254740991 |
binLocation | string | null | max length 60 |
recommendedSpare | boolean | default false |
active | boolean | default true |
Output (object)
| Field | Type | Description |
|---|---|---|
partrequired | object | |
idrequired | string | Record id (UUID)min length 1, max length 64 |
partNumberrequired | string | |
descriptionrequired | string | |
categoryrequired | string | null | |
unitrequired | string | Unit of measure, for example each, ft, set |
priceCentsrequired | integer | Amount in integer US cents (zero or more)min 0, max 9007199254740991 |
priceListDaterequired | string (date) | Date of the price list this price comes from |
isStalerequired | boolean | True when the price is older than the current price list |
fitsModelsrequired | string[] | Machine models the part fits |
onHandrequired | integer | Stock on hand; changes only through stock movementsmin -9007199254740991, max 9007199254740991 |
reorderPointrequired | integer | min 0, max 9007199254740991 |
reorderQuantityrequired | integer | min 0, max 9007199254740991 |
isLowrequired | boolean | True when on hand is at or below the reorder point |
binLocationrequired | string | null | |
recommendedSparerequired | boolean | Recommended to keep on the customer's shelf |
activerequired | boolean | |
createdAtrequired | string (date-time) | UTC timestamp, ISO 8601 with Z |
updatedAtrequired | string (date-time) | UTC timestamp, ISO 8601 with Z |
createdrequired | boolean |
Example request
curl https://api.cemco.app/v1/ops/parts.upsert \
-H "x-api-key: $CEMCO_API_KEY" \
-H "content-type: application/json" \
-d '{"partNumber":"example","description":"example","priceCents":0}'
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)"
},
"partNumber": {
"type": "string",
"minLength": 1,
"maxLength": 60
},
"description": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"category": {
"anyOf": [
{
"type": "string",
"maxLength": 100
},
{
"type": "null"
}
]
},
"unit": {
"default": "each",
"type": "string",
"maxLength": 20
},
"priceCents": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Amount in integer US cents (zero or more)"
},
"priceListDate": {
"description": "Defaults to the current price list date for new parts",
"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])))$"
},
"fitsModels": {
"default": [],
"type": "array",
"items": {
"type": "string",
"maxLength": 100
}
},
"reorderPoint": {
"default": 0,
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"reorderQuantity": {
"default": 0,
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"binLocation": {
"anyOf": [
{
"type": "string",
"maxLength": 60
},
{
"type": "null"
}
]
},
"recommendedSpare": {
"default": false,
"type": "boolean"
},
"active": {
"default": true,
"type": "boolean"
}
},
"required": [
"partNumber",
"description",
"priceCents"
]
},
"output": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"part": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "Record id (UUID)"
},
"partNumber": {
"type": "string"
},
"description": {
"type": "string"
},
"category": {
"type": [
"string",
"null"
]
},
"unit": {
"type": "string",
"description": "Unit of measure, for example each, ft, set"
},
"priceCents": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Amount in integer US cents (zero or more)"
},
"priceListDate": {
"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 of the price list this price comes from"
},
"isStale": {
"type": "boolean",
"description": "True when the price is older than the current price list"
},
"fitsModels": {
"type": "array",
"items": {
"type": "string"
},
"description": "Machine models the part fits"
},
"onHand": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Stock on hand; changes only through stock movements"
},
"reorderPoint": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"reorderQuantity": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"isLow": {
"type": "boolean",
"description": "True when on hand is at or below the reorder point"
},
"binLocation": {
"type": [
"string",
"null"
]
},
"recommendedSpare": {
"type": "boolean",
"description": "Recommended to keep on the customer's shelf"
},
"active": {
"type": "boolean"
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "UTC timestamp, ISO 8601 with Z"
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "UTC timestamp, ISO 8601 with Z"
}
},
"required": [
"id",
"partNumber",
"description",
"category",
"unit",
"priceCents",
"priceListDate",
"isStale",
"fitsModels",
"onHand",
"reorderPoint",
"reorderQuantity",
"isLow",
"binLocation",
"recommendedSpare",
"active",
"createdAt",
"updatedAt"
],
"additionalProperties": false
},
"created": {
"type": "boolean"
}
},
"required": [
"part",
"created"
],
"additionalProperties": false
}
}
parts.update_price
Update a part price
Set a new price for a part and stamp it with a price-list date (today's list by default), which clears the stale flag. Use this when confirming or correcting the 2020 prices from the old parts list.
Input (object)
| Field | Type | Description |
|---|---|---|
id | string | Record id (UUID)min length 1, max length 64 |
partNumber | string | max length 60 |
priceCentsrequired | integer | Amount in integer US cents (zero or more)min 0, max 9007199254740991 |
priceListDate | string (date) | Defaults to the current price list date |
Output (object)
| Field | Type | Description |
|---|---|---|
partrequired | object | |
idrequired | string | Record id (UUID)min length 1, max length 64 |
partNumberrequired | string | |
descriptionrequired | string | |
categoryrequired | string | null | |
unitrequired | string | Unit of measure, for example each, ft, set |
priceCentsrequired | integer | Amount in integer US cents (zero or more)min 0, max 9007199254740991 |
priceListDaterequired | string (date) | Date of the price list this price comes from |
isStalerequired | boolean | True when the price is older than the current price list |
fitsModelsrequired | string[] | Machine models the part fits |
onHandrequired | integer | Stock on hand; changes only through stock movementsmin -9007199254740991, max 9007199254740991 |
reorderPointrequired | integer | min 0, max 9007199254740991 |
reorderQuantityrequired | integer | min 0, max 9007199254740991 |
isLowrequired | boolean | True when on hand is at or below the reorder point |
binLocationrequired | string | null | |
recommendedSparerequired | boolean | Recommended to keep on the customer's shelf |
activerequired | boolean | |
createdAtrequired | string (date-time) | UTC timestamp, ISO 8601 with Z |
updatedAtrequired | string (date-time) | UTC timestamp, ISO 8601 with Z |
previousPriceCentsrequired | integer | Amount in integer US cents (zero or more)min 0, max 9007199254740991 |
previousPriceListDaterequired | string (date) | Date as YYYY-MM-DD |
Example request
curl https://api.cemco.app/v1/ops/parts.update_price \
-H "x-api-key: $CEMCO_API_KEY" \
-H "content-type: application/json" \
-d '{"priceCents":0,"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)"
},
"partNumber": {
"type": "string",
"maxLength": 60
},
"priceCents": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Amount in integer US cents (zero or more)"
},
"priceListDate": {
"description": "Defaults to the current price list date",
"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])))$"
}
},
"required": [
"priceCents"
]
},
"output": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"part": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "Record id (UUID)"
},
"partNumber": {
"type": "string"
},
"description": {
"type": "string"
},
"category": {
"type": [
"string",
"null"
]
},
"unit": {
"type": "string",
"description": "Unit of measure, for example each, ft, set"
},
"priceCents": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Amount in integer US cents (zero or more)"
},
"priceListDate": {
"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 of the price list this price comes from"
},
"isStale": {
"type": "boolean",
"description": "True when the price is older than the current price list"
},
"fitsModels": {
"type": "array",
"items": {
"type": "string"
},
"description": "Machine models the part fits"
},
"onHand": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Stock on hand; changes only through stock movements"
},
"reorderPoint": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"reorderQuantity": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"isLow": {
"type": "boolean",
"description": "True when on hand is at or below the reorder point"
},
"binLocation": {
"type": [
"string",
"null"
]
},
"recommendedSpare": {
"type": "boolean",
"description": "Recommended to keep on the customer's shelf"
},
"active": {
"type": "boolean"
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "UTC timestamp, ISO 8601 with Z"
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "UTC timestamp, ISO 8601 with Z"
}
},
"required": [
"id",
"partNumber",
"description",
"category",
"unit",
"priceCents",
"priceListDate",
"isStale",
"fitsModels",
"onHand",
"reorderPoint",
"reorderQuantity",
"isLow",
"binLocation",
"recommendedSpare",
"active",
"createdAt",
"updatedAt"
],
"additionalProperties": false
},
"previousPriceCents": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Amount in integer US cents (zero or more)"
},
"previousPriceListDate": {
"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"
}
},
"required": [
"part",
"previousPriceCents",
"previousPriceListDate"
],
"additionalProperties": false
}
}
parts.stale_prices
List parts with stale prices
Parts whose price comes from a price list older than the current one (for example the 2020 Master Parts List), oldest first, with the count of all stale parts.
Input (object)
| Field | Type | Description |
|---|---|---|
limit | integer | Maximum rows to return (default 50, max 500)default 50, min 1, max 500 |
offset | integer | Rows to skip, for pagingdefault 0, min 0, max 9007199254740991 |
Output (object)
| Field | Type | Description |
|---|---|---|
itemsrequired | object[] | |
idrequired | string | Record id (UUID)min length 1, max length 64 |
partNumberrequired | string | |
descriptionrequired | string | |
categoryrequired | string | null | |
unitrequired | string | Unit of measure, for example each, ft, set |
priceCentsrequired | integer | Amount in integer US cents (zero or more)min 0, max 9007199254740991 |
priceListDaterequired | string (date) | Date of the price list this price comes from |
isStalerequired | boolean | True when the price is older than the current price list |
fitsModelsrequired | string[] | Machine models the part fits |
onHandrequired | integer | Stock on hand; changes only through stock movementsmin -9007199254740991, max 9007199254740991 |
reorderPointrequired | integer | min 0, max 9007199254740991 |
reorderQuantityrequired | integer | min 0, max 9007199254740991 |
isLowrequired | boolean | True when on hand is at or below the reorder point |
binLocationrequired | string | null | |
recommendedSparerequired | boolean | Recommended to keep on the customer's shelf |
activerequired | boolean | |
createdAtrequired | string (date-time) | UTC timestamp, ISO 8601 with Z |
updatedAtrequired | string (date-time) | UTC timestamp, ISO 8601 with Z |
totalrequired | integer | Total rows matching the filters, ignoring limit and offsetmin 0, max 9007199254740991 |
limitrequired | integer | min -9007199254740991, max 9007199254740991 |
offsetrequired | integer | min -9007199254740991, max 9007199254740991 |
currentPriceListDaterequired | string (date) | Date as YYYY-MM-DD |
Example request
curl https://api.cemco.app/v1/ops/parts.stale_prices \
-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": {
"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)"
},
"partNumber": {
"type": "string"
},
"description": {
"type": "string"
},
"category": {
"type": [
"string",
"null"
]
},
"unit": {
"type": "string",
"description": "Unit of measure, for example each, ft, set"
},
"priceCents": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Amount in integer US cents (zero or more)"
},
"priceListDate": {
"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 of the price list this price comes from"
},
"isStale": {
"type": "boolean",
"description": "True when the price is older than the current price list"
},
"fitsModels": {
"type": "array",
"items": {
"type": "string"
},
"description": "Machine models the part fits"
},
"onHand": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Stock on hand; changes only through stock movements"
},
"reorderPoint": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"reorderQuantity": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"isLow": {
"type": "boolean",
"description": "True when on hand is at or below the reorder point"
},
"binLocation": {
"type": [
"string",
"null"
]
},
"recommendedSpare": {
"type": "boolean",
"description": "Recommended to keep on the customer's shelf"
},
"active": {
"type": "boolean"
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "UTC timestamp, ISO 8601 with Z"
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "UTC timestamp, ISO 8601 with Z"
}
},
"required": [
"id",
"partNumber",
"description",
"category",
"unit",
"priceCents",
"priceListDate",
"isStale",
"fitsModels",
"onHand",
"reorderPoint",
"reorderQuantity",
"isLow",
"binLocation",
"recommendedSpare",
"active",
"createdAt",
"updatedAt"
],
"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
},
"currentPriceListDate": {
"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"
}
},
"required": [
"items",
"total",
"limit",
"offset",
"currentPriceListDate"
],
"additionalProperties": false
}
}
parts.recommended_spares
List recommended spare parts for a model
The spare parts Cemco recommends a customer keeps on the shelf for a machine model (or for one machine), with price and stock on hand. Use it to build a spares quote.
Input (object)
| Field | Type | Description |
|---|---|---|
model | string | max length 100 |
machineId | string | Record id (UUID)min length 1, max length 64 |
Output (object)
| Field | Type | Description |
|---|---|---|
modelrequired | string | |
itemsrequired | object[] | |
idrequired | string | Record id (UUID)min length 1, max length 64 |
partNumberrequired | string | |
descriptionrequired | string | |
categoryrequired | string | null | |
unitrequired | string | Unit of measure, for example each, ft, set |
priceCentsrequired | integer | Amount in integer US cents (zero or more)min 0, max 9007199254740991 |
priceListDaterequired | string (date) | Date of the price list this price comes from |
isStalerequired | boolean | True when the price is older than the current price list |
fitsModelsrequired | string[] | Machine models the part fits |
onHandrequired | integer | Stock on hand; changes only through stock movementsmin -9007199254740991, max 9007199254740991 |
reorderPointrequired | integer | min 0, max 9007199254740991 |
reorderQuantityrequired | integer | min 0, max 9007199254740991 |
isLowrequired | boolean | True when on hand is at or below the reorder point |
binLocationrequired | string | null | |
recommendedSparerequired | boolean | Recommended to keep on the customer's shelf |
activerequired | boolean | |
createdAtrequired | string (date-time) | UTC timestamp, ISO 8601 with Z |
updatedAtrequired | string (date-time) | UTC timestamp, ISO 8601 with Z |
totalCentsrequired | integer | Amount in integer US cents (zero or more)min 0, max 9007199254740991 |
Example request
curl https://api.cemco.app/v1/ops/parts.recommended_spares \
-H "x-api-key: $CEMCO_API_KEY" \
-H "content-type: application/json" \
-d '{"model":"example"}'
JSON Schema
{
"input": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"model": {
"type": "string",
"maxLength": 100
},
"machineId": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "Record id (UUID)"
}
}
},
"output": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"model": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "Record id (UUID)"
},
"partNumber": {
"type": "string"
},
"description": {
"type": "string"
},
"category": {
"type": [
"string",
"null"
]
},
"unit": {
"type": "string",
"description": "Unit of measure, for example each, ft, set"
},
"priceCents": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Amount in integer US cents (zero or more)"
},
"priceListDate": {
"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 of the price list this price comes from"
},
"isStale": {
"type": "boolean",
"description": "True when the price is older than the current price list"
},
"fitsModels": {
"type": "array",
"items": {
"type": "string"
},
"description": "Machine models the part fits"
},
"onHand": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Stock on hand; changes only through stock movements"
},
"reorderPoint": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"reorderQuantity": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"isLow": {
"type": "boolean",
"description": "True when on hand is at or below the reorder point"
},
"binLocation": {
"type": [
"string",
"null"
]
},
"recommendedSpare": {
"type": "boolean",
"description": "Recommended to keep on the customer's shelf"
},
"active": {
"type": "boolean"
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "UTC timestamp, ISO 8601 with Z"
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "UTC timestamp, ISO 8601 with Z"
}
},
"required": [
"id",
"partNumber",
"description",
"category",
"unit",
"priceCents",
"priceListDate",
"isStale",
"fitsModels",
"onHand",
"reorderPoint",
"reorderQuantity",
"isLow",
"binLocation",
"recommendedSpare",
"active",
"createdAt",
"updatedAt"
],
"additionalProperties": false
}
},
"totalCents": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Amount in integer US cents (zero or more)"
}
},
"required": [
"model",
"items",
"totalCents"
],
"additionalProperties": false
}
}
parts.deactivate
Retire a part
Mark a part inactive so it no longer appears in searches or on new quotes. History is kept. Pass active true to bring it back.
Input (object)
| Field | Type | Description |
|---|---|---|
idrequired | string | Record id (UUID)min length 1, max length 64 |
active | boolean | default false |
Output (object)
| Field | Type | Description |
|---|---|---|
partrequired | object | |
idrequired | string | Record id (UUID)min length 1, max length 64 |
partNumberrequired | string | |
descriptionrequired | string | |
categoryrequired | string | null | |
unitrequired | string | Unit of measure, for example each, ft, set |
priceCentsrequired | integer | Amount in integer US cents (zero or more)min 0, max 9007199254740991 |
priceListDaterequired | string (date) | Date of the price list this price comes from |
isStalerequired | boolean | True when the price is older than the current price list |
fitsModelsrequired | string[] | Machine models the part fits |
onHandrequired | integer | Stock on hand; changes only through stock movementsmin -9007199254740991, max 9007199254740991 |
reorderPointrequired | integer | min 0, max 9007199254740991 |
reorderQuantityrequired | integer | min 0, max 9007199254740991 |
isLowrequired | boolean | True when on hand is at or below the reorder point |
binLocationrequired | string | null | |
recommendedSparerequired | boolean | Recommended to keep on the customer's shelf |
activerequired | boolean | |
createdAtrequired | string (date-time) | UTC timestamp, ISO 8601 with Z |
updatedAtrequired | string (date-time) | UTC timestamp, ISO 8601 with Z |
Example request
curl https://api.cemco.app/v1/ops/parts.deactivate \
-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)"
},
"active": {
"default": false,
"type": "boolean"
}
},
"required": [
"id"
]
},
"output": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"part": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "Record id (UUID)"
},
"partNumber": {
"type": "string"
},
"description": {
"type": "string"
},
"category": {
"type": [
"string",
"null"
]
},
"unit": {
"type": "string",
"description": "Unit of measure, for example each, ft, set"
},
"priceCents": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Amount in integer US cents (zero or more)"
},
"priceListDate": {
"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 of the price list this price comes from"
},
"isStale": {
"type": "boolean",
"description": "True when the price is older than the current price list"
},
"fitsModels": {
"type": "array",
"items": {
"type": "string"
},
"description": "Machine models the part fits"
},
"onHand": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Stock on hand; changes only through stock movements"
},
"reorderPoint": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"reorderQuantity": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"isLow": {
"type": "boolean",
"description": "True when on hand is at or below the reorder point"
},
"binLocation": {
"type": [
"string",
"null"
]
},
"recommendedSpare": {
"type": "boolean",
"description": "Recommended to keep on the customer's shelf"
},
"active": {
"type": "boolean"
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "UTC timestamp, ISO 8601 with Z"
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "UTC timestamp, ISO 8601 with Z"
}
},
"required": [
"id",
"partNumber",
"description",
"category",
"unit",
"priceCents",
"priceListDate",
"isStale",
"fitsModels",
"onHand",
"reorderPoint",
"reorderQuantity",
"isLow",
"binLocation",
"recommendedSpare",
"active",
"createdAt",
"updatedAt"
],
"additionalProperties": false
}
},
"required": [
"part"
],
"additionalProperties": false
}
}