Skip to main content

Custom Field Definitions

Tenant catalog of user-defined custom fields (which fields exist per feature, their type, validation and presentation). Values travel in each entity's customFields list.

πŸ“„οΈ List custom field definitions

Returns a paginated list of custom field definitions with envelope `{data, totalCount, skip, limit, hasMore}`. Optional `featureType` filter: JSON-backed (customers, optometry-exams, audiology-exams, contactology-fittings, contact-lens-exams) or EAV-backed bridge (product-models, product-variants, manufacturing-custom-fields; scoped to the caller's companies). Disabled definitions are hidden unless `includeDisabled=true`. Fixed ordering: featureType, displayOrder, apiName.

πŸ“„οΈ Create custom field definition

Creates a new custom field definition for the given `featureType`. The `apiName` must be unique within the featureType. For `dataType=ENUM` the `options` array is accepted as an optional creation seed (each label becomes an option row); afterwards options are managed through the paginated `/options` sub-resource. EAV-backed featureTypes (product-models, product-variants, manufacturing-custom-fields) accept dataType COLOR, an optional `companyId` (defaults to the caller's current company) and store into ges_customfield until the ADR-003 Fase 3 migration. Business logic runs in the legacy WAR via the internal commands gateway.