{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/horizonpulse-dev/json-schema/horizonpulse-dev-grocery-normalize-response-schema.json",
  "title": "GroceryNormalizeResponse",
  "description": "Inferred from a real response recorded from GET /api/demo/grocery-normalize at 2026-10-14T21:18Z UTC (trimmed). Fields may be added; clients should ignore unknown fields.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/horizonpulse-dev-openapi.json#/components/schemas/GroceryNormalizeResponse",
  "type": "object",
  "properties": {
    "source": {
      "type": "string"
    },
    "priced": {
      "type": "object",
      "properties": {
        "amountUsd": {
          "type": "string"
        },
        "amountAtomic": {
          "type": "string"
        },
        "asset": {
          "type": "string"
        },
        "network": {
          "type": "string"
        },
        "payTo": {
          "type": "string"
        }
      }
    },
    "asOf": {
      "type": "string"
    },
    "ok": {
      "type": "boolean"
    },
    "scale": {
      "type": "object",
      "properties": {
        "servings": {
          "type": "number"
        },
        "targetServings": {
          "type": "number"
        },
        "factor": {
          "type": "number"
        }
      }
    },
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "raw": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "canonicalId": {
            "type": "string"
          },
          "qty": {
            "type": "number"
          },
          "qtyMax": {
            "description": "Null in the recorded example; may hold a value."
          },
          "unit": {
            "type": "string"
          },
          "dimension": {
            "type": "string"
          },
          "metric": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "value": {
                "type": "number"
              },
              "unit": {
                "type": "string"
              }
            }
          },
          "category": {
            "type": "string"
          },
          "optional": {
            "type": "boolean"
          },
          "toTaste": {
            "type": "boolean"
          },
          "prepNote": {
            "description": "Null in the recorded example; may hold a value."
          },
          "statedPackSize": {
            "description": "Null in the recorded example; may hold a value."
          },
          "packHint": {
            "type": "object",
            "properties": {
              "typicalPack": {
                "type": "string"
              },
              "packsNeeded": {
                "type": [
                  "null",
                  "number"
                ]
              }
            }
          },
          "confidence": {
            "type": "string"
          }
        }
      }
    },
    "shoppingList": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "canonicalId": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "qty": {
            "type": "number"
          },
          "metric": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "value": {
                "type": "number"
              },
              "unit": {
                "type": "string"
              }
            }
          },
          "from": {
            "type": "array",
            "items": {
              "type": "number"
            }
          }
        }
      }
    },
    "unparsed": {
      "type": "array"
    },
    "methodology": {
      "type": "object",
      "properties": {
        "parser": {
          "type": "string"
        },
        "units": {
          "type": "string"
        },
        "packs": {
          "type": "string"
        },
        "scaling": {
          "type": "string"
        },
        "storage": {
          "type": "string"
        }
      }
    }
  }
}