{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vistalink-com/json-schema/vistalink-com-chat-request-schema.json",
  "title": "ChatRequest",
  "description": "POST /v1/chat request body.",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vistalink-com-openapi.json#/components/schemas/ChatRequest",
  "properties": {
    "guest_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Guest Id",
      "description": "Guest profile ID"
    },
    "session_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Session Id",
      "description": "Existing session to continue"
    },
    "message": {
      "type": "string",
      "maxLength": 4000,
      "minLength": 1,
      "title": "Message",
      "description": "User message"
    },
    "currency": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 3
        },
        {
          "type": "null"
        }
      ],
      "title": "Currency"
    },
    "locale": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 5
        },
        {
          "type": "null"
        }
      ],
      "title": "Locale"
    },
    "context": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Context",
      "description": "Extra structured context"
    },
    "clarification_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ],
      "title": "Clarification Id",
      "description": "The clarification_id echoed back from a previous response"
    },
    "clarification_option_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ],
      "title": "Clarification Option Id",
      "description": "The id of the option the user selected (set with clarification_id)"
    },
    "user_location": {
      "anyOf": [
        {
          "$ref": "#/$defs/UserLocationContext"
        },
        {
          "type": "null"
        }
      ],
      "description": "GPS coordinates for location-sensitive queries (e.g. 'near me')"
    }
  },
  "type": "object",
  "required": [
    "message"
  ],
  "$defs": {
    "UserLocationContext": {
      "properties": {
        "lat": {
          "type": "number",
          "maximum": 90.0,
          "minimum": -90.0,
          "title": "Lat",
          "description": "Latitude"
        },
        "lng": {
          "type": "number",
          "maximum": 180.0,
          "minimum": -180.0,
          "title": "Lng",
          "description": "Longitude"
        },
        "accuracy": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Accuracy",
          "description": "Accuracy in meters"
        }
      },
      "type": "object",
      "required": [
        "lat",
        "lng"
      ],
      "title": "UserLocationContext",
      "description": "Caller-supplied GPS coordinates for location-sensitive queries.\n\nClients can supply this to skip the supervisor's GPS-collection\nround-trip on queries like \"hotels near me\".  Lat/lng are validated\nto ensure they are physically meaningful before being injected into\nstructured_context."
    }
  }
}