Attribute properties
Contents
- 1 Contents
- 2 Information
- 3 Scenarios
- 4 Usage
- 4.1 URL
- 4.2 Request sample
- 5 Fields
- 6 Attribute properties translations
- 7 Usage
- 7.1 URL
- 7.2 Request sample
Information
For every attribute first an attribute property has to be created. Examples of attribute properties are: Colour / Material / Size etc.
Scenarios
Usage
URL
PUT /api/origin/{origin_code}/attributeproperty/{key}/
POST /api/origin/{origin_code}/attributeproperty
A put also results in creation of a new attribute property when the import key does not exist for this origin.
Request sample
{
"key": "colour",
"name": "Kleur",
"input_validation": "list",
"layered_navigation": true,
"sequence": 10,
"sort_mode": "seq",
"searchable": true,
"value_required": false,
"visible": true,
"hide_in_filters": false,
"duplicate_values": true,
"product_detail_filter": true,
"unique_search": false,
"origin": "CLOUDSUITE"
}
Fields
Field | Mandatory | Description | Remarks |
---|---|---|---|
key | yes | import key of the attribute property | must be unique for all attribute properties |
name | yes | name of the property | will be displayed at the webshop |
input_validation | yes | “list”, “dec” or “none” | list | a fixed list of values for this property should be added via the attributelist endpoint |
uom | no |
|
|
group | no | Import key of the attributegroup this property belongs to | Only required when attributegroups are used |
layered_navigation | no | true or false | Only possible combined with input_validation “list” or “dec” |
list_attributes | no | array of the import keys of the list values | Only possible combined with input_validation “list” |
description | no |
|
|
sequence | no |
| Combined with “sort_mode” = “seq”. When this is set the attributes are displayed in chronological order based on the sequence id’s set |
sort_mode | no | “id”, “seq”, “count” or “name” | id | none in the Cloudsuite admin. With this option the list values under this property are displayed based on the database id of the values with Cloudsuite. So first created is first shown in the list of attribute values. seq | with this system the list values under this property are displayed based on the sequence as set via the field “sequence” in the attributelist call count | num found in the Cloudsuite admin name | with this option the attributes are displayed in alphabetical order when not filled the sort mode “id” is applied |
searchable | no | true or false | when true the value of this attribute is searchable via the full text search |
value_required | no | true or false | when true a value of this attribute is required for all products |
visible | no | true or false | when true the value of this attribute is visible as product information at the product detail page |
hide_in_filters | no | true or false | when true the value of this attribute is hidden in the faceted search filters. |
duplicate_values | no | true or false | when true it is possible to add multiple attribute list values of the same attribute property to the same product. |
product-details_filter | no | true or false | field is called “filter variants” in the Cloudsuite admin. |
unique_search | no | true or false | when true the search result will combine different values (for instance sizes) within a variant as 1 product |
origin | yes |
|
|
Attribute properties translations
This translation can only be done if the property exists.
A language has to be activated in the Cloudsuite admin to be able to update this language via the API.
When a language field is not filled the default language of the shop is shown.
Usage
URL
POST /api/origin/{origin_code}/attributeproperty/{key}/translations/
Request sample
{
"name": [
{
"lang": "nl_NL",
"value": "dutch name of the property"
},
{
"lang": "de_DE",
"value": "german name of the property"
},
{
"lang": "en_US",
"value": "english name of the property"
},
{
"lang": "es_ES",
"value": "spanish name of the property"
},
{
"lang": "fr_FR",
"value": "french name of the property"
}],
"description": [
{
"lang": "nl_NL",
"value": "dutch description of the property"
},
{
"lang": "de_DE",
"value": "german description of the property"
},
{
"lang": "en_US",
"value": "english description of the property"
},
{
"lang": "es_ES",
"value": "spanish description of the property"
},
{
"lang": "fr_FR",
"value": "french description of the property"
}],
}
Related content
© 2024 CloudSuite BV, All rights reserved