Skip to main content
records

Update Company Field Definition

Update one definition of this company, addressed by field_id and entity_type. Superadmin only.

PUT
/api/records/{company_name}/field-definitions/{field_id}

Archived definitions are reachable, so archived: false unarchives one. A company path never reaches a global definition or another company's; an unknown company, or an unknown or malformed field_id, answers 404. type is required and must equal the stored type (else 409 field_type_mismatch, before the definition is written). Absent keys stay unchanged; null clears regex and label; clients then name the field by its translation key if it has one, else by its id. An explicit null on any other attribute answers 422 null_not_allowed. field_id, entity_type, owner_name, storage and column_key cannot change. options carries the whole list: every stored key stays (422 option_missing), keys may be added, labels and order may change, archived toggles; source_reference_id is read-only.

422 types: editable_by_unsupported, group_unknown (for machines the group is one of machine, contact, additional_info, for routines routine), label_source_missing, regex_invalid, null_not_allowed, option_key_duplicate, option_missing, required_unsupported_entity. A stray or frozen key answers extra_forbidden; a label whose languages are all auto-translated and hold text answers value_error. The body of a 409 is {"detail": <FieldDefinitionConflict>}; definition_unreadable names a stored row this build cannot read.

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

company_namestringrequired
field_idstringrequired
entity_typeenum<string>queryrequired
Available options: machine, routine

Body

application/json

Response

application/json

Successful Response