{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cityoftrees-house/json-schema/cityoftrees-house-quote-schema.json",
  "title": "Quote",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cityoftrees-house-openapi.json#/components/schemas/Quote",
  "type": "object",
  "properties": {
    "quoteId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "propertySlug": {
      "type": "string",
      "const": "city-of-trees-house"
    },
    "stay": {
      "type": "object",
      "properties": {
        "checkIn": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        },
        "checkOut": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        },
        "guests": {
          "type": "integer",
          "minimum": 1,
          "maximum": 10
        },
        "petCount": {
          "type": "integer",
          "minimum": 0,
          "maximum": 2
        }
      },
      "required": [
        "checkIn",
        "checkOut",
        "guests",
        "petCount"
      ],
      "additionalProperties": false
    },
    "currency": {
      "type": "string",
      "const": "USD"
    },
    "timezone": {
      "type": "string",
      "const": "America/Los_Angeles"
    },
    "generatedAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    },
    "quoteCheckedAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    },
    "calendarObservedAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    },
    "pricingAuthoritative": {
      "type": "boolean",
      "const": true
    },
    "inventoryAvailable": {
      "type": "boolean",
      "const": true
    },
    "reservesInventory": {
      "type": "boolean",
      "const": false
    },
    "checkoutEnabled": {
      "type": "boolean",
      "description": "True when website checkout can complete bookingUrl in this environment. False when checkout is locked."
    },
    "minStayNights": {
      "type": "integer",
      "minimum": 1,
      "maximum": 28
    },
    "stayValueCents": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10000000000
    },
    "petFeeCents": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10000000000
    },
    "nightlyPrices": {
      "minItems": 1,
      "maxItems": 28,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "amountCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000000000
          }
        },
        "required": [
          "date",
          "amountCents"
        ],
        "additionalProperties": false
      }
    },
    "paymentOptions": {
      "minItems": 1,
      "maxItems": 6,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "zelle",
              "stripe_ach",
              "venmo",
              "stripe_card",
              "paypal",
              "cash_app"
            ]
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "confirmationMode": {
            "type": "string",
            "enum": [
              "automatic",
              "host_verified"
            ]
          },
          "taxableSubtotalCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000000000
          },
          "taxCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000000000
          },
          "paymentFeeCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000000000
          },
          "totalCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000000000
          }
        },
        "required": [
          "method",
          "label",
          "confirmationMode",
          "taxableSubtotalCents",
          "taxCents",
          "paymentFeeCents",
          "totalCents"
        ],
        "additionalProperties": false
      }
    },
    "cancellationPolicy": {
      "type": "object",
      "properties": {
        "version": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "summary": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "version",
        "url",
        "summary"
      ],
      "additionalProperties": false
    },
    "requiredGuestActions": {
      "minItems": 4,
      "maxItems": 4,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "review_total_and_terms",
          "confirm_primary_renter_age",
          "authorize_payment",
          "verify_identity"
        ]
      }
    },
    "bookingUrl": {
      "type": "string",
      "format": "uri"
    },
    "humanSteps": {
      "type": "array",
      "minItems": 5,
      "maxItems": 5,
      "items": {
        "$ref": "#/$defs/HumanStep"
      }
    },
    "handoff": {
      "$ref": "#/$defs/Handoff"
    }
  },
  "required": [
    "quoteId",
    "propertySlug",
    "stay",
    "currency",
    "timezone",
    "generatedAt",
    "expiresAt",
    "quoteCheckedAt",
    "calendarObservedAt",
    "pricingAuthoritative",
    "inventoryAvailable",
    "reservesInventory",
    "checkoutEnabled",
    "minStayNights",
    "stayValueCents",
    "petFeeCents",
    "nightlyPrices",
    "paymentOptions",
    "cancellationPolicy",
    "requiredGuestActions",
    "bookingUrl",
    "humanSteps",
    "handoff"
  ],
  "additionalProperties": false,
  "$defs": {
    "Handoff": {
      "type": "object",
      "properties": {
        "quoteWindowMinutes": {
          "type": "number",
          "const": 30
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        "reservesInventory": {
          "type": "boolean",
          "const": false
        },
        "confirmationRule": {
          "type": "string",
          "minLength": 1
        },
        "protectionNote": {
          "type": "string",
          "minLength": 1
        },
        "idNote": {
          "type": "string",
          "minLength": 1
        },
        "contact": {
          "type": "object",
          "properties": {
            "phone": {
              "type": "string",
              "minLength": 1
            },
            "phoneE164": {
              "type": "string",
              "minLength": 1
            },
            "email": {
              "type": "string",
              "minLength": 1
            },
            "line": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "phone",
            "phoneE164",
            "email",
            "line"
          ],
          "additionalProperties": false
        },
        "agentMustNot": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "quoteWindowMinutes",
        "expiresAt",
        "reservesInventory",
        "confirmationRule",
        "protectionNote",
        "idNote",
        "contact",
        "agentMustNot"
      ],
      "additionalProperties": false
    },
    "HumanStep": {
      "type": "object",
      "properties": {
        "order": {
          "type": "integer",
          "minimum": 1,
          "maximum": 5
        },
        "action": {
          "type": "string",
          "enum": [
            "enter_guest_details",
            "review_total_and_terms",
            "confirm_primary_renter_age",
            "authorize_payment",
            "verify_identity"
          ]
        },
        "requiredGuestAction": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "review_total_and_terms",
                "confirm_primary_renter_age",
                "authorize_payment",
                "verify_identity"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "title": {
          "type": "string",
          "minLength": 1
        },
        "detail": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "order",
        "action",
        "requiredGuestAction",
        "title",
        "detail"
      ],
      "additionalProperties": false
    }
  }
}