{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/salesforce-commerce-cloud/json-schema/salesforce-commerce-cloud-category-schema.json",
  "title": "Category",
  "description": "Document representing a category.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/salesforce-commerce-cloud-catalogs-api-openapi.yml#/components/schemas/Category",
  "type": "object",
  "properties": {
    "catalogId": {
      "allOf": [
        {
          "$ref": "#/$defs/CatalogId"
        }
      ],
      "description": "The ID of the catalog that contains it."
    },
    "categories": {
      "items": {
        "$ref": "#/$defs/Category"
      },
      "type": "array",
      "description": "The array of subcategories for the category."
    },
    "creationDate": {
      "type": "string",
      "description": "Returns the value of attribute 'creationDate'. It is read only.",
      "format": "date-time",
      "maxLength": 30
    },
    "description": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The localized description of the category."
    },
    "id": {
      "allOf": [
        {
          "$ref": "#/$defs/CategoryId"
        }
      ],
      "description": "The ID of the category."
    },
    "image": {
      "maxLength": 256,
      "minLength": 1,
      "type": "string",
      "description": "The name of the category image. The URL to the image is computed."
    },
    "lastModified": {
      "type": "string",
      "description": "Returns the value of attribute 'lastModified'. It is read only.",
      "format": "date-time",
      "maxLength": 30
    },
    "name": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The localized name of the category."
    },
    "online": {
      "type": "boolean",
      "description": "The online status of the category determines if it is visible in the storefront. Defaults to false if not specified on creation."
    },
    "pageDescription": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The localized page description of the category."
    },
    "pageKeywords": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The localized page keywords for the category."
    },
    "pageTitle": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The localized page title of the category."
    },
    "parentCategoryId": {
      "maxLength": 256,
      "minLength": 1,
      "type": "string",
      "description": "The ID of the parent category. Defaults to root if not specified on creation."
    },
    "paths": {
      "items": {
        "$ref": "#/$defs/PathRecord"
      },
      "type": "array",
      "description": "The path record."
    },
    "position": {
      "type": "number",
      "description": "The position of the category determines the display order in the storefront.",
      "format": "double"
    },
    "sortingRules": {
      "items": {
        "$ref": "#/$defs/SortingRule"
      },
      "type": "array",
      "description": "The category sorting rules."
    },
    "thumbnail": {
      "maxLength": 256,
      "minLength": 1,
      "type": "string",
      "description": "The name of the category thumbnail. The URL to the thumbnail is computed."
    }
  },
  "additionalProperties": {
    "title": "Additional Property Support",
    "description": "This type supports additional properties passed along with the defined properties of this API.\nTo indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`.\nThe type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix."
  },
  "required": [
    "id"
  ],
  "$defs": {
    "CatalogId": {
      "maxLength": 256,
      "minLength": 1,
      "type": "string",
      "description": "The ID of the catalog."
    },
    "Category": {
      "type": "object",
      "properties": {
        "catalogId": {
          "allOf": [
            {
              "$ref": "#/$defs/CatalogId"
            }
          ],
          "description": "The ID of the catalog that contains it."
        },
        "categories": {
          "items": {
            "$ref": "#/$defs/Category"
          },
          "type": "array",
          "description": "The array of subcategories for the category."
        },
        "creationDate": {
          "type": "string",
          "description": "Returns the value of attribute 'creationDate'. It is read only.",
          "format": "date-time",
          "maxLength": 30
        },
        "description": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The localized description of the category."
        },
        "id": {
          "allOf": [
            {
              "$ref": "#/$defs/CategoryId"
            }
          ],
          "description": "The ID of the category."
        },
        "image": {
          "maxLength": 256,
          "minLength": 1,
          "type": "string",
          "description": "The name of the category image. The URL to the image is computed."
        },
        "lastModified": {
          "type": "string",
          "description": "Returns the value of attribute 'lastModified'. It is read only.",
          "format": "date-time",
          "maxLength": 30
        },
        "name": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The localized name of the category."
        },
        "online": {
          "type": "boolean",
          "description": "The online status of the category determines if it is visible in the storefront. Defaults to false if not specified on creation."
        },
        "pageDescription": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The localized page description of the category."
        },
        "pageKeywords": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The localized page keywords for the category."
        },
        "pageTitle": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The localized page title of the category."
        },
        "parentCategoryId": {
          "maxLength": 256,
          "minLength": 1,
          "type": "string",
          "description": "The ID of the parent category. Defaults to root if not specified on creation."
        },
        "paths": {
          "items": {
            "$ref": "#/$defs/PathRecord"
          },
          "type": "array",
          "description": "The path record."
        },
        "position": {
          "type": "number",
          "description": "The position of the category determines the display order in the storefront.",
          "format": "double"
        },
        "sortingRules": {
          "items": {
            "$ref": "#/$defs/SortingRule"
          },
          "type": "array",
          "description": "The category sorting rules."
        },
        "thumbnail": {
          "maxLength": 256,
          "minLength": 1,
          "type": "string",
          "description": "The name of the category thumbnail. The URL to the thumbnail is computed."
        }
      },
      "description": "Document representing a category.",
      "additionalProperties": {
        "title": "Additional Property Support",
        "description": "This type supports additional properties passed along with the defined properties of this API.\nTo indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`.\nThe type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix."
      },
      "required": [
        "id"
      ]
    },
    "CategoryId": {
      "maxLength": 256,
      "minLength": 1,
      "type": "string",
      "description": "The ID of the category."
    },
    "PathRecord": {
      "type": "object",
      "properties": {
        "id": {
          "allOf": [
            {
              "$ref": "#/$defs/CategoryId"
            }
          ],
          "description": "The ID of the category path."
        },
        "name": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The name of the category path."
        }
      },
      "description": "Document representing most basic info (ID and name) of a category or catalog.",
      "additionalProperties": {
        "title": "Additional Property Support",
        "description": "This type supports additional properties passed along with the defined properties of this API.\nTo indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`.\nThe type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix."
      }
    },
    "SiteId": {
      "minLength": 1,
      "maxLength": 32,
      "description": "The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites",
      "type": "string"
    },
    "SortingRule": {
      "type": "object",
      "properties": {
        "creationDate": {
          "type": "string",
          "description": "The creation date, read only.",
          "format": "date-time",
          "maxLength": 30
        },
        "description": {
          "type": "string",
          "maxLength": 4000,
          "description": "The description of the product sorting rule."
        },
        "id": {
          "description": "The ID of the product sorting rule.",
          "type": "string",
          "maxLength": 256
        },
        "productSortingRuleSteps": {
          "items": {
            "$ref": "#/$defs/SortingRuleStep"
          },
          "type": "array",
          "description": "The steps involved in sorting by this rule."
        },
        "ruleContext": {
          "type": "string",
          "description": "The context of the rule, either site or global.",
          "enum": [
            "site",
            "global"
          ]
        },
        "site": {
          "$ref": "#/$defs/SiteId"
        }
      },
      "description": "Document representing a product sorting rule.",
      "additionalProperties": {
        "title": "Additional Property Support",
        "description": "This type supports additional properties passed along with the defined properties of this API.\nTo indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`.\nThe type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix."
      }
    },
    "SortingRuleStep": {
      "type": "object",
      "properties": {
        "attributeId": {
          "type": "string",
          "maxLength": 256,
          "description": "The ID for sorting attribute."
        },
        "direction": {
          "type": "string",
          "description": "The direction of the sorting attribute.",
          "enum": [
            "asc",
            "desc"
          ]
        },
        "isSystem": {
          "type": "boolean",
          "description": "Whether or not the attribute is a system attribute."
        },
        "position": {
          "type": "integer",
          "description": "The position of product sorting rule step.",
          "format": "int32"
        },
        "textRelevanceIncluded": {
          "type": "boolean",
          "description": "The text relevance included."
        },
        "typeId": {
          "type": "string",
          "maxLength": 256,
          "description": "The sorting type for sorting attribute."
        }
      },
      "description": "Document representing a product sorting rule step.",
      "additionalProperties": {
        "title": "Additional Property Support",
        "description": "This type supports additional properties passed along with the defined properties of this API.\nTo indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`.\nThe type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix."
      }
    }
  }
}