Create a category property

post

/content/management/api/v1.1/taxonomies/{id}/categoryProperties

with given payload.

Request

Supported Media Types
Path Parameters
Query Parameters
Header Parameters
Body ()
Creates a category property with the given information in the payload. The fields id, apiName, isSystemManaged, createdBy, createdDate, updatedBy, updatedDate and links will be ignored even if given in the payload.

The fields apiName and displayName are unique within the taxonomy and case-insensitive, i.e., user can not create a property with existing apiName or displayName in the same taxonomy even in a different case.

The field displayName will have all leading and trailing whitespace characters removed. Example:
  • displayName = " model year "
  • Result displayName = "model year"

apiName will be generated based on the value of displayName. Any non-alphanumeric characters in displayName will be removed. If resulting value is an empty string, timestamp (in format of 'yyyyMMddHHmmssSSS') will be used. If resulting value starts with a number, it will be prefixed with 'property'.

Example:
  • displayName = " model_year "
  • Result apiName = "modelYear"

Example:
  • displayName = "2022 models"
  • Result apiName = "property2022Models"

Example:
  • displayName = "??????"
  • Result apiName = "property20230101103022589"

The field isPublishable indicates whether the category property is publishable or not.

The field valueCount can accept the values single or list, and any other value is not allowed. If the value for valueCount is single, only one property value will be allowed per category. If the value for valueCount is list, more than one property value will be allowed per category, and the limit of values will be given by the settings.caas.valueCountRange field.

The field defaultValues accepts a comma-separated list of values, and these values are going to be applied by default if no value is provided for the category property when a category is created. If the value for valueCount is single, only one default value will be allowed. If the value for valueCount is list, more than one default value will be allowed, and the limit of default values will be given by the settings.caas.valueCountRange field.

The field settings.caas.valueCountRange defines the lower and upper limit of values allowed for the category property, where the field settings.caas.valueCountRange.min is the lower limit and the field settings.caas.valueCountRange.max is the upper limit.

The field settings.caas.editor indicates the editor that will be used to assign values to the category property. The field settings.caas.editor.name supports one of the following values:
  • Text box
  • Single-select menu
  • Multi-select menu
For Single-select or Multi-select menu it will be allowed to define menu options in the field settings.caas.editor.options

The field settings.caas.customValidators is a list of validations that will be applied to the values of the category property, where the field settings.caas.customValidators.type indicates the type of validation and the field settings.caas.customValidators.options indicates the specific rules that the validation should apply.
Root Schema : CategoryPropertyDefinition
Type: object
Category Property Definition
Show Source
Nested Schema : date
Type: object
date
Show Source
Nested Schema : defaultValues
Type: array
Default values for the property.
Show Source
Nested Schema : PropertySettingsBean
Type: object
Show Source
Nested Schema : PropertySettingsCaasBean
Type: object
Show Source
Nested Schema : customValidators
Type: array
Custom validators for the property value.
Show Source
Nested Schema : PropertySettingsEditorBean
Type: object
Show Source
Nested Schema : PropertySettingsValueCountRangeBean
Type: object
Show Source
Nested Schema : PropertySettingsValidatorBean
Type: object
Show Source
Nested Schema : options
Type: object
Additional Properties Allowed
Show Source
Validator details.
Nested Schema : additionalProperties
Type: object
Nested Schema : options
Type: object
Additional Properties Allowed
Show Source
Options of the property value.
Nested Schema : additionalProperties
Type: object
Back to Top

Response

Supported Media Types

201 Response

Created.
Body ()
Root Schema : CategoryPropertyDefinition
Type: object
Category Property Definition
Show Source
Nested Schema : date
Type: object
date
Show Source
Nested Schema : defaultValues
Type: array
Default values for the property.
Show Source
Nested Schema : PropertySettingsBean
Type: object
Show Source
Nested Schema : PropertySettingsCaasBean
Type: object
Show Source
Nested Schema : customValidators
Type: array
Custom validators for the property value.
Show Source
Nested Schema : PropertySettingsEditorBean
Type: object
Show Source
Nested Schema : PropertySettingsValueCountRangeBean
Type: object
Show Source
Nested Schema : PropertySettingsValidatorBean
Type: object
Show Source
Nested Schema : options
Type: object
Additional Properties Allowed
Show Source
Validator details.
Nested Schema : additionalProperties
Type: object
Nested Schema : options
Type: object
Additional Properties Allowed
Show Source
Options of the property value.
Nested Schema : additionalProperties
Type: object

400 Response

Bad request.

403 Response

Forbidden.

404 Response

Taxonomy not found. The requested resource not found.

409 Response

The requested resource operation is temporarily unavailable

500 Response

Internal server error.
Back to Top