JSON Schema for Category Records
The current JSON Schema for Category records. You can use this schema to validate your data.
{
"title": "category",
"description": "Merchstack Category Schema",
"$id": "https://docs.merchstack.io/schemas/categorySchema.json",
"type": "object",
"properties": {
"importMetaData": {
"type": "object",
"properties": {
"importId": {
"type": "string"
},
"recordNum": {
"type": "integer"
},
"recordOf": {
"type": "integer"
},
"recordType": {
"type": "string",
"const": "category"
},
"operationType": {
"type": "string",
"enum": [
"create",
"update"
]
},
"formatVersion": {
"type": "string",
"enum": [
"1.0"
]
}
},
"required": [
"importId",
"recordNum",
"recordOf",
"recordType",
"operationType",
"formatVersion"
]
},
"assets": {
"type": "array",
"minItems": 1,
"items": {
"properties": {
"name": {
"type": "string"
},
"width": {
"type": "number"
},
"externalSystemAssetId": {
"type": "string"
},
"mimeType": {
"type": "string"
},
"source": {
"type": "string"
},
"type": {
"type": "string"
},
"focalPoint": {
"type": "object",
"properties": {
"x": {
"type": "integer"
},
"y": {
"type": "integer"
}
}
},
"height": {
"type": "integer"
}
}
}
},
"isRoot": {
"type": "boolean"
},
"customFields": {
"type": "object",
"properties": {
"key": {
"type": "string"
}
}
},
"translations": {
"type": "array",
"minItems": 1,
"items": {
"properties": {
"pageTitle": {
"type": "string"
},
"name": {
"type": "string"
},
"navName": {
"type": "string"
},
"description": {
"type": "string"
},
"pageDescription": {
"type": "string"
},
"languageCode": {
"type": "string",
"enum": [
"af",
"ak",
"am",
"ar",
"as",
"az",
"be",
"bg",
"bm",
"bn",
"bo",
"br",
"bs",
"ca",
"ce",
"co",
"cs",
"cu",
"cy",
"da",
"de",
"de_AT",
"de_CH",
"dz",
"ee",
"el",
"en",
"en_AU",
"en_CA",
"en_GB",
"en_IE",
"en_NZ",
"en_US",
"eo",
"es",
"es_ES",
"es_MX",
"et",
"eu",
"fa",
"fa_AF",
"ff",
"fi",
"fo",
"fr",
"fr_CA",
"fr_CH",
"fy",
"ga",
"gd",
"gl",
"gu",
"gv",
"ha",
"he",
"hi",
"hr",
"ht",
"hu",
"hy",
"ia",
"id",
"ig",
"ii",
"is",
"it",
"ja",
"jv",
"ka",
"ki",
"kk",
"kl",
"km",
"kn",
"ko",
"ks",
"ku",
"kw",
"ky",
"la",
"lb",
"lg",
"ln",
"lo",
"lt",
"lu",
"lv",
"mg",
"mi",
"mk",
"ml",
"mn",
"mr",
"ms",
"mt",
"my",
"nb",
"nd",
"ne",
"nl",
"nl_BE",
"nn",
"ny",
"om",
"or",
"os",
"pa",
"pl",
"ps",
"pt",
"pt_BR",
"pt_PT",
"qu",
"rm",
"rn",
"ro",
"ro_MD",
"ru",
"rw",
"sa",
"sd",
"se",
"sg",
"si",
"sk",
"sl",
"sm",
"sn",
"so",
"sq",
"sr",
"st",
"su",
"sv",
"sw",
"sw_CD",
"ta",
"te",
"tg",
"th",
"ti",
"tk",
"to",
"tr",
"tt",
"ug",
"uk",
"ur",
"uz",
"vi",
"vo",
"wo",
"xh",
"yi",
"yo",
"zh",
"zh_Hans",
"zh_Hant",
"zu"
]
},
"slug": {
"type": "string",
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
}
}
},
"required": [
"pageTitle",
"name",
"navName",
"description",
"pageDescription",
"languageCode",
"slug"
]
},
"tenantId": {
"type": "string"
},
"externalSystemId": {
"type": "string"
},
"assignmentMethod": {
"type": "string",
"enum": [
"Manual",
"Calculated"
]
},
"featuredAssetId": {
"type": "string"
},
"isPrivate": {
"type": "boolean"
},
"externalSystemParentId": {
"type": "string"
},
"storeId": {
"type": "string"
}
},
"required": [
"importMetaData",
"tenantId",
"storeId",
"externalSystemId",
"enabled",
"featuredExternalAssetId",
"isRoot",
"externalSystemParentId",
"translations",
"assets"
]
}