{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/lightspeed/main/json-schema/lightspeed-custom-field-definition-schema.json",
  "title": "Custom Field Definition",
  "description": "The type, name, and configuration of a custom field.",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lightspeed-workflows-api-openapi.yml#/components/schemas/CustomFieldDefinition",
  "properties": {
    "created_at": {
      "description": "The creation timestamp in UTC.",
      "format": "date-time",
      "readOnly": true,
      "type": "string"
    },
    "editable_in_ui": {
      "description": "Is this custom field be editable in the UI.",
      "type": "boolean"
    },
    "entity": {
      "description": "The type of entity.",
      "enum": [
        "sale",
        "line_item",
        "customer",
        "product"
      ],
      "type": "string"
    },
    "id": {
      "readOnly": true,
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "description": "The type of the value to be stored using this custom field.",
      "enum": [
        "string",
        "integer",
        "boolean",
        "date",
        "product_id",
        "qrcode",
        "string_array"
      ],
      "type": "string"
    },
    "visible_in_ui": {
      "description": "Is this custom field visible in the UI.",
      "type": "boolean"
    }
  },
  "type": "object"
}