{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.totaladvisory.ca/enquiry.schema.json",
  "title": "Total Advisory Services Ltd. financing enquiry",
  "description": "Request schema for authorized financing enquiries. Obtain consent before submitting.",
  "type": "object",
  "required": [
    "service",
    "province",
    "timing",
    "name",
    "email",
    "consent"
  ],
  "properties": {
    "intent": {
      "type": "string",
      "enum": [
        "enquiry",
        "meeting"
      ]
    },
    "service": {
      "type": "string",
      "enum": [
        "commercial-mortgages",
        "residential-mortgages",
        "private-residential-loans",
        "private-commercial-loans",
        "construction-financing",
        "bank-lines-of-credit",
        "equipment-financing",
        "truck-loans",
        "shareholder-buyout-loans",
        "not-sure"
      ]
    },
    "amount_cad": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 1000,
      "maximum": 1000000000
    },
    "province": {
      "type": "string",
      "enum": [
        "Ontario",
        "Alberta",
        "British Columbia",
        "Manitoba",
        "New Brunswick",
        "Newfoundland and Labrador",
        "Nova Scotia",
        "Prince Edward Island",
        "Quebec",
        "Saskatchewan",
        "Northwest Territories",
        "Nunavut",
        "Yukon"
      ]
    },
    "timing": {
      "type": "string",
      "enum": [
        "Exploring options",
        "Within 30 days",
        "Within 60\u201390 days",
        "More than 90 days",
        "Urgent / a closing date is set"
      ]
    },
    "name": {
      "type": "string",
      "minLength": 2,
      "maxLength": 100
    },
    "email": {
      "type": "string",
      "format": "email",
      "maxLength": 150
    },
    "phone": {
      "type": "string",
      "maxLength": 40
    },
    "company": {
      "type": "string",
      "maxLength": 160
    },
    "notes": {
      "type": "string",
      "maxLength": 1500
    },
    "consent": {
      "const": true
    },
    "campaign": {
      "type": "object",
      "propertyNames": {
        "enum": [
          "utm_source",
          "utm_medium",
          "utm_campaign",
          "utm_content",
          "utm_term"
        ]
      },
      "additionalProperties": {
        "type": "string",
        "maxLength": 120
      }
    },
    "calculator_estimate": {
      "type": [
        "object",
        "null"
      ]
    }
  },
  "additionalProperties": false
}