{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/valjeanspecialty/json-schema/valjeanspecialty-instant-quotes-result-schema.json",
  "title": "InstantQuotesResult",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/valjeanspecialty-instant-quotes-api-openapi.yml#/components/schemas/InstantQuotesResult",
  "oneOf": [
    {
      "$ref": "#/$defs/InstantQuotesPending"
    },
    {
      "$ref": "#/$defs/InstantQuotesDone"
    }
  ],
  "$defs": {
    "InstantQuotesDone": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "done"
        },
        "results": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "outcome": {
                "type": "string",
                "description": "\"blocked\" means a send rule stopped it (readiness, agency, approval rules).",
                "enum": [
                  "quoted",
                  "referred",
                  "declined",
                  "error",
                  "blocked"
                ]
              },
              "quote": {
                "type": "object",
                "properties": {
                  "quote_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "carrier": {
                    "type": "string"
                  },
                  "premium": {
                    "type": "number"
                  }
                },
                "required": [
                  "quote_id",
                  "carrier",
                  "premium"
                ],
                "description": "Only when the quote could be presented to you."
              },
              "note": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              }
            },
            "required": [
              "outcome"
            ]
          }
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "status",
        "results",
        "note"
      ],
      "description": "Valjean's setting is \"automatic\"."
    },
    "InstantQuotesPending": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "pending"
        },
        "status_text": {
          "type": "string"
        },
        "request_id": {
          "type": "string",
          "description": "Absent when you'd already asked and that ask is still pending.",
          "format": "uuid"
        },
        "markets_that_fit": {
          "type": "integer"
        }
      },
      "required": [
        "status",
        "status_text",
        "markets_that_fit"
      ],
      "description": "Valjean's setting is \"a broker approves each ask\"."
    }
  }
}