{
  "openapi": "3.1.0",
  "info": {
    "title": "Flyo External Partner API",
    "version": "1.0.0",
    "description": "Generated from src/lib/webcheckin-contract.ts. API host is supplied during onboarding. Flight clocks are airport-local; lifecycle timestamps are UTC. Reference examples use illustrative dates; replace them with flights at least six hours in the future.",
    "contact": {
      "url": "https://www.flyo.ai/en/api-docs"
    }
  },
  "servers": [
    {
      "url": "{apiBaseUrl}",
      "description": "Set the API base URL supplied for your environment; example.invalid is a placeholder.",
      "variables": {
        "apiBaseUrl": {
          "default": "https://example.invalid",
          "description": "API host supplied during onboarding, without a trailing slash."
        }
      }
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/extPartner/api/webcheckin/subscribe": {
      "post": {
        "operationId": "subscribeWebcheckin",
        "summary": "Create web check-in request",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscribeRequest"
              },
              "example": {
                "pnr": "ABC123",
                "flights": [
                  {
                    "airline": "AI",
                    "flight_number": "AI302",
                    "origin": "DEL",
                    "destination": "DXB",
                    "departure_datetime": "2030-09-20T10:00:00",
                    "arrival_datetime": "2030-09-20T12:00:00"
                  }
                ],
                "passengers": [
                  {
                    "first_name": "John",
                    "last_name": "Doe",
                    "email": "john@example.com",
                    "phone": "9876543210",
                    "country_code": "+91",
                    "date_of_birth": "1995-07-20",
                    "nationality": "IN",
                    "country_of_residence": "IN",
                    "passport": {
                      "number": "N1234567",
                      "date_of_issue": "2020-05-01",
                      "expiry_date": "2035-05-01",
                      "place_of_issue": "DELHI",
                      "nationality": "IN"
                    },
                    "documents": [
                      {
                        "type": "VISA",
                        "document_number": "V123456",
                        "issuing_country": "AE",
                        "expiry_date": "2035-05-01"
                      }
                    ],
                    "seat_preference": {
                      "row_preference": "rear",
                      "column_preference": "window"
                    }
                  }
                ],
                "callbackData": {
                  "callbackUrl": "https://partner.example.com/webhooks/flyo",
                  "auth_header": "Authorization: Bearer <your-callback-secret>"
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SubscribeMultipartRequest"
              },
              "encoding": {
                "flights": {
                  "contentType": "text/plain"
                },
                "passengers": {
                  "contentType": "text/plain"
                },
                "callbackData": {
                  "contentType": "text/plain"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscribeResponse"
                },
                "example": {
                  "success": true,
                  "message": "SCHEDULED",
                  "booking_id": 123,
                  "checkin_id": "CHK-783245",
                  "status": "SCHEDULED",
                  "sub_status": "COMPLETE_INFO",
                  "missing_info": [],
                  "status_message": "Check-in scheduled",
                  "quota": {
                    "included_units": 100,
                    "consumed_units": 1
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or malformed data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Missing entitlement, suspended entitlement, or quota exhausted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Journey rejected or callback validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; wait retryAfter seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error or upload parser failure. Check for an existing attempt before retrying subscribe.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/extPartner/api/webcheckin/update": {
      "post": {
        "operationId": "updateWebcheckin",
        "summary": "Update booking passengers or PNR",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRequest"
              },
              "example": {
                "checkin_id": "CHK-783245",
                "type": "passengers",
                "passengers": [
                  {
                    "first_name": "John",
                    "last_name": "Doe",
                    "email": "john@example.com",
                    "phone": "9876543210",
                    "country_code": "+91",
                    "date_of_birth": "1995-07-20",
                    "nationality": "IN",
                    "country_of_residence": "IN",
                    "passport": {
                      "number": "N1234567",
                      "date_of_issue": "2020-05-01",
                      "expiry_date": "2035-05-01",
                      "place_of_issue": "DELHI",
                      "nationality": "IN"
                    },
                    "documents": [
                      {
                        "type": "VISA",
                        "document_number": "V123456",
                        "issuing_country": "AE",
                        "expiry_date": "2035-05-01"
                      }
                    ],
                    "seat_preference": {
                      "row_preference": "rear",
                      "column_preference": "window"
                    }
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMultipartRequest"
              },
              "encoding": {
                "passengers": {
                  "contentType": "text/plain"
                },
                "payload": {
                  "contentType": "text/plain"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateResponse"
                },
                "example": {
                  "success": true,
                  "type": "passengers",
                  "operation": "update",
                  "data": {
                    "checkin_id": "CHK-783245",
                    "booking_id": 123,
                    "status": "SCHEDULED",
                    "sub_status": "COMPLETE_INFO",
                    "checkin_message": "Check-in scheduled",
                    "missing_info": [],
                    "boarding_passes": [],
                    "last_updated": "2030-09-16T10:30:00.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or malformed data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource missing or belongs to another enterprise.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Update conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Journey rejection; passenger changes may already be committed before resume fails. Read status before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; wait retryAfter seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error or upload parser failure. Check for an existing attempt before retrying subscribe.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/extPartner/api/webcheckin/status": {
      "get": {
        "operationId": "statusWebcheckin",
        "summary": "Get check-in status",
        "parameters": [
          {
            "name": "checkin_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Check-in identifier; checkinId compatibility alias is also accepted."
            },
            "description": "Check-in identifier; checkinId compatibility alias is also accepted."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse"
                },
                "example": {
                  "success": true,
                  "checkin_id": "CHK-783245",
                  "booking_id": 123,
                  "status": "COMPLETED",
                  "sub_status": "BOARDING_PASS_AVAILABLE",
                  "checkin_message": "Checkin completed and boarding passes are available",
                  "missing_info": [],
                  "boarding_passes": [
                    "https://files.example.com/boarding-pass.pdf"
                  ],
                  "last_updated": "2030-09-18T05:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "description": "Missing or malformed data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource missing or belongs to another enterprise.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; wait retryAfter seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error or upload parser failure. Check for an existing attempt before retrying subscribe.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/extPartner/api/webcheckin/requests": {
      "get": {
        "operationId": "requestsWebcheckin",
        "summary": "List enterprise check-in requests",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Use a zero-based integer; invalid or negative input falls back to 0."
            },
            "description": "Use a zero-based integer; invalid or negative input falls back to 0."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Use an integer; defaults to 25 and clamps to 1–100."
            },
            "description": "Use an integer; defaults to 25 and clamps to 1–100."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Optional normalized status filter. Unknown values are ignored."
            },
            "description": "Optional normalized status filter. Unknown values are ignored."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "checkin_id": "CHK-783245",
                      "booking_id": 123,
                      "pnr": "ABC123",
                      "origin": "DEL",
                      "destination": "DXB",
                      "departure_datetime": "2030-09-20T10:00:00.000Z",
                      "airline": "AI",
                      "flight_number": "AI302",
                      "status": "COMPLETED",
                      "sub_status": "BOARDING_PASS_AVAILABLE",
                      "checkin_message": "Checkin completed and boarding passes are available",
                      "missing_info": [],
                      "boarding_passes": [
                        "https://files.example.com/boarding-pass.pdf"
                      ],
                      "scheduled_time": "2030-09-18T04:45:00.000Z",
                      "created_at": "2030-09-16T10:00:00.000Z",
                      "last_updated": "2030-09-18T05:00:00.000Z"
                    }
                  ],
                  "pagination": {
                    "page": 0,
                    "limit": 25,
                    "total": 1,
                    "totalPages": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; wait retryAfter seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected error or upload parser failure. Check for an existing attempt before retrying subscribe.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    },
    "schemas": {
      "Flight": {
        "type": "object",
        "properties": {
          "airline": {
            "type": "string",
            "description": "Airline IATA code; use two alphanumeric characters, for example AI or 6E.",
            "minLength": 1
          },
          "flight_number": {
            "type": "string",
            "description": "Flight number.",
            "minLength": 1
          },
          "origin": {
            "type": "string",
            "description": "Origin IATA airport code; use three letters.",
            "minLength": 1
          },
          "destination": {
            "type": "string",
            "description": "Destination IATA airport code; use three letters.",
            "minLength": 1
          },
          "departure_datetime": {
            "type": "string",
            "description": "Origin-airport local wall clock. Prefer YYYY-MM-DDTHH:mm:ss without suffix. A supplied Z or numeric offset is ignored, never converted. Calendar and airport timezone validity are checked separately.",
            "pattern": "^\\s*\\d{4}-\\d{2}-\\d{2}[T ]\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,3})?)?(?:Z|[+-](?:[01]\\d|2[0-3]):?[0-5]\\d)?\\s*$"
          },
          "arrival_datetime": {
            "type": [
              "string",
              "null"
            ],
            "description": "Destination-airport local wall clock. Prefer YYYY-MM-DDTHH:mm:ss without suffix. A supplied Z or numeric offset is ignored, never converted. Calendar and airport timezone validity are checked separately.",
            "pattern": "^\\s*\\d{4}-\\d{2}-\\d{2}[T ]\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,3})?)?(?:Z|[+-](?:[01]\\d|2[0-3]):?[0-5]\\d)?\\s*$"
          }
        },
        "required": [
          "airline",
          "flight_number",
          "origin",
          "destination",
          "departure_datetime"
        ]
      },
      "Passenger": {
        "type": "object",
        "properties": {
          "first_name": {
            "type": "string",
            "description": "First name.",
            "minLength": 1
          },
          "last_name": {
            "type": "string",
            "description": "Last name.",
            "minLength": 1
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "Contact email. At least one valid passenger email is needed for readiness; malformed or absent email does not structurally reject subscribe."
          },
          "country_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "Phone country prefix, for example +91."
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "description": "Phone number."
          },
          "date_of_birth": {
            "type": [
              "string",
              "null"
            ],
            "description": "Date of birth; use YYYY-MM-DD."
          },
          "nationality": {
            "type": [
              "string",
              "null"
            ],
            "description": "Nationality country code, for example IN."
          },
          "country_of_residence": {
            "type": [
              "string",
              "null"
            ],
            "description": "Residence country code."
          },
          "passport": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "number": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Passport number."
              },
              "date_of_issue": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Issue date; use YYYY-MM-DD."
              },
              "expiry_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Expiry date; use YYYY-MM-DD."
              },
              "place_of_issue": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Place of issue."
              },
              "nationality": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Nationality country code; passenger nationality is a readiness fallback."
              },
              "document_url": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Existing passport document URL."
              },
              "file_field": {
                "type": "string",
                "description": "Exact arbitrary multipart file-part name to bind this scan. A scan does not replace passport metadata."
              }
            },
            "description": "International readiness needs number, date_of_issue, expiry_date, place_of_issue and passport or passenger nationality for every passenger."
          },
          "documents": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "VISA",
                    "IQAMA",
                    "PR_CARD",
                    "GREEN_CARD"
                  ],
                  "description": "Supporting document type."
                },
                "document_number": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Document number."
                },
                "issuing_country": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Issuing country code."
                },
                "expiry_date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Expiry date; use YYYY-MM-DD."
                },
                "document_url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Existing document URL."
                },
                "file_field": {
                  "type": "string",
                  "description": "Exact arbitrary multipart file-part name for this document."
                }
              },
              "required": [
                "type"
              ]
            },
            "description": "Supporting documents."
          },
          "seat_preference": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "row_preference": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "front",
                  "middle",
                  "rear",
                  null
                ],
                "description": "Preferred cabin row."
              },
              "column_preference": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "window",
                  "middle",
                  "aisle",
                  null
                ],
                "description": "Preferred seat column."
              }
            },
            "description": "Passenger seat preferences."
          }
        },
        "required": [
          "first_name",
          "last_name"
        ]
      },
      "Passport": {
        "type": "object",
        "properties": {
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "Passport number."
          },
          "date_of_issue": {
            "type": [
              "string",
              "null"
            ],
            "description": "Issue date; use YYYY-MM-DD."
          },
          "expiry_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "Expiry date; use YYYY-MM-DD."
          },
          "place_of_issue": {
            "type": [
              "string",
              "null"
            ],
            "description": "Place of issue."
          },
          "nationality": {
            "type": [
              "string",
              "null"
            ],
            "description": "Nationality country code; passenger nationality is a readiness fallback."
          },
          "document_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Existing passport document URL."
          },
          "file_field": {
            "type": "string",
            "description": "Exact arbitrary multipart file-part name to bind this scan. A scan does not replace passport metadata."
          }
        }
      },
      "SupportingDocument": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "VISA",
              "IQAMA",
              "PR_CARD",
              "GREEN_CARD"
            ],
            "description": "Supporting document type."
          },
          "document_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "Document number."
          },
          "issuing_country": {
            "type": [
              "string",
              "null"
            ],
            "description": "Issuing country code."
          },
          "expiry_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "Expiry date; use YYYY-MM-DD."
          },
          "document_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Existing document URL."
          },
          "file_field": {
            "type": "string",
            "description": "Exact arbitrary multipart file-part name for this document."
          }
        },
        "required": [
          "type"
        ]
      },
      "CallbackData": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "clientId": {
            "type": "string",
            "description": "Optional; defaults to authenticated enterprise identity."
          },
          "clientName": {
            "type": "string",
            "description": "Optional; defaults to authenticated enterprise identity."
          },
          "callbackUrl": {
            "type": "string",
            "description": "Callback URL. Use HTTPS for secure delivery; HTTPS is guidance, not an enforced restriction.",
            "format": "uri"
          },
          "auth_header": {
            "type": "string",
            "description": "Exactly one colon: X-API-Key: value or Authorization: Bearer value. Header names are case-insensitive. Empty values and CR/LF are rejected.",
            "pattern": "^[^\\S\\r\\n]*(?:[xX]-[aA][pP][iI]-[kK][eE][yY]|[aA][uU][tT][hH][oO][rR][iI][zZ][aA][tT][iI][oO][nN])[^\\S\\r\\n]*:[^:\\r\\n]*[^\\s:\\r\\n][^:\\r\\n]*$"
          }
        },
        "required": [
          "callbackUrl",
          "auth_header"
        ],
        "description": "Optional callback configuration. callbackUrl and auth_header are required when supplied."
      },
      "SubscribeRequest": {
        "type": "object",
        "properties": {
          "pnr": {
            "type": "string",
            "description": "Airline record locator. Missing or invalid PNR is recorded as missing information, rather than a structural rejection."
          },
          "flights": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "airline": {
                  "type": "string",
                  "description": "Airline IATA code; use two alphanumeric characters, for example AI or 6E.",
                  "minLength": 1
                },
                "flight_number": {
                  "type": "string",
                  "description": "Flight number.",
                  "minLength": 1
                },
                "origin": {
                  "type": "string",
                  "description": "Origin IATA airport code; use three letters.",
                  "minLength": 1
                },
                "destination": {
                  "type": "string",
                  "description": "Destination IATA airport code; use three letters.",
                  "minLength": 1
                },
                "departure_datetime": {
                  "type": "string",
                  "description": "Origin-airport local wall clock. Prefer YYYY-MM-DDTHH:mm:ss without suffix. A supplied Z or numeric offset is ignored, never converted. Calendar and airport timezone validity are checked separately.",
                  "pattern": "^\\s*\\d{4}-\\d{2}-\\d{2}[T ]\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,3})?)?(?:Z|[+-](?:[01]\\d|2[0-3]):?[0-5]\\d)?\\s*$"
                },
                "arrival_datetime": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Destination-airport local wall clock. Prefer YYYY-MM-DDTHH:mm:ss without suffix. A supplied Z or numeric offset is ignored, never converted. Calendar and airport timezone validity are checked separately.",
                  "pattern": "^\\s*\\d{4}-\\d{2}-\\d{2}[T ]\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,3})?)?(?:Z|[+-](?:[01]\\d|2[0-3]):?[0-5]\\d)?\\s*$"
                }
              },
              "required": [
                "airline",
                "flight_number",
                "origin",
                "destination",
                "departure_datetime"
              ]
            },
            "description": "One-way connected itinerary operated by one airline. First departure must be at least six hours away.",
            "minItems": 1
          },
          "passengers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "first_name": {
                  "type": "string",
                  "description": "First name.",
                  "minLength": 1
                },
                "last_name": {
                  "type": "string",
                  "description": "Last name.",
                  "minLength": 1
                },
                "email": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Contact email. At least one valid passenger email is needed for readiness; malformed or absent email does not structurally reject subscribe."
                },
                "country_code": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Phone country prefix, for example +91."
                },
                "phone": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Phone number."
                },
                "date_of_birth": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Date of birth; use YYYY-MM-DD."
                },
                "nationality": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Nationality country code, for example IN."
                },
                "country_of_residence": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Residence country code."
                },
                "passport": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "number": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Passport number."
                    },
                    "date_of_issue": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Issue date; use YYYY-MM-DD."
                    },
                    "expiry_date": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Expiry date; use YYYY-MM-DD."
                    },
                    "place_of_issue": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Place of issue."
                    },
                    "nationality": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Nationality country code; passenger nationality is a readiness fallback."
                    },
                    "document_url": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Existing passport document URL."
                    },
                    "file_field": {
                      "type": "string",
                      "description": "Exact arbitrary multipart file-part name to bind this scan. A scan does not replace passport metadata."
                    }
                  },
                  "description": "International readiness needs number, date_of_issue, expiry_date, place_of_issue and passport or passenger nationality for every passenger."
                },
                "documents": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "VISA",
                          "IQAMA",
                          "PR_CARD",
                          "GREEN_CARD"
                        ],
                        "description": "Supporting document type."
                      },
                      "document_number": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Document number."
                      },
                      "issuing_country": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Issuing country code."
                      },
                      "expiry_date": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Expiry date; use YYYY-MM-DD."
                      },
                      "document_url": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Existing document URL."
                      },
                      "file_field": {
                        "type": "string",
                        "description": "Exact arbitrary multipart file-part name for this document."
                      }
                    },
                    "required": [
                      "type"
                    ]
                  },
                  "description": "Supporting documents."
                },
                "seat_preference": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "row_preference": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "front",
                        "middle",
                        "rear",
                        null
                      ],
                      "description": "Preferred cabin row."
                    },
                    "column_preference": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "window",
                        "middle",
                        "aisle",
                        null
                      ],
                      "description": "Preferred seat column."
                    }
                  },
                  "description": "Passenger seat preferences."
                }
              },
              "required": [
                "first_name",
                "last_name"
              ]
            },
            "description": "Complete passenger array. Updates replace the entire stored array; retain all authoritative passenger and document data.",
            "minItems": 1
          },
          "callbackData": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "clientId": {
                "type": "string",
                "description": "Optional; defaults to authenticated enterprise identity."
              },
              "clientName": {
                "type": "string",
                "description": "Optional; defaults to authenticated enterprise identity."
              },
              "callbackUrl": {
                "type": "string",
                "description": "Callback URL. Use HTTPS for secure delivery; HTTPS is guidance, not an enforced restriction.",
                "format": "uri"
              },
              "auth_header": {
                "type": "string",
                "description": "Exactly one colon: X-API-Key: value or Authorization: Bearer value. Header names are case-insensitive. Empty values and CR/LF are rejected.",
                "pattern": "^[^\\S\\r\\n]*(?:[xX]-[aA][pP][iI]-[kK][eE][yY]|[aA][uU][tT][hH][oO][rR][iI][zZ][aA][tT][iI][oO][nN])[^\\S\\r\\n]*:[^:\\r\\n]*[^\\s:\\r\\n][^:\\r\\n]*$"
              }
            },
            "required": [
              "callbackUrl",
              "auth_header"
            ],
            "description": "Optional callback configuration. callbackUrl and auth_header are required when supplied."
          }
        },
        "required": [
          "flights",
          "passengers"
        ]
      },
      "UpdateRequest": {
        "type": "object",
        "properties": {
          "checkin_id": {
            "type": "string",
            "description": "Check-in identifier. Takes precedence over booking_id."
          },
          "webcheckin_id": {
            "type": "string",
            "description": "Compatibility alias for checkin_id."
          },
          "booking_id": {
            "type": [
              "integer",
              "string"
            ],
            "description": "Booking identifier; usable without uploads. Uploads require checkin_id or webcheckin_id."
          },
          "type": {
            "type": "string",
            "enum": [
              "passengers",
              "pnr"
            ],
            "description": "Update type. Can be omitted when top-level passengers is supplied."
          },
          "operation": {
            "type": "string",
            "enum": [
              "update"
            ],
            "default": "update",
            "description": "Only update is supported; defaults to update."
          },
          "passengers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "first_name": {
                  "type": "string",
                  "description": "First name.",
                  "minLength": 1
                },
                "last_name": {
                  "type": "string",
                  "description": "Last name.",
                  "minLength": 1
                },
                "email": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Contact email. At least one valid passenger email is needed for readiness; malformed or absent email does not structurally reject subscribe."
                },
                "country_code": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Phone country prefix, for example +91."
                },
                "phone": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Phone number."
                },
                "date_of_birth": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Date of birth; use YYYY-MM-DD."
                },
                "nationality": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Nationality country code, for example IN."
                },
                "country_of_residence": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Residence country code."
                },
                "passport": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "number": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Passport number."
                    },
                    "date_of_issue": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Issue date; use YYYY-MM-DD."
                    },
                    "expiry_date": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Expiry date; use YYYY-MM-DD."
                    },
                    "place_of_issue": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Place of issue."
                    },
                    "nationality": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Nationality country code; passenger nationality is a readiness fallback."
                    },
                    "document_url": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Existing passport document URL."
                    },
                    "file_field": {
                      "type": "string",
                      "description": "Exact arbitrary multipart file-part name to bind this scan. A scan does not replace passport metadata."
                    }
                  },
                  "description": "International readiness needs number, date_of_issue, expiry_date, place_of_issue and passport or passenger nationality for every passenger."
                },
                "documents": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "VISA",
                          "IQAMA",
                          "PR_CARD",
                          "GREEN_CARD"
                        ],
                        "description": "Supporting document type."
                      },
                      "document_number": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Document number."
                      },
                      "issuing_country": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Issuing country code."
                      },
                      "expiry_date": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Expiry date; use YYYY-MM-DD."
                      },
                      "document_url": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Existing document URL."
                      },
                      "file_field": {
                        "type": "string",
                        "description": "Exact arbitrary multipart file-part name for this document."
                      }
                    },
                    "required": [
                      "type"
                    ]
                  },
                  "description": "Supporting documents."
                },
                "seat_preference": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "row_preference": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "front",
                        "middle",
                        "rear",
                        null
                      ],
                      "description": "Preferred cabin row."
                    },
                    "column_preference": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "window",
                        "middle",
                        "aisle",
                        null
                      ],
                      "description": "Preferred seat column."
                    }
                  },
                  "description": "Passenger seat preferences."
                }
              },
              "required": [
                "first_name",
                "last_name"
              ]
            },
            "description": "Complete passenger array. Updates replace the entire stored array; retain all authoritative passenger and document data.",
            "minItems": 1
          },
          "payload": {
            "type": "object",
            "properties": {
              "passengers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "first_name": {
                      "type": "string",
                      "description": "First name.",
                      "minLength": 1
                    },
                    "last_name": {
                      "type": "string",
                      "description": "Last name.",
                      "minLength": 1
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Contact email. At least one valid passenger email is needed for readiness; malformed or absent email does not structurally reject subscribe."
                    },
                    "country_code": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Phone country prefix, for example +91."
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Phone number."
                    },
                    "date_of_birth": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Date of birth; use YYYY-MM-DD."
                    },
                    "nationality": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Nationality country code, for example IN."
                    },
                    "country_of_residence": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Residence country code."
                    },
                    "passport": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "number": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Passport number."
                        },
                        "date_of_issue": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Issue date; use YYYY-MM-DD."
                        },
                        "expiry_date": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Expiry date; use YYYY-MM-DD."
                        },
                        "place_of_issue": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Place of issue."
                        },
                        "nationality": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Nationality country code; passenger nationality is a readiness fallback."
                        },
                        "document_url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Existing passport document URL."
                        },
                        "file_field": {
                          "type": "string",
                          "description": "Exact arbitrary multipart file-part name to bind this scan. A scan does not replace passport metadata."
                        }
                      },
                      "description": "International readiness needs number, date_of_issue, expiry_date, place_of_issue and passport or passenger nationality for every passenger."
                    },
                    "documents": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "VISA",
                              "IQAMA",
                              "PR_CARD",
                              "GREEN_CARD"
                            ],
                            "description": "Supporting document type."
                          },
                          "document_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Document number."
                          },
                          "issuing_country": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Issuing country code."
                          },
                          "expiry_date": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Expiry date; use YYYY-MM-DD."
                          },
                          "document_url": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Existing document URL."
                          },
                          "file_field": {
                            "type": "string",
                            "description": "Exact arbitrary multipart file-part name for this document."
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      "description": "Supporting documents."
                    },
                    "seat_preference": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "row_preference": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "front",
                            "middle",
                            "rear",
                            null
                          ],
                          "description": "Preferred cabin row."
                        },
                        "column_preference": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "window",
                            "middle",
                            "aisle",
                            null
                          ],
                          "description": "Preferred seat column."
                        }
                      },
                      "description": "Passenger seat preferences."
                    }
                  },
                  "required": [
                    "first_name",
                    "last_name"
                  ]
                },
                "description": "Complete passenger array. Updates replace the entire stored array; retain all authoritative passenger and document data.",
                "minItems": 1
              },
              "pnr": {
                "type": "string",
                "description": "New nonempty PNR; required for type pnr. Top-level pnr is not read.",
                "minLength": 1
              }
            }
          }
        },
        "allOf": [
          {
            "anyOf": [
              {
                "required": [
                  "checkin_id"
                ]
              },
              {
                "required": [
                  "webcheckin_id"
                ]
              },
              {
                "required": [
                  "booking_id"
                ]
              }
            ]
          },
          {
            "anyOf": [
              {
                "required": [
                  "type",
                  "payload"
                ],
                "properties": {
                  "type": {
                    "const": "pnr"
                  },
                  "payload": {
                    "required": [
                      "pnr"
                    ]
                  }
                }
              },
              {
                "required": [
                  "passengers"
                ],
                "properties": {
                  "type": {
                    "const": "passengers"
                  }
                }
              },
              {
                "required": [
                  "type",
                  "payload"
                ],
                "properties": {
                  "type": {
                    "const": "passengers"
                  },
                  "payload": {
                    "required": [
                      "passengers"
                    ]
                  }
                }
              }
            ]
          }
        ]
      },
      "SubscribeMultipartRequest": {
        "type": "object",
        "properties": {
          "pnr": {
            "type": "string",
            "description": "Airline record locator. Missing or invalid PNR is recorded as missing information, rather than a structural rejection."
          },
          "flights": {
            "type": "string",
            "description": "JSON-stringified Flight[]; must satisfy the Flight schema.",
            "contentMediaType": "application/json",
            "contentSchema": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "airline": {
                    "type": "string",
                    "description": "Airline IATA code; use two alphanumeric characters, for example AI or 6E.",
                    "minLength": 1
                  },
                  "flight_number": {
                    "type": "string",
                    "description": "Flight number.",
                    "minLength": 1
                  },
                  "origin": {
                    "type": "string",
                    "description": "Origin IATA airport code; use three letters.",
                    "minLength": 1
                  },
                  "destination": {
                    "type": "string",
                    "description": "Destination IATA airport code; use three letters.",
                    "minLength": 1
                  },
                  "departure_datetime": {
                    "type": "string",
                    "description": "Origin-airport local wall clock. Prefer YYYY-MM-DDTHH:mm:ss without suffix. A supplied Z or numeric offset is ignored, never converted. Calendar and airport timezone validity are checked separately.",
                    "pattern": "^\\s*\\d{4}-\\d{2}-\\d{2}[T ]\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,3})?)?(?:Z|[+-](?:[01]\\d|2[0-3]):?[0-5]\\d)?\\s*$"
                  },
                  "arrival_datetime": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Destination-airport local wall clock. Prefer YYYY-MM-DDTHH:mm:ss without suffix. A supplied Z or numeric offset is ignored, never converted. Calendar and airport timezone validity are checked separately.",
                    "pattern": "^\\s*\\d{4}-\\d{2}-\\d{2}[T ]\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,3})?)?(?:Z|[+-](?:[01]\\d|2[0-3]):?[0-5]\\d)?\\s*$"
                  }
                },
                "required": [
                  "airline",
                  "flight_number",
                  "origin",
                  "destination",
                  "departure_datetime"
                ]
              },
              "description": "One-way connected itinerary operated by one airline. First departure must be at least six hours away.",
              "minItems": 1
            }
          },
          "passengers": {
            "type": "string",
            "description": "JSON-stringified Passenger[]; must satisfy the Passenger schema.",
            "contentMediaType": "application/json",
            "contentSchema": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "first_name": {
                    "type": "string",
                    "description": "First name.",
                    "minLength": 1
                  },
                  "last_name": {
                    "type": "string",
                    "description": "Last name.",
                    "minLength": 1
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Contact email. At least one valid passenger email is needed for readiness; malformed or absent email does not structurally reject subscribe."
                  },
                  "country_code": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Phone country prefix, for example +91."
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Phone number."
                  },
                  "date_of_birth": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Date of birth; use YYYY-MM-DD."
                  },
                  "nationality": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Nationality country code, for example IN."
                  },
                  "country_of_residence": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Residence country code."
                  },
                  "passport": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "number": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Passport number."
                      },
                      "date_of_issue": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Issue date; use YYYY-MM-DD."
                      },
                      "expiry_date": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Expiry date; use YYYY-MM-DD."
                      },
                      "place_of_issue": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Place of issue."
                      },
                      "nationality": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Nationality country code; passenger nationality is a readiness fallback."
                      },
                      "document_url": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Existing passport document URL."
                      },
                      "file_field": {
                        "type": "string",
                        "description": "Exact arbitrary multipart file-part name to bind this scan. A scan does not replace passport metadata."
                      }
                    },
                    "description": "International readiness needs number, date_of_issue, expiry_date, place_of_issue and passport or passenger nationality for every passenger."
                  },
                  "documents": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "VISA",
                            "IQAMA",
                            "PR_CARD",
                            "GREEN_CARD"
                          ],
                          "description": "Supporting document type."
                        },
                        "document_number": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Document number."
                        },
                        "issuing_country": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Issuing country code."
                        },
                        "expiry_date": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Expiry date; use YYYY-MM-DD."
                        },
                        "document_url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Existing document URL."
                        },
                        "file_field": {
                          "type": "string",
                          "description": "Exact arbitrary multipart file-part name for this document."
                        }
                      },
                      "required": [
                        "type"
                      ]
                    },
                    "description": "Supporting documents."
                  },
                  "seat_preference": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "row_preference": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "front",
                          "middle",
                          "rear",
                          null
                        ],
                        "description": "Preferred cabin row."
                      },
                      "column_preference": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "window",
                          "middle",
                          "aisle",
                          null
                        ],
                        "description": "Preferred seat column."
                      }
                    },
                    "description": "Passenger seat preferences."
                  }
                },
                "required": [
                  "first_name",
                  "last_name"
                ]
              },
              "description": "Complete passenger array. Updates replace the entire stored array; retain all authoritative passenger and document data.",
              "minItems": 1
            }
          },
          "callbackData": {
            "type": "string",
            "description": "JSON-stringified CallbackData, if supplied.",
            "contentMediaType": "application/json",
            "contentSchema": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "clientId": {
                  "type": "string",
                  "description": "Optional; defaults to authenticated enterprise identity."
                },
                "clientName": {
                  "type": "string",
                  "description": "Optional; defaults to authenticated enterprise identity."
                },
                "callbackUrl": {
                  "type": "string",
                  "description": "Callback URL. Use HTTPS for secure delivery; HTTPS is guidance, not an enforced restriction.",
                  "format": "uri"
                },
                "auth_header": {
                  "type": "string",
                  "description": "Exactly one colon: X-API-Key: value or Authorization: Bearer value. Header names are case-insensitive. Empty values and CR/LF are rejected.",
                  "pattern": "^[^\\S\\r\\n]*(?:[xX]-[aA][pP][iI]-[kK][eE][yY]|[aA][uU][tT][hH][oO][rR][iI][zZ][aA][tT][iI][oO][nN])[^\\S\\r\\n]*:[^:\\r\\n]*[^\\s:\\r\\n][^:\\r\\n]*$"
                }
              },
              "required": [
                "callbackUrl",
                "auth_header"
              ],
              "description": "Optional callback configuration. callbackUrl and auth_header are required when supplied."
            }
          }
        },
        "required": [
          "flights",
          "passengers"
        ],
        "additionalProperties": {
          "type": "string",
          "format": "binary",
          "description": "Arbitrary file-part name referenced by passport.file_field or documents[].file_field. PDF or image; up to 10 MiB each and 30 files. Set the multipart boundary through your HTTP client."
        }
      },
      "UpdateMultipartRequest": {
        "type": "object",
        "properties": {
          "checkin_id": {
            "type": "string",
            "description": "Check-in identifier. Takes precedence over booking_id."
          },
          "webcheckin_id": {
            "type": "string",
            "description": "Compatibility alias for checkin_id."
          },
          "booking_id": {
            "type": "string",
            "description": "Booking ID without files; uploads require checkin_id or webcheckin_id."
          },
          "type": {
            "type": "string",
            "enum": [
              "passengers",
              "pnr"
            ],
            "description": "Update type. Can be omitted when top-level passengers is supplied."
          },
          "operation": {
            "type": "string",
            "enum": [
              "update"
            ],
            "default": "update",
            "description": "Only update is supported; defaults to update."
          },
          "passengers": {
            "type": "string",
            "description": "JSON-stringified complete Passenger[].",
            "contentMediaType": "application/json",
            "contentSchema": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "first_name": {
                    "type": "string",
                    "description": "First name.",
                    "minLength": 1
                  },
                  "last_name": {
                    "type": "string",
                    "description": "Last name.",
                    "minLength": 1
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Contact email. At least one valid passenger email is needed for readiness; malformed or absent email does not structurally reject subscribe."
                  },
                  "country_code": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Phone country prefix, for example +91."
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Phone number."
                  },
                  "date_of_birth": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Date of birth; use YYYY-MM-DD."
                  },
                  "nationality": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Nationality country code, for example IN."
                  },
                  "country_of_residence": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Residence country code."
                  },
                  "passport": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "number": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Passport number."
                      },
                      "date_of_issue": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Issue date; use YYYY-MM-DD."
                      },
                      "expiry_date": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Expiry date; use YYYY-MM-DD."
                      },
                      "place_of_issue": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Place of issue."
                      },
                      "nationality": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Nationality country code; passenger nationality is a readiness fallback."
                      },
                      "document_url": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Existing passport document URL."
                      },
                      "file_field": {
                        "type": "string",
                        "description": "Exact arbitrary multipart file-part name to bind this scan. A scan does not replace passport metadata."
                      }
                    },
                    "description": "International readiness needs number, date_of_issue, expiry_date, place_of_issue and passport or passenger nationality for every passenger."
                  },
                  "documents": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "VISA",
                            "IQAMA",
                            "PR_CARD",
                            "GREEN_CARD"
                          ],
                          "description": "Supporting document type."
                        },
                        "document_number": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Document number."
                        },
                        "issuing_country": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Issuing country code."
                        },
                        "expiry_date": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Expiry date; use YYYY-MM-DD."
                        },
                        "document_url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Existing document URL."
                        },
                        "file_field": {
                          "type": "string",
                          "description": "Exact arbitrary multipart file-part name for this document."
                        }
                      },
                      "required": [
                        "type"
                      ]
                    },
                    "description": "Supporting documents."
                  },
                  "seat_preference": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "row_preference": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "front",
                          "middle",
                          "rear",
                          null
                        ],
                        "description": "Preferred cabin row."
                      },
                      "column_preference": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "window",
                          "middle",
                          "aisle",
                          null
                        ],
                        "description": "Preferred seat column."
                      }
                    },
                    "description": "Passenger seat preferences."
                  }
                },
                "required": [
                  "first_name",
                  "last_name"
                ]
              },
              "description": "Complete passenger array. Updates replace the entire stored array; retain all authoritative passenger and document data.",
              "minItems": 1
            }
          },
          "payload": {
            "type": "string",
            "description": "JSON-stringified update payload containing passengers or pnr.",
            "contentMediaType": "application/json",
            "contentSchema": {
              "type": "object",
              "properties": {
                "passengers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "first_name": {
                        "type": "string",
                        "description": "First name.",
                        "minLength": 1
                      },
                      "last_name": {
                        "type": "string",
                        "description": "Last name.",
                        "minLength": 1
                      },
                      "email": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Contact email. At least one valid passenger email is needed for readiness; malformed or absent email does not structurally reject subscribe."
                      },
                      "country_code": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Phone country prefix, for example +91."
                      },
                      "phone": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Phone number."
                      },
                      "date_of_birth": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Date of birth; use YYYY-MM-DD."
                      },
                      "nationality": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Nationality country code, for example IN."
                      },
                      "country_of_residence": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Residence country code."
                      },
                      "passport": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Passport number."
                          },
                          "date_of_issue": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Issue date; use YYYY-MM-DD."
                          },
                          "expiry_date": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Expiry date; use YYYY-MM-DD."
                          },
                          "place_of_issue": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Place of issue."
                          },
                          "nationality": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Nationality country code; passenger nationality is a readiness fallback."
                          },
                          "document_url": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Existing passport document URL."
                          },
                          "file_field": {
                            "type": "string",
                            "description": "Exact arbitrary multipart file-part name to bind this scan. A scan does not replace passport metadata."
                          }
                        },
                        "description": "International readiness needs number, date_of_issue, expiry_date, place_of_issue and passport or passenger nationality for every passenger."
                      },
                      "documents": {
                        "type": [
                          "array",
                          "null"
                        ],
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "VISA",
                                "IQAMA",
                                "PR_CARD",
                                "GREEN_CARD"
                              ],
                              "description": "Supporting document type."
                            },
                            "document_number": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Document number."
                            },
                            "issuing_country": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Issuing country code."
                            },
                            "expiry_date": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Expiry date; use YYYY-MM-DD."
                            },
                            "document_url": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Existing document URL."
                            },
                            "file_field": {
                              "type": "string",
                              "description": "Exact arbitrary multipart file-part name for this document."
                            }
                          },
                          "required": [
                            "type"
                          ]
                        },
                        "description": "Supporting documents."
                      },
                      "seat_preference": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "row_preference": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "front",
                              "middle",
                              "rear",
                              null
                            ],
                            "description": "Preferred cabin row."
                          },
                          "column_preference": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "window",
                              "middle",
                              "aisle",
                              null
                            ],
                            "description": "Preferred seat column."
                          }
                        },
                        "description": "Passenger seat preferences."
                      }
                    },
                    "required": [
                      "first_name",
                      "last_name"
                    ]
                  },
                  "description": "Complete passenger array. Updates replace the entire stored array; retain all authoritative passenger and document data.",
                  "minItems": 1
                },
                "pnr": {
                  "type": "string",
                  "description": "New nonempty PNR; required for type pnr. Top-level pnr is not read.",
                  "minLength": 1
                }
              }
            }
          }
        },
        "allOf": [
          {
            "anyOf": [
              {
                "required": [
                  "checkin_id"
                ]
              },
              {
                "required": [
                  "webcheckin_id"
                ]
              },
              {
                "required": [
                  "booking_id"
                ]
              }
            ]
          },
          {
            "anyOf": [
              {
                "required": [
                  "passengers"
                ]
              },
              {
                "required": [
                  "payload"
                ]
              }
            ]
          }
        ],
        "additionalProperties": {
          "type": "string",
          "format": "binary",
          "description": "Arbitrary file-part name referenced by passport.file_field or documents[].file_field. PDF or image; up to 10 MiB each and 30 files. Set the multipart boundary through your HTTP client."
        }
      },
      "MissingInfoItem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Missing-information code, for example MISSING_EMAIL or MISSING_PASSPORT."
          }
        },
        "required": [
          "type"
        ]
      },
      "Attempt": {
        "type": "object",
        "properties": {
          "checkin_id": {
            "type": "string",
            "description": "Public check-in identifier."
          },
          "booking_id": {
            "type": "integer",
            "description": "Booking identifier."
          },
          "status": {
            "type": "string",
            "enum": [
              "SCHEDULED",
              "IN_PROGRESS",
              "COMPLETED",
              "FAILED",
              "CANCELLED"
            ],
            "description": "Normalized partner-facing status."
          },
          "sub_status": {
            "type": "string",
            "description": "Detailed status; may be empty or free-form."
          },
          "checkin_message": {
            "type": "string",
            "description": "Human-readable explanation."
          },
          "missing_info": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Missing-information code, for example MISSING_EMAIL or MISSING_PASSPORT."
                }
              },
              "required": [
                "type"
              ]
            },
            "description": "Missing information needed before check-in can proceed."
          },
          "boarding_passes": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Boarding-pass URL."
            },
            "description": "Boarding-pass URLs. COMPLETED can still have an empty array; inspect sub_status and this array."
          },
          "last_updated": {
            "type": "string",
            "description": "Latest update as a UTC instant.",
            "format": "date-time"
          }
        },
        "required": [
          "checkin_id",
          "booking_id",
          "status",
          "sub_status",
          "checkin_message",
          "missing_info",
          "boarding_passes",
          "last_updated"
        ]
      },
      "SubscribeResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true,
            "description": "Operation succeeded."
          },
          "message": {
            "type": "string",
            "enum": [
              "SCHEDULED",
              "ALREADY_SUBSCRIBED"
            ],
            "description": "A new subscription or reuse of an active attempt."
          },
          "booking_id": {
            "type": "integer",
            "description": "Booking identifier."
          },
          "checkin_id": {
            "type": "string",
            "description": "Check-in identifier."
          },
          "status": {
            "type": "string",
            "enum": [
              "SCHEDULED",
              "IN_PROGRESS",
              "COMPLETED",
              "FAILED",
              "CANCELLED"
            ],
            "description": "Normalized partner-facing status."
          },
          "sub_status": {
            "type": "string",
            "description": "Detailed status."
          },
          "missing_info": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Missing-information code, for example MISSING_EMAIL or MISSING_PASSPORT."
                }
              },
              "required": [
                "type"
              ]
            },
            "description": "Missing information needed before check-in can proceed."
          },
          "status_message": {
            "type": "string",
            "description": "Human-readable explanation."
          },
          "quota": {
            "type": "object",
            "properties": {
              "included_units": {
                "type": "integer",
                "description": "Included entitlement units."
              },
              "consumed_units": {
                "type": "integer",
                "description": "Consumed entitlement units."
              }
            },
            "required": [
              "included_units",
              "consumed_units"
            ]
          }
        },
        "required": [
          "success",
          "message",
          "booking_id",
          "checkin_id",
          "status",
          "sub_status",
          "missing_info",
          "status_message"
        ]
      },
      "StatusResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true,
            "description": "Operation succeeded."
          },
          "checkin_id": {
            "type": "string",
            "description": "Public check-in identifier."
          },
          "booking_id": {
            "type": "integer",
            "description": "Booking identifier."
          },
          "status": {
            "type": "string",
            "enum": [
              "SCHEDULED",
              "IN_PROGRESS",
              "COMPLETED",
              "FAILED",
              "CANCELLED"
            ],
            "description": "Normalized partner-facing status."
          },
          "sub_status": {
            "type": "string",
            "description": "Detailed status; may be empty or free-form."
          },
          "checkin_message": {
            "type": "string",
            "description": "Human-readable explanation."
          },
          "missing_info": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Missing-information code, for example MISSING_EMAIL or MISSING_PASSPORT."
                }
              },
              "required": [
                "type"
              ]
            },
            "description": "Missing information needed before check-in can proceed."
          },
          "boarding_passes": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Boarding-pass URL."
            },
            "description": "Boarding-pass URLs. COMPLETED can still have an empty array; inspect sub_status and this array."
          },
          "last_updated": {
            "type": "string",
            "description": "Latest update as a UTC instant.",
            "format": "date-time"
          }
        },
        "required": [
          "success",
          "checkin_id",
          "booking_id",
          "status",
          "sub_status",
          "checkin_message",
          "missing_info",
          "boarding_passes",
          "last_updated"
        ]
      },
      "CheckinRequestSummary": {
        "type": "object",
        "properties": {
          "checkin_id": {
            "type": "string",
            "description": "Public check-in identifier."
          },
          "booking_id": {
            "type": "integer",
            "description": "Booking identifier."
          },
          "status": {
            "type": "string",
            "enum": [
              "SCHEDULED",
              "IN_PROGRESS",
              "COMPLETED",
              "FAILED",
              "CANCELLED"
            ],
            "description": "Normalized partner-facing status."
          },
          "sub_status": {
            "type": "string",
            "description": "Detailed status; may be empty or free-form."
          },
          "checkin_message": {
            "type": "string",
            "description": "Human-readable explanation."
          },
          "missing_info": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Missing-information code, for example MISSING_EMAIL or MISSING_PASSPORT."
                }
              },
              "required": [
                "type"
              ]
            },
            "description": "Missing information needed before check-in can proceed."
          },
          "boarding_passes": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Boarding-pass URL."
            },
            "description": "Boarding-pass URLs. COMPLETED can still have an empty array; inspect sub_status and this array."
          },
          "last_updated": {
            "type": "string",
            "description": "Latest update as a UTC instant.",
            "format": "date-time"
          },
          "pnr": {
            "type": [
              "string",
              "null"
            ],
            "description": "Airline record locator."
          },
          "origin": {
            "type": [
              "string",
              "null"
            ],
            "description": "Origin IATA airport code."
          },
          "destination": {
            "type": [
              "string",
              "null"
            ],
            "description": "Destination IATA airport code."
          },
          "departure_datetime": {
            "type": [
              "string",
              "null"
            ],
            "description": "Origin-local departure wall clock serialized with a legacy Z suffix. Do not treat this suffix as UTC.",
            "pattern": "^\\s*\\d{4}-\\d{2}-\\d{2}[T ]\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,3})?)?(?:Z|[+-](?:[01]\\d|2[0-3]):?[0-5]\\d)?\\s*$"
          },
          "airline": {
            "type": [
              "string",
              "null"
            ],
            "description": "Airline IATA code."
          },
          "flight_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "Flight number."
          },
          "scheduled_time": {
            "type": [
              "string",
              "null"
            ],
            "description": "Scheduled automation time as a UTC instant, or null.",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "description": "Creation as a UTC instant.",
            "format": "date-time"
          }
        },
        "required": [
          "checkin_id",
          "booking_id",
          "status",
          "sub_status",
          "checkin_message",
          "missing_info",
          "boarding_passes",
          "last_updated",
          "pnr",
          "origin",
          "destination",
          "departure_datetime",
          "airline",
          "flight_number",
          "scheduled_time",
          "created_at"
        ]
      },
      "Pagination": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "description": "Zero-based page."
          },
          "limit": {
            "type": "integer",
            "description": "Applied page size."
          },
          "total": {
            "type": "integer",
            "description": "Matching items."
          },
          "totalPages": {
            "type": "integer",
            "description": "Total pages."
          }
        },
        "required": [
          "page",
          "limit",
          "total",
          "totalPages"
        ]
      },
      "ListResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true,
            "description": "Operation succeeded."
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "checkin_id": {
                  "type": "string",
                  "description": "Public check-in identifier."
                },
                "booking_id": {
                  "type": "integer",
                  "description": "Booking identifier."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "SCHEDULED",
                    "IN_PROGRESS",
                    "COMPLETED",
                    "FAILED",
                    "CANCELLED"
                  ],
                  "description": "Normalized partner-facing status."
                },
                "sub_status": {
                  "type": "string",
                  "description": "Detailed status; may be empty or free-form."
                },
                "checkin_message": {
                  "type": "string",
                  "description": "Human-readable explanation."
                },
                "missing_info": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "Missing-information code, for example MISSING_EMAIL or MISSING_PASSPORT."
                      }
                    },
                    "required": [
                      "type"
                    ]
                  },
                  "description": "Missing information needed before check-in can proceed."
                },
                "boarding_passes": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "description": "Boarding-pass URL."
                  },
                  "description": "Boarding-pass URLs. COMPLETED can still have an empty array; inspect sub_status and this array."
                },
                "last_updated": {
                  "type": "string",
                  "description": "Latest update as a UTC instant.",
                  "format": "date-time"
                },
                "pnr": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Airline record locator."
                },
                "origin": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Origin IATA airport code."
                },
                "destination": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Destination IATA airport code."
                },
                "departure_datetime": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Origin-local departure wall clock serialized with a legacy Z suffix. Do not treat this suffix as UTC.",
                  "pattern": "^\\s*\\d{4}-\\d{2}-\\d{2}[T ]\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,3})?)?(?:Z|[+-](?:[01]\\d|2[0-3]):?[0-5]\\d)?\\s*$"
                },
                "airline": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Airline IATA code."
                },
                "flight_number": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Flight number."
                },
                "scheduled_time": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Scheduled automation time as a UTC instant, or null.",
                  "format": "date-time"
                },
                "created_at": {
                  "type": "string",
                  "description": "Creation as a UTC instant.",
                  "format": "date-time"
                }
              },
              "required": [
                "checkin_id",
                "booking_id",
                "status",
                "sub_status",
                "checkin_message",
                "missing_info",
                "boarding_passes",
                "last_updated",
                "pnr",
                "origin",
                "destination",
                "departure_datetime",
                "airline",
                "flight_number",
                "scheduled_time",
                "created_at"
              ]
            },
            "description": "Enterprise-scoped request summaries."
          },
          "pagination": {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer",
                "description": "Zero-based page."
              },
              "limit": {
                "type": "integer",
                "description": "Applied page size."
              },
              "total": {
                "type": "integer",
                "description": "Matching items."
              },
              "totalPages": {
                "type": "integer",
                "description": "Total pages."
              }
            },
            "required": [
              "page",
              "limit",
              "total",
              "totalPages"
            ]
          }
        },
        "required": [
          "success",
          "data",
          "pagination"
        ]
      },
      "UpdateResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true,
            "description": "Operation succeeded."
          },
          "type": {
            "type": "string",
            "enum": [
              "passengers",
              "pnr"
            ],
            "description": "Update type. Can be omitted when top-level passengers is supplied."
          },
          "operation": {
            "type": "string",
            "const": "update"
          },
          "data": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "checkin_id": {
                    "type": "string",
                    "description": "Public check-in identifier."
                  },
                  "booking_id": {
                    "type": "integer",
                    "description": "Booking identifier."
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "SCHEDULED",
                      "IN_PROGRESS",
                      "COMPLETED",
                      "FAILED",
                      "CANCELLED"
                    ],
                    "description": "Normalized partner-facing status."
                  },
                  "sub_status": {
                    "type": "string",
                    "description": "Detailed status; may be empty or free-form."
                  },
                  "checkin_message": {
                    "type": "string",
                    "description": "Human-readable explanation."
                  },
                  "missing_info": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Missing-information code, for example MISSING_EMAIL or MISSING_PASSPORT."
                        }
                      },
                      "required": [
                        "type"
                      ]
                    },
                    "description": "Missing information needed before check-in can proceed."
                  },
                  "boarding_passes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "Boarding-pass URL."
                    },
                    "description": "Boarding-pass URLs. COMPLETED can still have an empty array; inspect sub_status and this array."
                  },
                  "last_updated": {
                    "type": "string",
                    "description": "Latest update as a UTC instant.",
                    "format": "date-time"
                  }
                },
                "required": [
                  "checkin_id",
                  "booking_id",
                  "status",
                  "sub_status",
                  "checkin_message",
                  "missing_info",
                  "boarding_passes",
                  "last_updated"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "booking_id": {
                    "type": "integer",
                    "description": "Booking identifier when no attempt exists."
                  }
                },
                "required": [
                  "booking_id"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "required": [
          "success",
          "type",
          "operation",
          "data"
        ]
      },
      "WebhookEvent": {
        "type": "object",
        "properties": {
          "event": {
            "type": "string",
            "const": "webcheckin.update"
          },
          "event_id": {
            "type": "string",
            "description": "Opaque event identity. Deduplicate by this value."
          },
          "occurredAt": {
            "type": "string",
            "description": "Event time as a UTC instant.",
            "format": "date-time"
          },
          "checkin_id": {
            "type": "string",
            "description": "Public check-in identifier."
          },
          "changes": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "SCHEDULED",
                  "IN_PROGRESS",
                  "COMPLETED",
                  "FAILED",
                  "CANCELLED"
                ],
                "description": "Normalized partner-facing status."
              },
              "sub_status": {
                "type": "string",
                "description": "Detailed status; may be empty or free-form."
              },
              "checkin_message": {
                "type": "string",
                "description": "Human-readable explanation."
              },
              "missing_info": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "Missing-information code, for example MISSING_EMAIL or MISSING_PASSPORT."
                    }
                  },
                  "required": [
                    "type"
                  ]
                },
                "description": "Missing information needed before check-in can proceed."
              },
              "boarding_passes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "Boarding-pass URL."
                },
                "description": "Boarding-pass URLs. COMPLETED can still have an empty array; inspect sub_status and this array."
              }
            },
            "required": [
              "status",
              "sub_status",
              "checkin_message",
              "missing_info",
              "boarding_passes"
            ]
          }
        },
        "required": [
          "event",
          "event_id",
          "occurredAt",
          "checkin_id",
          "changes"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": false
          },
          "error": {
            "type": "string",
            "description": "Error string; authentication uses human-readable strings, not a fixed enum."
          },
          "message": {
            "type": "string",
            "description": "Human-readable explanation."
          },
          "reason_code": {
            "type": "string",
            "description": "Optional journey rejection code."
          },
          "details": {
            "description": "Optional handler-specific details."
          },
          "retryAfter": {
            "type": "integer",
            "description": "Rate-limit retry delay in seconds."
          },
          "quota": {
            "type": "object",
            "properties": {
              "included_units": {
                "type": "integer",
                "description": "Included entitlement units."
              },
              "consumed_units": {
                "type": "integer",
                "description": "Consumed entitlement units."
              }
            },
            "required": [
              "included_units",
              "consumed_units"
            ]
          }
        }
      },
      "StatusQuery": {
        "type": "object",
        "properties": {
          "checkin_id": {
            "type": "string",
            "description": "Check-in identifier; checkinId compatibility alias is also accepted."
          }
        },
        "required": [
          "checkin_id"
        ]
      },
      "RequestsQuery": {
        "type": "object",
        "properties": {
          "page": {
            "type": "string",
            "description": "Use a zero-based integer; invalid or negative input falls back to 0."
          },
          "limit": {
            "type": "string",
            "description": "Use an integer; defaults to 25 and clamps to 1–100."
          },
          "status": {
            "type": "string",
            "description": "Optional normalized status filter. Unknown values are ignored."
          }
        }
      }
    }
  },
  "externalDocs": {
    "description": "Public developer reference",
    "url": "https://www.flyo.ai/en/api-docs"
  }
}
