Create custom field definition
POST/api/v2/custom-field-definitions
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.
Request
Responses
- 201
- 400
- 401
- 403
- 500
Custom field definition created
Validation error ÔÇö the request body or a query parameter failed constraint validation. The response payload includes a errors array with field-level details.
Missing or invalid JWT (Bearer token).
Authenticated user is missing the CREAR_CAMPOSPERSONALIZADOS permission
Unexpected server error. Includes legacy WAR failures that are not classified as 502 / 503 / 504.