{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/shopfashion-si/json-schema/shopfashion-si-bundle-schema.json",
  "title": "Bundle",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/shopfashion-si-openapi.json#/components/schemas/Bundle",
  "type": "object",
  "properties": {
    "bundle_id": {
      "type": "string"
    },
    "query_echo": {
      "type": "object"
    },
    "items": {
      "type": "array",
      "items": {
        "allOf": [
          {
            "$ref": "#/$defs/Item"
          },
          {
            "type": "object",
            "properties": {
              "slot": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "proposed",
                  "approved"
                ]
              },
              "alternates": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Item"
                }
              }
            }
          }
        ]
      }
    },
    "running_total": {
      "type": "number"
    },
    "budget": {
      "type": [
        "number",
        "null"
      ]
    },
    "within_budget": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "shop_the_whole_gift": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "shop_url": {
            "type": "string"
          }
        }
      }
    },
    "swaps": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "disclosure": {
      "type": "string"
    }
  },
  "$defs": {
    "Item": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "category": {
          "type": "string"
        },
        "why": {
          "type": "string"
        },
        "est_price": {
          "type": "number"
        },
        "est_price_range": {
          "type": "string"
        },
        "shop_url": {
          "type": "string"
        },
        "image_hint": {
          "type": "string"
        },
        "shop_options": {
          "type": "array",
          "description": "2-4 store options (Etsy plus retailers whose public search fits the category/size/price). Each url opens that store's search for the style; track_url is the same link via our anonymous click counter.",
          "items": {
            "type": "object",
            "properties": {
              "merchant_id": {
                "type": "string"
              },
              "merchant": {
                "type": "string"
              },
              "url": {
                "type": "string"
              },
              "track_url": {
                "type": "string"
              },
              "affiliate": {
                "type": "boolean"
              }
            }
          }
        }
      }
    }
  }
}