{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rutter/json-schema/rutter-update-variant-body-schema.json",
  "title": "UpdateVariantBody",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rutter-products-api-openapi.yml#/components/schemas/UpdateVariantBody",
  "type": "object",
  "properties": {
    "variant": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "price": {
          "type": "number"
        },
        "sku": {
          "type": "string"
        },
        "images": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "src": {
                "type": "string",
                "description": "The URL of the image."
              }
            },
            "required": [
              "src"
            ],
            "additionalProperties": false
          },
          "description": "Supported only for Wix, Etsy, Shopify."
        },
        "weight": {
          "type": "object",
          "properties": {
            "unit": {
              "type": "string",
              "enum": [
                "kg",
                "g",
                "oz",
                "lb",
                "gal"
              ]
            },
            "value": {
              "type": "number"
            }
          },
          "required": [
            "unit",
            "value"
          ],
          "additionalProperties": false
        },
        "option_values": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "value": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "value"
            ],
            "additionalProperties": false
          },
          "description": "Supported only for Squarespace, Wix, WooCommerce."
        },
        "inventory": {
          "type": "object",
          "properties": {
            "location_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ]
            },
            "total_count": {
              "type": "number"
            }
          },
          "additionalProperties": false
        }
      },
      "required": [
        "id"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "variant"
  ]
}