Create a category property
post
/content/management/api/v1.1/taxonomies/{id}/categoryProperties
with given payload.
Request
Supported Media Types
- application/json
Path Parameters
-
id: string
id of the taxonomy.
Query Parameters
-
links(optional): string
This parameter accepts a comma-separated list of link names. By default, this parameter gives all the links applicable. Possible values are: self, canonical, describedby
Header Parameters
-
X-Requested-With: string
A custom header to mitigate CSRF attacks.Allowed Values:
[ "XMLHttpRequest" ]
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:
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:
Example:
Example:
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:
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.
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
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
-
apiName(optional):
string
Read Only:
true
Minimum Length:1
Maximum Length:64
API Name of the property. -
createdBy(optional):
string
Read Only:
true
The user who created the property. -
createdDate(optional):
object date
date
-
defaultValues(optional):
array defaultValues
Default values for the property.
-
description(optional):
string
Minimum Length:
0
Maximum Length:128
Description of the property. -
displayName:
string
Minimum Length:
1
Maximum Length:128
Display name of the property. -
id(optional):
string
Read Only:
true
id of the property. It is required in the GET response and PATCH request whereas it will be ignored in the POST request. -
isPublishable(optional):
boolean
Is the property publishable.
-
isSystemManaged(optional):
boolean
Read Only:
true
Is the property managed by the system. -
links(optional):
array links
Links
-
settings:
object PropertySettingsBean
-
updatedBy(optional):
string
Read Only:
true
The user who last updated the property. -
updatedDate(optional):
object date
date
-
valueCount:
string
Allowed Values:
[ "single", "list" ]
Value count as a single or list.
Nested Schema : Link
Type:
object
Link of the resource.
Show Source
-
href(optional):
string
The target resource's URI. It could be template URI. It is a required property in the get response.
-
mediaType(optional):
string
Media type.
-
method(optional):
string
What HTTP method can be used to access the target resource.
-
profile(optional):
string
Link to the metadata that describes the target resource.
-
rel(optional):
string
Relation type. It is a required property in the get response.
-
templated(optional):
boolean
Whether the URI is a template.
Nested Schema : PropertySettingsCaasBean
Type:
Show Source
object
-
customValidators(optional):
array customValidators
Custom validators for the property value.
-
editor(optional):
object PropertySettingsEditorBean
-
valueCountRange(optional):
object PropertySettingsValueCountRangeBean
Nested Schema : PropertySettingsEditorBean
Type:
Show Source
object
-
name(optional):
string
Name of the editor.
-
options(optional):
object options
Additional Properties Allowed: additionalPropertiesOptions of the property value.
Nested Schema : PropertySettingsValueCountRangeBean
Type:
Show Source
object
-
max(optional):
integer(int32)
Minimum Value:
1
Maximum count of the property value. -
min(optional):
integer(int32)
Minimum Value:
0
Minimum count of the property value.
Nested Schema : PropertySettingsValidatorBean
Type:
Show Source
object
-
options(optional):
object options
Additional Properties Allowed: additionalPropertiesValidator details.
-
type(optional):
string
Allowed Values:
[ "length" ]
Type of the validator.
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
Response
Supported Media Types
- application/json
201 Response
Created.
Root Schema : CategoryPropertyDefinition
Type:
object
Category Property Definition
Show Source
-
apiName(optional):
string
Read Only:
true
Minimum Length:1
Maximum Length:64
API Name of the property. -
createdBy(optional):
string
Read Only:
true
The user who created the property. -
createdDate(optional):
object date
date
-
defaultValues(optional):
array defaultValues
Default values for the property.
-
description(optional):
string
Minimum Length:
0
Maximum Length:128
Description of the property. -
displayName:
string
Minimum Length:
1
Maximum Length:128
Display name of the property. -
id(optional):
string
Read Only:
true
id of the property. It is required in the GET response and PATCH request whereas it will be ignored in the POST request. -
isPublishable(optional):
boolean
Is the property publishable.
-
isSystemManaged(optional):
boolean
Read Only:
true
Is the property managed by the system. -
links(optional):
array links
Links
-
settings:
object PropertySettingsBean
-
updatedBy(optional):
string
Read Only:
true
The user who last updated the property. -
updatedDate(optional):
object date
date
-
valueCount:
string
Allowed Values:
[ "single", "list" ]
Value count as a single or list.
Nested Schema : Link
Type:
object
Link of the resource.
Show Source
-
href(optional):
string
The target resource's URI. It could be template URI. It is a required property in the get response.
-
mediaType(optional):
string
Media type.
-
method(optional):
string
What HTTP method can be used to access the target resource.
-
profile(optional):
string
Link to the metadata that describes the target resource.
-
rel(optional):
string
Relation type. It is a required property in the get response.
-
templated(optional):
boolean
Whether the URI is a template.
Nested Schema : PropertySettingsCaasBean
Type:
Show Source
object
-
customValidators(optional):
array customValidators
Custom validators for the property value.
-
editor(optional):
object PropertySettingsEditorBean
-
valueCountRange(optional):
object PropertySettingsValueCountRangeBean
Nested Schema : PropertySettingsEditorBean
Type:
Show Source
object
-
name(optional):
string
Name of the editor.
-
options(optional):
object options
Additional Properties Allowed: additionalPropertiesOptions of the property value.
Nested Schema : PropertySettingsValueCountRangeBean
Type:
Show Source
object
-
max(optional):
integer(int32)
Minimum Value:
1
Maximum count of the property value. -
min(optional):
integer(int32)
Minimum Value:
0
Minimum count of the property value.
Nested Schema : PropertySettingsValidatorBean
Type:
Show Source
object
-
options(optional):
object options
Additional Properties Allowed: additionalPropertiesValidator details.
-
type(optional):
string
Allowed Values:
[ "length" ]
Type of the validator.
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.