{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/savanto-ai/json-schema/savanto-ai-product-input-schema.json",
  "title": "ProductInput",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/savanto-ai-api-openapi.json#/components/schemas/ProductInput",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "content": {
      "type": "string",
      "maxLength": 200000
    },
    "searchableText": {
      "type": "string",
      "maxLength": 200000
    },
    "excerpt": {
      "type": "string",
      "maxLength": 1000
    },
    "price": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "salePrice": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "regularPrice": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "onSale": {
      "type": "boolean"
    },
    "priceMin": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "priceMax": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "stockQuantity": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "stockStatus": {
      "type": "string",
      "enum": [
        "instock",
        "outofstock",
        "onbackorder"
      ]
    },
    "sku": {
      "type": "string",
      "maxLength": 100
    },
    "type": {
      "type": "string",
      "enum": [
        "simple",
        "variable",
        "grouped",
        "external"
      ]
    },
    "weight": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "dimensions": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "length": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0
        },
        "width": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0
        },
        "height": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0
        }
      }
    },
    "rating": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0,
      "maximum": 5
    },
    "reviewCount": {
      "type": "number",
      "minimum": 0
    },
    "categories": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "brands": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "image": {
      "type": [
        "string",
        "null"
      ]
    },
    "url": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "maxLength": 50
    },
    "visibility": {
      "type": "string",
      "maxLength": 50
    },
    "featured": {
      "type": "boolean"
    },
    "virtual": {
      "type": "boolean"
    },
    "downloadable": {
      "type": "boolean"
    },
    "attributes": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": "array",
        "items": {
          "type": "string",
          "maxLength": 500
        },
        "maxItems": 50
      }
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 1000
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          },
          {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 1000
            },
            "maxItems": 50
          }
        ]
      }
    },
    "source": {
      "type": "string",
      "maxLength": 50
    },
    "indexStatus": {
      "type": "string",
      "enum": [
        "active",
        "hidden",
        "disabled"
      ]
    }
  },
  "required": [
    "id",
    "name"
  ]
}