{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/realask-net/json-schema/realask-net-quote-request-schema.json",
  "title": "QuoteRequest",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/realask-net-openapi.json#/components/schemas/QuoteRequest",
  "type": "object",
  "properties": {
    "request": {
      "type": "string",
      "minLength": 8,
      "maxLength": 2000
    },
    "location": {
      "type": "object",
      "properties": {
        "postal_code": {
          "type": "string",
          "minLength": 3,
          "maxLength": 12
        },
        "city": {
          "type": "string",
          "maxLength": 80
        },
        "region": {
          "type": "string",
          "maxLength": 40
        },
        "country": {
          "default": "US",
          "type": "string",
          "minLength": 2,
          "maxLength": 2
        },
        "lat": {
          "type": "number",
          "minimum": -90,
          "maximum": 90
        },
        "lng": {
          "type": "number",
          "minimum": -180,
          "maximum": 180
        },
        "radius_miles": {
          "type": "number",
          "minimum": 1,
          "maximum": 50
        }
      },
      "required": [
        "country"
      ],
      "additionalProperties": false
    },
    "limits": {
      "default": {
        "max_businesses": 5,
        "deadline_seconds": 600,
        "max_call_attempts_per_target": 1
      },
      "type": "object",
      "properties": {
        "max_businesses": {
          "default": 5,
          "type": "integer",
          "minimum": 1,
          "maximum": 5
        },
        "deadline_seconds": {
          "default": 600,
          "type": "integer",
          "minimum": 60,
          "maximum": 600
        },
        "max_call_attempts_per_target": {
          "default": 1,
          "type": "integer",
          "minimum": 1,
          "maximum": 2
        }
      },
      "required": [
        "max_businesses",
        "deadline_seconds",
        "max_call_attempts_per_target"
      ],
      "additionalProperties": false
    },
    "target": {
      "type": "object",
      "properties": {
        "business_name": {
          "type": "string",
          "maxLength": 120
        },
        "phone": {
          "type": "string",
          "maxLength": 24
        },
        "place_id": {
          "type": "string",
          "maxLength": 200
        }
      },
      "additionalProperties": false
    },
    "verification_mode": {
      "default": "auto",
      "type": "string",
      "enum": [
        "digital_fast",
        "live_verified",
        "auto"
      ]
    },
    "max_fact_age_seconds": {
      "type": "integer",
      "minimum": 60,
      "maximum": 7776000
    },
    "callback_url": {
      "type": "string",
      "maxLength": 2000,
      "format": "uri"
    },
    "priority": {
      "default": false,
      "type": "boolean"
    },
    "action": {
      "type": "object",
      "properties": {
        "action": {
          "type": "string",
          "enum": [
            "book",
            "hold",
            "request_quote",
            "cancel"
          ]
        },
        "what": {
          "type": "string",
          "minLength": 3,
          "maxLength": 500
        },
        "when": {
          "type": "string",
          "maxLength": 200
        },
        "quantity": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 999
        },
        "max_price_minor": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "currency": {
          "default": "USD",
          "type": "string",
          "minLength": 3,
          "maxLength": 3
        },
        "on_behalf_of": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "minLength": 2,
              "maxLength": 80
            },
            "callback_phone": {
              "type": "string",
              "minLength": 10,
              "maxLength": 24
            }
          },
          "required": [
            "name",
            "callback_phone"
          ],
          "additionalProperties": false
        },
        "reference": {
          "type": "string",
          "maxLength": 120
        },
        "notes": {
          "type": "string",
          "maxLength": 500
        },
        "authorized": {
          "type": "boolean",
          "const": true
        }
      },
      "required": [
        "action",
        "what",
        "currency",
        "on_behalf_of",
        "authorized"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "request",
    "location",
    "limits",
    "verification_mode",
    "priority"
  ],
  "additionalProperties": false
}