{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://benpageins.com/schemas/quote-request.v1.json",
  "title": "Commercial quote request - Ben Page Insurance (Idaho & Utah)",
  "description": "A quote request to Ben Page Insurance, an independent agency licensed in Idaho and Utah (mostly restaurants and contractors). Only contact_name, business_name, phone and needs are required, plus consent: true when sent as JSON. Every other field is optional; fields left out are fine. Never send Social Security numbers, bank or card numbers, passwords, driver's license numbers or full birth dates; those come later by phone. Who drives each vehicle can go in a document of kind vehicle_list, or come later by phone. POST as application/json or multipart/form-data to https://benpageins.com/api/quote-request with Accept: application/json. The 201 reply carries request_id, received_at, message, next_step, what_helps_next, not_covered_yet, contact_use and ignored_fields. Unknown keys are kept and listed in ignored_fields, never rejected. Sending does not start coverage, give a price or take payment.",
  "type": "object",
  "required": [
    "contact_name",
    "business_name",
    "phone",
    "needs",
    "consent"
  ],
  "additionalProperties": true,
  "properties": {
    "schema_version": {
      "const": "1"
    },
    "contact_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "The person Ben should ask for."
    },
    "business_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 150,
      "description": "The business name; a trade name is fine (the legal name has its own field)."
    },
    "phone": {
      "type": "string",
      "pattern": "^\\+?1?[\\s.-]?\\(?[2-9]\\d{2}\\)?[\\s.-]?\\d{3}[\\s.-]?\\d{4}$",
      "examples": [
        "208-555-0142"
      ],
      "description": "US phone that can take texts. Any call or text about this request goes to this number."
    },
    "needs": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "$ref": "#/$defs/line"
      },
      "description": "Insurance lines wanted. not_sure is a valid answer."
    },
    "email": {
      "type": "string",
      "format": "email",
      "maxLength": 200
    },
    "preferred_language": {
      "enum": [
        "en",
        "es"
      ],
      "default": "en"
    },
    "contact_role": {
      "enum": [
        "owner",
        "officer_or_partner",
        "manager",
        "bookkeeper",
        "other"
      ]
    },
    "best_time_to_call": {
      "enum": [
        "morning",
        "midday",
        "afternoon",
        "evening",
        "any"
      ]
    },
    "business_type": {
      "$ref": "#/$defs/business_type"
    },
    "business_type_other": {
      "type": "string",
      "maxLength": 120
    },
    "state": {
      "enum": [
        "ID",
        "UT",
        "other"
      ]
    },
    "state_other": {
      "type": "string",
      "pattern": "^[A-Z]{2}$"
    },
    "city": {
      "type": "string",
      "maxLength": 80
    },
    "submitted_by": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "kind"
      ],
      "properties": {
        "kind": {
          "enum": [
            "the_business",
            "ai_agent_for_the_business",
            "someone_else_for_the_business"
          ]
        },
        "agent_name": {
          "type": "string",
          "maxLength": 120,
          "description": "Name/vendor of the AI agent or person submitting."
        },
        "authorized_by_business": {
          "type": "boolean",
          "description": "The business asked for this quote request to be sent."
        }
      },
      "description": "Who sent this: the business, an AI agent acting for the business, or another person for it. Optional."
    },
    "needed_by": {
      "type": "string",
      "format": "date",
      "description": "Date coverage needs to start: the current renewal date or the opening day. A past date means the current policy has already ended."
    },
    "needed_asap": {
      "type": "boolean",
      "description": "True when current coverage ends within 7 days or already ended."
    },
    "anything_else": {
      "type": "string",
      "maxLength": 5000,
      "description": "Free text for context that does not fit a field."
    },
    "legal_name": {
      "type": "string",
      "maxLength": 150
    },
    "dba_names": {
      "type": "array",
      "maxItems": 5,
      "items": {
        "type": "string",
        "maxLength": 150
      }
    },
    "entity_type": {
      "enum": [
        "sole_proprietor",
        "single_member_llc",
        "multi_member_llc",
        "s_corp",
        "c_corp",
        "partnership",
        "nonprofit",
        "not_sure"
      ]
    },
    "fein": {
      "type": "string",
      "pattern": "^\\d{2}-?\\d{7}$",
      "description": "Federal EIN only. Never an SSN."
    },
    "mailing_address": {
      "$ref": "#/$defs/address"
    },
    "year_started": {
      "type": "integer",
      "minimum": 1850,
      "maximum": 2100
    },
    "owner_years_experience": {
      "type": "integer",
      "minimum": 0,
      "maximum": 80
    },
    "description_of_operations": {
      "type": "string",
      "maxLength": 1500
    },
    "naics_code": {
      "type": "string",
      "pattern": "^\\d{2,6}$"
    },
    "sic_code": {
      "type": "string",
      "pattern": "^\\d{4}$"
    },
    "website": {
      "type": "string",
      "format": "uri",
      "description": "The business website."
    },
    "social_url": {
      "type": "string",
      "format": "uri",
      "description": "A social media page for the business, or the website (the page's form sends the website here)."
    },
    "gross_sales_last_12_months": {
      "$ref": "#/$defs/dollars"
    },
    "gross_sales_next_12_months": {
      "$ref": "#/$defs/dollars"
    },
    "payroll_last_12_months": {
      "$ref": "#/$defs/dollars",
      "description": "Total payroll for the whole business, last 12 months. A rough number is fine. The split by type of work goes in wc_payroll_by_job or anything_else."
    },
    "payroll_next_12_months": {
      "$ref": "#/$defs/dollars",
      "description": "Expected total payroll, next 12 months. A rough guess is fine."
    },
    "subcontractor_cost_last_12_months": {
      "$ref": "#/$defs/dollars",
      "description": "Total paid to subcontractors, last 12 months. 0 when the business uses none."
    },
    "subcontractor_cost_next_12_months": {
      "$ref": "#/$defs/dollars",
      "description": "Expected total paid to subcontractors, next 12 months."
    },
    "employee_count_total": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10000,
      "description": "Total people working in the business, part-time included. Use this when the full-time/part-time split is unknown; leave the split blank rather than guess."
    },
    "location_count": {
      "type": "integer",
      "minimum": 0,
      "maximum": 500,
      "description": "How many locations the business works from (shops, restaurants, yards, offices). Addresses go in locations or anything_else."
    },
    "employee_count_full_time": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10000
    },
    "employee_count_part_time": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10000
    },
    "current_policies": {
      "type": "array",
      "maxItems": 12,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "line": {
            "$ref": "#/$defs/line"
          },
          "company": {
            "type": "string",
            "maxLength": 120
          },
          "expiration_date": {
            "type": "string",
            "format": "date"
          },
          "annual_premium": {
            "$ref": "#/$defs/dollars"
          }
        }
      },
      "description": "Current policies: which line, the insurance company's name, the date it ends, and the yearly cost."
    },
    "current_premium_total": {
      "$ref": "#/$defs/dollars"
    },
    "why_shopping": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "enum": [
          "price_increase",
          "non_renewed_or_cancelled",
          "new_business",
          "need_more_coverage",
          "contract_or_landlord_requires",
          "one_agent_for_everything",
          "other"
        ]
      }
    },
    "claims_last_5_years": {
      "enum": [
        "none",
        "yes",
        "not_sure"
      ]
    },
    "claims": {
      "type": "array",
      "maxItems": 20,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "date": {
            "type": "string",
            "pattern": "^\\d{4}(-\\d{2}){0,2}$"
          },
          "line": {
            "$ref": "#/$defs/line"
          },
          "what_happened": {
            "type": "string",
            "maxLength": 500
          },
          "amount_paid": {
            "$ref": "#/$defs/dollars"
          },
          "status": {
            "enum": [
              "open",
              "closed",
              "not_sure"
            ]
          }
        }
      }
    },
    "declined_or_cancelled_last_3_years": {
      "enum": [
        "no",
        "yes",
        "not_sure"
      ]
    },
    "declined_or_cancelled_reason": {
      "type": "string",
      "maxLength": 500
    },
    "contract_requirements": {
      "type": "string",
      "maxLength": 1000
    },
    "limits_wanted": {
      "enum": [
        "1m_2m",
        "2m_4m",
        "other",
        "not_sure"
      ]
    },
    "limits_wanted_other": {
      "type": "string",
      "maxLength": 120
    },
    "locations": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "address": {
            "$ref": "#/$defs/address"
          },
          "own_or_rent": {
            "enum": [
              "own",
              "rent"
            ]
          },
          "square_feet_occupied": {
            "type": "integer",
            "minimum": 0
          },
          "building_square_feet": {
            "type": "integer",
            "minimum": 0
          },
          "year_built": {
            "type": "integer",
            "minimum": 1800,
            "maximum": 2100
          },
          "construction_type": {
            "enum": [
              "frame",
              "joisted_masonry",
              "non_combustible",
              "masonry_non_combustible",
              "fire_resistive",
              "not_sure"
            ]
          },
          "stories": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "sprinklered": {
            "enum": [
              "yes",
              "no",
              "not_sure"
            ]
          },
          "roof_type": {
            "type": "string",
            "maxLength": 60
          },
          "roof_year": {
            "type": "integer",
            "minimum": 1900,
            "maximum": 2100
          },
          "updates": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "wiring": {
                "type": "integer"
              },
              "plumbing": {
                "type": "integer"
              },
              "heating": {
                "type": "integer"
              },
              "roof": {
                "type": "integer"
              }
            }
          },
          "alarm": {
            "enum": [
              "none",
              "local",
              "central_station",
              "not_sure"
            ]
          },
          "building_value": {
            "$ref": "#/$defs/dollars"
          },
          "contents_value": {
            "$ref": "#/$defs/dollars"
          },
          "tenant_improvements_value": {
            "$ref": "#/$defs/dollars"
          }
        }
      }
    },
    "tools_equipment_value": {
      "$ref": "#/$defs/dollars"
    },
    "tools_items_over_10k": {
      "type": "string",
      "maxLength": 1000
    },
    "business_income_needed": {
      "enum": [
        "yes",
        "no",
        "not_sure"
      ]
    },
    "wc_states": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "type": "string",
        "pattern": "^[A-Z]{2}$"
      }
    },
    "wc_payroll_by_job": {
      "type": "array",
      "maxItems": 20,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "job_description"
        ],
        "properties": {
          "job_description": {
            "type": "string",
            "maxLength": 200
          },
          "class_code": {
            "type": "string",
            "pattern": "^\\d{4}$"
          },
          "state": {
            "type": "string",
            "pattern": "^[A-Z]{2}$"
          },
          "annual_payroll": {
            "$ref": "#/$defs/dollars"
          },
          "headcount": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "description": "Payroll for the next 12 months, split by type of work. Work comp is priced per type of work."
    },
    "wc_class_codes": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^\\d{4}$"
      }
    },
    "wc_owners": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "title": {
            "type": "string",
            "maxLength": 60
          },
          "ownership_pct": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "duties": {
            "enum": [
              "field_work",
              "office_only",
              "both"
            ]
          },
          "include_or_exclude": {
            "enum": [
              "include",
              "exclude",
              "not_sure"
            ]
          },
          "annual_pay": {
            "$ref": "#/$defs/dollars"
          }
        }
      }
    },
    "wc_experience_mod": {
      "type": "number",
      "minimum": 0.3,
      "maximum": 3.0
    },
    "wc_uses_subcontractors": {
      "enum": [
        "yes",
        "no"
      ]
    },
    "wc_subcontractor_cost_12_months": {
      "$ref": "#/$defs/dollars"
    },
    "wc_collects_sub_certificates": {
      "$ref": "#/$defs/frequency"
    },
    "wc_family_employees": {
      "type": "string",
      "maxLength": 300
    },
    "wc_seasonal": {
      "type": "string",
      "maxLength": 200
    },
    "wc_current_fund": {
      "enum": [
        "idaho_sif",
        "utah_wcf",
        "private_company",
        "none",
        "not_sure"
      ],
      "description": "Where the work comp is now: the Idaho state fund (idaho_sif), the Utah state fund (utah_wcf), a private insurance company, none, or not sure."
    },
    "restaurant_style": {
      "enum": [
        "quick_service",
        "sit_down_family",
        "fine_dining",
        "bar_tavern",
        "brewery_winery_distillery",
        "coffee_bakery",
        "food_truck",
        "caterer",
        "other"
      ]
    },
    "seating_capacity": {
      "type": "integer",
      "minimum": 0
    },
    "hours_open": {
      "type": "string",
      "maxLength": 200
    },
    "latest_close_time": {
      "type": "string",
      "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
    },
    "cooking_type": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "enum": [
          "none_or_reheat",
          "ovens_only",
          "grill_open_flame",
          "deep_fryers",
          "wood_or_charcoal",
          "solid_fuel_pizza_oven"
        ]
      }
    },
    "fryer_count": {
      "type": "integer",
      "minimum": 0
    },
    "hood_suppression": {
      "enum": [
        "yes_all_lines",
        "some_lines",
        "no",
        "not_sure"
      ]
    },
    "hood_service_company": {
      "type": "string",
      "maxLength": 120
    },
    "hood_last_inspection": {
      "type": "string",
      "maxLength": 40
    },
    "hood_cleaning_frequency": {
      "enum": [
        "monthly",
        "quarterly",
        "twice_a_year",
        "yearly",
        "not_sure"
      ]
    },
    "hood_make": {
      "type": "string",
      "maxLength": 120
    },
    "serves_alcohol": {
      "enum": [
        "none",
        "beer_wine",
        "full_bar"
      ]
    },
    "alcohol_sales_pct": {
      "type": "number",
      "minimum": 0,
      "maximum": 100
    },
    "alcohol_sales_annual": {
      "$ref": "#/$defs/dollars"
    },
    "liquor_license_type": {
      "type": "string",
      "maxLength": 120
    },
    "alcohol_server_training": {
      "enum": [
        "all",
        "some",
        "none"
      ]
    },
    "id_check_policy": {
      "enum": [
        "yes",
        "no"
      ]
    },
    "entertainment": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "enum": [
          "live_music",
          "dj",
          "dancing",
          "karaoke",
          "pool_or_games",
          "sports_viewing",
          "none"
        ]
      }
    },
    "entertainment_frequency": {
      "type": "string",
      "maxLength": 120
    },
    "security_staff": {
      "enum": [
        "yes",
        "no"
      ]
    },
    "delivery": {
      "enum": [
        "none",
        "third_party_apps_only",
        "own_drivers",
        "both"
      ]
    },
    "catering_offsite_pct": {
      "type": "number",
      "minimum": 0,
      "maximum": 100
    },
    "owner_restaurant_years": {
      "type": "integer",
      "minimum": 0,
      "maximum": 80
    },
    "trades": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "trade"
        ],
        "properties": {
          "trade": {
            "$ref": "#/$defs/trade"
          },
          "trade_other": {
            "type": "string",
            "maxLength": 80
          },
          "pct": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "note": {
            "type": "string",
            "maxLength": 120
          }
        }
      }
    },
    "residential_pct": {
      "type": "number",
      "minimum": 0,
      "maximum": 100
    },
    "commercial_pct": {
      "type": "number",
      "minimum": 0,
      "maximum": 100
    },
    "new_construction_pct": {
      "type": "number",
      "minimum": 0,
      "maximum": 100
    },
    "remodel_pct": {
      "type": "number",
      "minimum": 0,
      "maximum": 100
    },
    "acts_as_gc": {
      "enum": [
        "yes",
        "no"
      ]
    },
    "largest_jobs": {
      "type": "array",
      "maxItems": 3,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "description": {
            "type": "string",
            "maxLength": 200
          },
          "amount": {
            "$ref": "#/$defs/dollars"
          }
        }
      }
    },
    "jobs_per_year": {
      "type": "integer",
      "minimum": 0
    },
    "max_height_ft": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000
    },
    "exterior_or_roofing_work": {
      "enum": [
        "yes",
        "no"
      ]
    },
    "hazardous_work": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "enum": [
          "structural",
          "excavation",
          "blasting",
          "asbestos_lead_mold",
          "tract_homes_condos",
          "cranes",
          "over_water",
          "none"
        ]
      }
    },
    "subcontracted_cost_pct": {
      "type": "number",
      "minimum": 0,
      "maximum": 100
    },
    "sub_certificates_required": {
      "$ref": "#/$defs/frequency"
    },
    "sub_ai_required": {
      "enum": [
        "yes",
        "no"
      ]
    },
    "written_contracts": {
      "$ref": "#/$defs/frequency"
    },
    "contractor_license": {
      "type": "string",
      "maxLength": 60
    },
    "safety_programs": {
      "type": "string",
      "maxLength": 500
    },
    "vehicles": {
      "type": "array",
      "maxItems": 50,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "year": {
            "type": "integer",
            "minimum": 1950,
            "maximum": 2100
          },
          "make": {
            "type": "string",
            "maxLength": 40
          },
          "model": {
            "type": "string",
            "maxLength": 60
          },
          "vin": {
            "type": "string",
            "pattern": "^[A-HJ-NPR-Z0-9]{17}$"
          },
          "use": {
            "enum": [
              "service",
              "delivery",
              "commute",
              "hauling",
              "sales",
              "other"
            ]
          },
          "garaging_zip": {
            "type": "string",
            "pattern": "^\\d{5}$"
          },
          "physical_damage_wanted": {
            "type": "boolean"
          },
          "value": {
            "$ref": "#/$defs/dollars"
          },
          "has_lienholder": {
            "type": "boolean"
          }
        }
      }
    },
    "vehicle_count": {
      "type": "integer",
      "minimum": 0,
      "maximum": 500
    },
    "driver_count": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000,
      "description": "How many people drive the business vehicles."
    },
    "vehicle_radius": {
      "enum": [
        "local_under_50",
        "intermediate_50_200",
        "long_haul_over_200"
      ]
    },
    "drivers": {
      "type": "array",
      "maxItems": 50,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "first_name": {
            "type": "string",
            "maxLength": 40
          },
          "last_initial": {
            "type": "string",
            "maxLength": 1
          },
          "age": {
            "type": "integer",
            "minimum": 14,
            "maximum": 100
          },
          "years_licensed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 85
          },
          "violations_or_accidents_last_3_years": {
            "type": "string",
            "maxLength": 300
          }
        }
      }
    },
    "employees_use_personal_vehicles": {
      "enum": [
        "yes",
        "no"
      ]
    },
    "rents_vehicles": {
      "enum": [
        "yes",
        "no"
      ]
    },
    "trailers_or_equipment_hauled": {
      "type": "string",
      "maxLength": 300
    },
    "filings_needed": {
      "enum": [
        "yes",
        "no",
        "not_sure"
      ]
    },
    "umbrella_limit_wanted": {
      "enum": [
        "1m",
        "2m",
        "3m",
        "5m",
        "other"
      ]
    },
    "underlying_limits": {
      "type": "string",
      "maxLength": 300
    },
    "owner_home_own_or_rent": {
      "enum": [
        "own",
        "rent"
      ]
    },
    "owner_home_zip": {
      "type": "string",
      "pattern": "^\\d{5}$"
    },
    "owner_home_year_built": {
      "type": "integer",
      "minimum": 1800,
      "maximum": 2100
    },
    "owner_home_square_feet": {
      "type": "integer",
      "minimum": 0
    },
    "owner_home_roof_year": {
      "type": "integer",
      "minimum": 1900,
      "maximum": 2100
    },
    "owner_vehicle_count": {
      "type": "integer",
      "minimum": 0
    },
    "owner_driver_count": {
      "type": "integer",
      "minimum": 0
    },
    "owner_toys": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "enum": [
          "boat_or_jetski",
          "atv_utv",
          "rv_or_trailer",
          "motorcycle",
          "trampoline",
          "pool",
          "short_term_rental",
          "none"
        ]
      }
    },
    "owner_toys_text": {
      "type": "string",
      "maxLength": 200,
      "description": "Free text from the page: boats, ATVs, RVs, motorcycles, a cabin or a rental the owner has. Software may send owner_toys instead."
    },
    "owner_home_expiration": {
      "type": "string",
      "format": "date"
    },
    "owner_auto_expiration": {
      "type": "string",
      "format": "date"
    },
    "documents": {
      "type": "array",
      "maxItems": 15,
      "items": {
        "$ref": "#/$defs/document"
      },
      "description": "Files sent as JSON: each references an upload_id from POST /api/quote-upload or an https url. The page's form sends files directly as doc_<kind> fields instead."
    },
    "referral_source": {
      "type": "string",
      "maxLength": 200
    },
    "consent": {
      "const": true,
      "description": "Required for JSON requests: the business agrees to this line - Ben Page uses what you send only to reply about this quote and to get it quoted. It goes to the insurance companies and the people needed to quote it, and to the services that store and read it for him (Cloudflare, Anthropic, Quo). It is kept 13 months unless you become a client, deleted sooner if you text to ask, and never sold."
    },
    "request_key": {
      "type": "string",
      "maxLength": 64,
      "description": "Optional. A key the sender chooses so a retried request can be matched to the first one."
    }
  },
  "$defs": {
    "line": {
      "enum": [
        "workers_comp",
        "package_property_and_liability",
        "general_liability",
        "property",
        "commercial_auto",
        "liquor_liability",
        "umbrella",
        "tools_equipment",
        "home",
        "personal_auto",
        "other",
        "not_sure"
      ]
    },
    "business_type": {
      "enum": [
        "restaurant",
        "bar",
        "food_truck_or_catering",
        "contractor",
        "other"
      ]
    },
    "trade": {
      "enum": [
        "general_contractor",
        "framing_carpentry",
        "drywall",
        "painting",
        "tile_flooring",
        "concrete_masonry",
        "roofing",
        "plumbing",
        "electrical",
        "hvac",
        "landscaping_irrigation",
        "excavation",
        "siding_gutters",
        "cabinets_finish_carpentry",
        "insulation",
        "handyman",
        "cleaning_janitorial",
        "other"
      ]
    },
    "frequency": {
      "enum": [
        "always",
        "sometimes",
        "never"
      ]
    },
    "dollars": {
      "description": "Whole US dollars. An integer is preferred; a string like \"$150k\", \"150,000\" or \"1.2m\" is accepted and normalized by the server.",
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000000
        },
        {
          "type": "string",
          "pattern": "^\\$?\\s*[0-9][0-9,]*(\\.[0-9]+)?\\s*[kKmM]?$",
          "maxLength": 20
        }
      ]
    },
    "address": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "street": {
          "type": "string",
          "maxLength": 150
        },
        "city": {
          "type": "string",
          "maxLength": 80
        },
        "state": {
          "type": "string",
          "pattern": "^[A-Z]{2}$"
        },
        "zip": {
          "type": "string",
          "pattern": "^\\d{5}(-\\d{4})?$"
        }
      }
    },
    "document": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "kind"
      ],
      "oneOf": [
        {
          "required": [
            "upload_id"
          ]
        },
        {
          "required": [
            "url"
          ]
        }
      ],
      "properties": {
        "kind": {
          "enum": [
            "dec_pages",
            "loss_runs",
            "payroll_report",
            "prior_audit",
            "wc_mod_worksheet",
            "vehicle_list",
            "lease_or_contract",
            "hood_inspection",
            "menu",
            "other"
          ]
        },
        "upload_id": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{8,64}$"
        },
        "url": {
          "type": "string",
          "format": "uri",
          "pattern": "^https://"
        },
        "filename": {
          "type": "string",
          "maxLength": 200
        },
        "media_type": {
          "enum": [
            "application/pdf",
            "image/jpeg",
            "image/png",
            "image/heic",
            "text/csv",
            "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
          ]
        },
        "note": {
          "type": "string",
          "maxLength": 300
        }
      }
    }
  }
}
