Printago API
PATCH
/v1/custom-metadata-definitions/{id}
Update a custom field definition
The key is immutable: it is both the jsonb key and the identity a routing rule stores, so renaming it would need a value rewrite plus AST rewrites. Label, unit, type and enum values are all editable.
Path Parameters
id
required
string
The custom field definition ID
Request Body
UpdateCustomMetadataDefinitionRequest
clearIncompatibleValuesoptional
boolean
defaultToNowoptional
boolean
defaultValueoptionalnullable
string | number | boolean
enumValuesoptionalnullable
string[]
labeloptional
string
unitoptionalnullable
string
valueTypeoptional
"string" | "number" | "boolean" | "enum" | "datetime"
stringnumberbooleanenumdatetime
Example Request
application/json
{
"enumValues": [
"string"
],
"label": "string",
"unit": "string",
"valueType": "string",
"defaultValue": "string",
"defaultToNow": true,
"clearIncompatibleValues": true
}
Response Schema
CustomMetadataDefinition
createdAtrequired
string
format: date-time
defaultToNowrequired
boolean
Date/time fields only, and the only default they can carry: the value is
the moment the record was created. A fixed date is almost never the right
default, and there is no way to express "now" as a literal.
defaultValuerequirednullable
string | number | boolean
Written into a record's `customMetadata` when that record is created, so
the field is on every new record of its type. This is the only way a
definition puts itself on a record: a field with no value is not listed,
because a row the record does not carry is a row that lies about it.
Never applied to records that already exist.
entityTyperequired
enum
orderskuprinterpartmaterialmaterialVariantprintJobpartBuildprofilematerialInstancemaintenanceItemcustomerorderItemfolder
enumValuesrequirednullable
string[]
idrequired
string
pattern: ^[a-z0-9]{24}$
keyrequired
string
labelrequired
string
storeIdrequired
string
pattern: ^[a-z0-9]{24}$
unitrequirednullable
string
updatedAtrequired
string
format: date-time
valueTyperequired
"string" | "number" | "boolean" | "enum" | "datetime"
stringnumberbooleanenumdatetime
Example Response
200 OK — application/json
{
"entityType": "order",
"key": "string",
"label": "string",
"valueType": "string",
"enumValues": [
"string"
],
"unit": "string",
"defaultValue": "string",
"defaultToNow": true,
"id": "string",
"storeId": "string",
"createdAt": "2025-01-15T12:00:00.000Z",
"updatedAt": "2025-01-15T12:00:00.000Z"
}