meta.json
The meta.json file must adhere to the following guidelines:
- All categories and the meta data for the attributes must be provided in a file named meta.json
- UTF-8 encoded
- Only printable characters, i.e. no control characters
- All category_id values must start with a lowercase letter
-
The category_id values can only contain lowercase alphanumeric characters (a-z and 0-9)
- The category_id values must never contain hyphens '-' or underscores '_'
- The attribute_id values can only contain lowercase alphanumeric and underscore characters (a-z, 0-9 and _)
- The best practice is to set the top-level category_id value as 'catalog01'
- The top-level category is always a single category
|
JSONPath |
Details |
|---|---|
$.meta.attributes |
Collection of meta attributes. |
$.meta.attributes[].attribute_id |
Attribute identifier. Lowercase alphanumeric and underscore characters only (a-z, 0-9 and _). Whitespace, hypens, quotation marks etc. are not allowed. |
$.meta.attributes[].type |
Attribute type. |
$.meta.attributes[].names |
Collection of attributes names. |
$.meta.attributes[].names[].locale |
Specified locale for the attribute name (i18n localisation, e.g. en_GB or fr_FR). |
$.meta.attributes[].names[].name |
Localised attribute name. |
$.meta.attributes[?(@.attribute_id=='categories')].values
|
Collection of all category trees. |
$.meta.attributes[?(@.attribute_id=='categories')].values[].category_id
|
Unique identifier of the category. A category_id should only ever contain lowercase alphanumeric characters only and should not contain underscores '_'. Whitespace, hypens, quotation marks, etc. are not allowed. |
$.meta.attributes[?(@.attribute_id=='categories')].values[].names
|
Collection of category names in different locales. |
$.meta.attributes[?(@.attribute_id=='categories')].values[].names[].locale
|
Locale for category name (i18n localisation, e.g. en_GB or fr_FR). |
$.meta.attributes[?(@.attribute_id=='categories')].values[].names[].value
|
Category name in this particular locale. |
$.meta.attributes[?(@.attribute_id=='categories')].values[].children
|
Collection of child categories with the same structure. |
$.meta.attributes[?(@.attribute_id=='categories')].values[].children[].category_id
|
Child category ID value. A category_id should only ever contain lowercase alphanumeric characters only and should not contain underscores '_'. Whitespace, hypens, quotation marks, etc. are not allowed. |
$.meta.attributes[?(@.attribute_id=='categories')].values[].children[].names
|
Collection of Child category names in different locales. |
$.meta.attributes[?(@.attribute_id=='categories')].values[].children[].names[].locale
|
Specifies locale for the Child category name (i18n localisation, e.g. en_GB or fr_FR). |
$.meta.attributes[?(@.attribute_id=='categories')].values[].children[].names[].value
|
Localised Child category name value. |
Example
A single universe (catalog01) called 'Store' with one locale (en_GB)
{
"meta": {
"attributes": [
{
"attribute_id": "categories",
"type": "hierarchical",
"values": [
{
"category_id": "catalog01",
"children": [
{
"category_id": "women",
"children": [
{
"category_id": "shoes",
"names": [
{
"locale": "en_GB",
"name": "Shoes"
}
]
}
],
"names": [
{
"locale": "en_GB",
"name": "Women"
}
]
},
{
"category_id": "electricals",
"children": [],
"names": [
{
"locale": "en_GB",
"name": "Electricals"
}
]
}
],
"names": [
{
"locale": "en_GB",
"name": "Store"
}
]
}
]
},
{
"attribute_id": "_imageurl",
"names": [
{
"locale": "en_GB",
"name": "Image URL"
}
],
"type": "asset"
},
{
"attribute_id": "_thumburl",
"names": [
{
"locale": "en_GB",
"name": "Thumb URL"
}
],
"type": "asset"
},
{
"attribute_id": "name",
"names": [
{
"locale": "en_GB",
"name": "Name"
}
],
"type": "text"
},
{
"attribute_id": "colour",
"names": [
{
"locale": "en_GB",
"name": "Colour"
}
],
"type": "set"
}
]
}
}
|
Comments
0 comments
Please sign in to leave a comment.