{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rateranger-io/json-schema/rateranger-io-agent-batch-submission-schema.json",
  "title": "AgentBatchSubmission",
  "description": "A batch of bookings submitted on one traveller's behalf by an agent.\n\nOne email address per batch by design. The confirmation is a single message\nto one person listing everything an assistant asked us to watch for them,\nwhich is both a better inbox experience than seven separate emails and the\nthing that makes one confirmation link sufficient.",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rateranger-io-openapi.yml#/components/schemas/AgentBatchSubmission",
  "properties": {
    "agent": {
      "anyOf": [
        {
          "maxLength": 80,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Agent"
    },
    "bookings": {
      "items": {
        "$ref": "#/$defs/AgentBookingItem"
      },
      "maxItems": 10,
      "minItems": 1,
      "title": "Bookings",
      "type": "array"
    },
    "email": {
      "maxLength": 254,
      "minLength": 3,
      "title": "Email",
      "type": "string"
    }
  },
  "required": [
    "email",
    "bookings"
  ],
  "type": "object",
  "$defs": {
    "AgentBookingItem": {
      "description": "One booking inside an agent batch submission.\n\nDeliberately stricter than `ManualBookingSubmission`, because the callers\nare different. A browser form is forgiving by necessity: a human who mistypes\nshould not lose their booking, so bad attribution is dropped rather than\nraised. An agent is a program that can read an error and correct itself, so\ntelling it exactly what was wrong is more useful than silently coercing.\n\n`country` is REQUIRED here and optional on the form. That is the single\nhighest-leverage field in the payload: a missing country routes a booking\npast DataForSEO to SerpAPI, and in August 2026 that stranded 60 bookings on\nan exhausted free tier. An LLM-driven caller always knows which country a\nhotel is in, so requiring it costs nothing and closes the hole.\n\nPrices may carry decimals. The web form strips them because its JavaScript\nturns \"687.50\" into \"68750\", which is a browser problem an API does not\nhave. Rahul's assistant had to pre-round SGD 467.79 to 468; it no longer\nneeds to.",
      "properties": {
        "booking_platform": {
          "default": "other",
          "maxLength": 40,
          "title": "Booking Platform",
          "type": "string"
        },
        "check_in_date": {
          "format": "date",
          "title": "Check In Date",
          "type": "string"
        },
        "check_out_date": {
          "format": "date",
          "title": "Check Out Date",
          "type": "string"
        },
        "city": {
          "maxLength": 120,
          "minLength": 1,
          "title": "City",
          "type": "string"
        },
        "country": {
          "maxLength": 2,
          "minLength": 2,
          "title": "Country",
          "type": "string"
        },
        "currency": {
          "default": "USD",
          "maxLength": 3,
          "minLength": 3,
          "title": "Currency",
          "type": "string"
        },
        "hotel_name": {
          "maxLength": 200,
          "minLength": 1,
          "title": "Hotel Name",
          "type": "string"
        },
        "num_guests": {
          "default": 2,
          "maximum": 9.0,
          "minimum": 1.0,
          "title": "Num Guests",
          "type": "integer"
        },
        "num_rooms": {
          "default": 1,
          "maximum": 10.0,
          "minimum": 1.0,
          "title": "Num Rooms",
          "type": "integer"
        },
        "room_type": {
          "default": "Standard Room",
          "maxLength": 120,
          "title": "Room Type",
          "type": "string"
        },
        "total_price": {
          "exclusiveMinimum": 0.0,
          "maximum": 10000000.0,
          "title": "Total Price",
          "type": "number"
        }
      },
      "required": [
        "hotel_name",
        "city",
        "country",
        "check_in_date",
        "check_out_date",
        "total_price"
      ],
      "title": "AgentBookingItem",
      "type": "object"
    }
  }
}