Skip to content
v0.3

custom_field.define

Define a typed custom field for a product or cart level (merchant-owned).

  • Scope: custom_fields.write
  • System: no
  • Reachable from: POST /v1/commands/custom_field.define (tenant credential) · MCP tool custom_field.define · SDK client.call('custom_field.define', …)
  • Events: custom_field.updated
{
"properties": {
"facetable": {
"default": false,
"type": "boolean"
},
"key": {
"minLength": 1,
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": {
"type": "string"
},
"propertyNames": {
"type": "string"
},
"type": "object"
}
]
},
"options": {
"default": [],
"items": {
"properties": {
"key": {
"minLength": 1,
"type": "string"
},
"label": {
"type": "string"
}
},
"required": [
"key"
],
"type": "object"
},
"type": "array"
},
"owner_entity": {
"enum": [
"product",
"cart",
"cart_line",
"cart_customer",
"order",
"order_line",
"customer",
"category",
"store"
],
"type": "string"
},
"pii": {
"enum": [
"name",
"email",
"phone",
"address",
"postal_code",
"tax_id",
"other"
],
"type": "string"
},
"required": {
"default": false,
"type": "boolean"
},
"type": {
"enum": [
"text",
"number",
"boolean",
"select"
],
"type": "string"
}
},
"required": [
"owner_entity",
"key",
"type"
],
"type": "object"
}
{
"additionalProperties": false,
"properties": {
"definition_id": {
"type": "string"
}
},
"required": [
"definition_id"
],
"type": "object"
}

validation_failed (400) · unauthorized (401) · forbidden (403) · conflict (409) · internal (500)