Code | Description |
---|---|
401 | Unauthorized. Include a WWW-Authenticate header field containing a challenge applicable to the requested resource. |
403 | Forbidden. The request was a valid request, but the server is refusing to respond to it. 403 error semantically means "unauthorized", i.e. the user does not have the necessary permissions for the resource. |
404 | Not Found. The requested resource could not be found. |
422 | Unprocessable Entity. The request was well-formed but was unable to be followed due to semantic errors. |
500 | Internal Server Error. An unexpected condition was encountered. |
request: { "attribute_definition": { "name": "Test updated", "code": "test", "base_type": "string" } } response: { "id": 8, "base_type": "string", "name": "Test updated", "select_options": null, "code": "test", "product_levels": [] }
Param name | Description |
---|---|
attribute_definition required |
Validations:
|
attribute_definition[name] optional |
Name of the attribute Validations:
|
attribute_definition[code] optional |
Unique identifier for the attribute Validations:
|
attribute_definition[base_type] optional |
Data type of the attribute Validations:
|
attribute_definition[description] optional , nil allowed |
Description of the attribute Validations:
|
attribute_definition[min_length] optional , nil allowed |
Minimum length Validations:
|
attribute_definition[max_length] optional , nil allowed |
Maximum length Validations:
|
attribute_definition[mandatory] optional , nil allowed |
If this field is true, the product must have non-blank value for this attribute Validations:
|
attribute_definition[completeness] optional , nil allowed |
If this field is true, the product use the attribute for completeness check Validations:
|
attribute_definition[pattern] optional , nil allowed |
Ruby regular expression syntaxed string to enforce the format of the value Validations:
|
attribute_definition[datetime_from] optional , nil allowed |
Date range lower bound restriction for datetime attribute Validations:
|
attribute_definition[datetime_to] optional , nil allowed |
Date range upper bound restriction for datetime attribute Validations:
|
attribute_definition[select_options] optional , nil allowed |
Select options for ‘single_select’ and ‘multi_select’. Must be provided if ‘base_type’ is ‘single_select’ or ‘multi_select’ Validations:
|
attribute_definition[product_level_ids] optional , nil allowed |
List of product level IDs that the attribute belongs to. Do not provide if ‘product_levels’ is provided Validations:
|
attribute_definition[product_levels] optional |
List of product levels that the attribute belongs to. Do not provide if ‘product_level_ids’ is provided Validations:
|
attribute_definition[product_levels][name] required |
Name of the product level Validations:
|
attribute_definition[product_levels][attribute_set_name] required |
Name of the attribute set that the product level belongs to Validations:
|
attribute_definition[option_values] optional |
List of option values that apply to this attribute definition. Validations:
|
attribute_definition[option_values][name] required |
Option value Validations:
|
attribute_definition[option_values][code] required |
Option value code Validations:
|
attribute_definition[option_values][position] optional |
Position of the option value. Warning: Drag and drop sorting from UI might change the position you have set. Validations:
|
attribute_definition[npc_product_class_ids] optional , nil allowed |
List of NPC product class IDs that allowed. Only applied for base type single_npc_association and multi_npc_association. Validations:
|
attribute_definition[npc_product_class_names] optional , nil allowed |
List of NPC product class Names that allowed. Only applied for base type single_npc_association and multi_npc_association. Validations:
|
attribute_definition[npc_product_class_mode] optional , nil allowed |
Update mode for NPC product class. Default is reset. Validations:
|
attribute_definition[data_quality_calculation] optional , nil allowed |
If this field is true, the product use the attribute for the data quality calculation. Validations:
|