{
  "name": "ch90_quote_compare",
  "title": "ch 90 · quote compare",
  "description": "Lines up 2–6 vendor quotes, checks the math and names the best landed deal. Inputs: What you need (parts and quantities) plus 2–6 quotes as pasted text. Optional deadline, max total and ship-to ZIP.. Outputs: Side-by-side table with landed totals, math errors, missing items, a recommended vendor, and clarification drafts held for approval..",
  "transport": {
    "kind": "http",
    "method": "POST",
    "url": "https://ch21.ai/api/public/channel/quote-compare/take",
    "headers": {
      "authorization": "Bearer <ch21 feed key>",
      "content-type": "application/json"
    }
  },
  "inputSchema": {
    "type": "object",
    "required": [
      "notes"
    ],
    "properties": {
      "notes": {
        "type": "string",
        "description": "what you want this channel to do, in plain english"
      },
      "prior": {
        "type": "object",
        "properties": {
          "brief": {
            "type": "string"
          },
          "output": {
            "type": "string"
          },
          "links": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "input": {
        "type": "object",
        "required": [
          "need",
          "quotes"
        ],
        "properties": {
          "need": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "required": [
                "part",
                "qty"
              ],
              "properties": {
                "part": {
                  "type": "string"
                },
                "qty": {
                  "type": "number"
                },
                "notes": {
                  "type": "string"
                }
              }
            }
          },
          "quotes": {
            "type": "array",
            "minItems": 2,
            "maxItems": 6,
            "items": {
              "type": "object",
              "required": [
                "vendor",
                "text"
              ],
              "properties": {
                "vendor": {
                  "type": "string"
                },
                "text": {
                  "type": "string",
                  "maxLength": 20000
                },
                "received_at": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "contact": {
                  "type": "string"
                }
              }
            }
          },
          "must_have": {
            "type": "object",
            "properties": {
              "deliver_by": {
                "type": "string"
              },
              "max_total": {
                "type": "number"
              },
              "ship_to_zip": {
                "type": "string"
              }
            }
          },
          "check_live_prices": {
            "type": "boolean",
            "default": false
          }
        }
      }
    }
  }
}