{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/eventescapes-com/json-schema/eventescapes-com-payment-link-request-schema.json",
  "title": "PaymentLinkRequest",
  "x-generated": "2026-11-07",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/eventescapes-com-openapi.json#/components/schemas/PaymentLinkRequest",
  "type": "object",
  "required": [
    "customer_email",
    "customer_first_name",
    "customer_last_name",
    "customer_consent",
    "items",
    "agent_terms_accepted"
  ],
  "properties": {
    "customer_email": {
      "type": "string",
      "format": "email"
    },
    "customer_first_name": {
      "type": "string",
      "maxLength": 80
    },
    "customer_last_name": {
      "type": "string",
      "maxLength": 80
    },
    "customer_phone": {
      "type": "string",
      "maxLength": 20,
      "description": "E.164, if known."
    },
    "residency_country": {
      "type": "string",
      "maxLength": 60,
      "description": "Customer's country of residence, if stated (hotel prices vary by residency)."
    },
    "customer_consent": {
      "type": "string",
      "minLength": 2,
      "maxLength": 500,
      "description": "The customer's own words asking to book these items."
    },
    "agent_terms_accepted": {
      "type": "boolean",
      "const": true,
      "description": "Acceptance of https://eventescapes.com/terms/ai-agents."
    },
    "agent_name": {
      "type": "string",
      "maxLength": 80,
      "description": "Name of the AI assistant making the booking."
    },
    "total_confirmation": {
      "type": "string",
      "maxLength": 300,
      "description": "Only when a previous result asked for it: the customer's words confirming the total."
    },
    "items": {
      "type": "array",
      "minItems": 1,
      "maxItems": 4,
      "items": {
        "$ref": "#/$defs/BookingItem"
      }
    },
    "attendee_names": {
      "type": "string",
      "maxLength": 600
    },
    "attendee_details": {
      "type": "string",
      "maxLength": 2000
    },
    "details_confirm_quote": {
      "type": "string",
      "maxLength": 500
    },
    "accept_new_price": {
      "type": "boolean"
    },
    "promo_code": {
      "type": "string",
      "maxLength": 40
    }
  },
  "$defs": {
    "BookingItem": {
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "hotel",
            "event",
            "experience"
          ]
        },
        "hotel_id": {
          "type": "string",
          "description": "HOTEL: from /api/v1/events/{idOrSlug}/hotels."
        },
        "check_in": {
          "type": "string",
          "format": "date"
        },
        "check_out": {
          "type": "string",
          "format": "date"
        },
        "adults": {
          "type": "integer",
          "minimum": 1,
          "maximum": 6
        },
        "children": {
          "type": "integer",
          "minimum": 0,
          "maximum": 6
        },
        "breakfast": {
          "type": "boolean"
        },
        "free_cancellation": {
          "type": "boolean"
        },
        "event_id": {
          "type": "string",
          "format": "uuid",
          "description": "EVENT: from /api/v1/events."
        },
        "event_slug": {
          "type": "string"
        },
        "ticket_id": {
          "type": "string"
        },
        "quantity": {
          "type": "integer",
          "minimum": 1,
          "maximum": 10
        },
        "activity_code": {
          "type": "string",
          "description": "EXPERIENCE: from /api/v1/experiences."
        },
        "activity_date": {
          "type": "string",
          "format": "date"
        },
        "child_ages": {
          "type": "string"
        },
        "modality_code": {
          "type": "string"
        },
        "session_code": {
          "type": "string"
        }
      }
    }
  }
}