{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/marketsdk/json-schema/marketsdk-category-object-schema.json",
  "title": "CategoryObject",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/marketsdk-categories-api-openapi.yml#/components/schemas/CategoryObject",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "enum": [
        "category"
      ]
    },
    "id": {
      "type": "string"
    },
    "key": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "parent": {
      "type": [
        "string",
        "null"
      ]
    },
    "attribute_schema": {
      "$ref": "#/$defs/AttributeSchemaObject"
    },
    "fee": {
      "anyOf": [
        {
          "$ref": "#/$defs/CategoryFeeDto"
        },
        {
          "type": "null"
        }
      ]
    },
    "prohibited": {
      "type": "boolean",
      "description": "Listings in a prohibited category cannot be published."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "object",
    "id",
    "key",
    "name",
    "description",
    "parent",
    "attribute_schema",
    "fee",
    "prohibited",
    "created_at",
    "updated_at"
  ],
  "$defs": {
    "AttributeDefinitionObject": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "string",
            "number",
            "integer",
            "boolean",
            "enum"
          ]
        },
        "required": {
          "type": "boolean"
        },
        "options": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "min": {
          "type": "number"
        },
        "max": {
          "type": "number"
        },
        "max_length": {
          "type": "number"
        }
      },
      "required": [
        "key",
        "type"
      ]
    },
    "AttributeSchemaObject": {
      "type": "object",
      "properties": {
        "attributes": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "$ref": "#/$defs/AttributeDefinitionObject"
          }
        }
      },
      "required": [
        "attributes"
      ]
    },
    "CategoryFeeDto": {
      "type": "object",
      "properties": {
        "percent_bps": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "maximum": 10000,
          "description": "Basis points: 250 is 2.5 percent."
        },
        "fixed_amount": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "description": "Minor units, in the marketplace currency."
        }
      }
    }
  }
}