{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/daxoom-com/json-schema/daxoom-com-offerings-response-schema.json",
  "title": "OfferingsResponse",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/daxoom-com-openapi.yml#/components/schemas/OfferingsResponse",
  "type": "object",
  "properties": {
    "data": {
      "oneOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Offering"
          }
        },
        {
          "type": "object",
          "description": "Returned when a `q` or a `min_price`/`max_price` filter is set.",
          "properties": {
            "offerings": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Offering"
              }
            },
            "matched_items": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/MatchedItem"
              }
            }
          }
        }
      ]
    }
  },
  "$defs": {
    "MatchedItem": {
      "type": "object",
      "description": "One flattened item/variant that passed the offering filter.",
      "properties": {
        "offering": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "variant": {
          "type": "string",
          "description": "Variant label; omitted when the item has no variants."
        },
        "price": {
          "type": "number"
        },
        "currency": {
          "type": "string"
        },
        "price_label": {
          "type": "string"
        },
        "quantity": {
          "type": "number"
        },
        "measure_unit": {
          "type": "string"
        },
        "availability": {
          "type": "string"
        }
      }
    },
    "Offering": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "parent_offering_id": {
          "type": "integer",
          "description": "Parent group id for nested offerings; 0 when top-level."
        },
        "offering_type": {
          "type": "string",
          "enum": [
            "S",
            "M",
            "P",
            "K"
          ],
          "description": "`S` service, `M` menu section, `P` product, `K` package."
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OfferingItem"
          }
        }
      }
    },
    "OfferingItem": {
      "type": "object",
      "description": "Prices live on variants, not the item — a single-price item has one variant.",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "duration_minutes": {
          "type": "integer"
        },
        "dietary_flags": {
          "type": "string"
        },
        "availability": {
          "type": "string"
        },
        "variants": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OfferingVariant"
          }
        }
      }
    },
    "OfferingVariant": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string",
          "description": "Variant name (e.g. \"Small\", \"Standard\")."
        },
        "price": {
          "type": "number"
        },
        "currency": {
          "type": "string",
          "description": "ISO 4217 (e.g. USD)."
        },
        "price_label": {
          "type": "string",
          "description": "Free-text when there is no single number (e.g. \"from $40\", \"market price\")."
        },
        "quantity": {
          "type": "number"
        },
        "measure_unit": {
          "type": "string"
        },
        "sku": {
          "type": "string"
        }
      }
    }
  }
}