{
  "openapi": "3.0.1",
  "info": {
    "title": "QuickOTA Developer API",
    "description": "Search, book, ticket and service flights through your QuickOTA agency account. Guides, error codes and AI-ready documentation: see the developer docs.",
    "contact": {
      "name": "Developer docs",
      "url": "https://quickota.com/developers"
    },
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://quickota.com/api/v1",
      "description": "QuickOTA Developer API"
    }
  ],
  "paths": {
    "/account": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Returns the calling API key's id and scopes. Use it to check a key works.",
        "description": "**Scope:** `account:read`",
        "operationId": "account_get",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDtoApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/account/balance": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Your wallet balance — what issuing a booking can spend. Check it before\r\nissuing to avoid `account.insufficient_balance`.",
        "description": "**Scope:** `account:read`",
        "operationId": "account_balance",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceDtoApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/account/usage": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Your API usage per day, your limits (rate, daily and monthly search\r\nquotas) and your look-to-book standing.",
        "description": "**Scope:** `account:read`",
        "operationId": "account_usage",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgencyApiUsageDtoApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/flights/bookings": {
      "post": {
        "tags": [
          "Flight bookings"
        ],
        "summary": "Holds an offer: the airline reserves the seats and the booking becomes\r\n`held` until `deadlines.holdExpiresAt`. Nothing is charged yet.\r\nRequires an `Idempotency-Key`; retry with the same key after a\r\ntimeout to get the same booking back.",
        "description": "**Scope:** `flights:book`",
        "operationId": "flight_bookings_create",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Unique value (UUID) per operation; send the same value when retrying. See the Idempotency guide.",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFlightBookingV1"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFlightBookingV1"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFlightBookingV1"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlightBookingV1ApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "Flight bookings"
        ],
        "summary": "Lists bookings of this environment, newest first. `needsAction=true`\r\nreturns only bookings waiting on you: held (issue before the deadline),\r\nissuing, a servicing quote to decide, or a schedule change to answer.",
        "description": "**Scope:** `flights:read`",
        "operationId": "flight_bookings_list",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "needsAction",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "agencyReference",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pnr",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "createdFrom",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdTo",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "departureFrom",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "departureTo",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlightBookingSummaryV1IReadOnlyListApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/flights/bookings/{bookingId}/post-booking-requests": {
      "post": {
        "tags": [
          "Flight servicing"
        ],
        "summary": "Asks for a refund, void, no-show refund or date change. The request is\r\nquoted by the ticketing desk; follow its status (or the\r\n`flight.post_booking_request.updated` webhook) and accept or decline\r\nthe quote before it expires.",
        "description": "**Scope:** `flights:post_booking`",
        "operationId": "flight_servicing_create",
        "parameters": [
          {
            "name": "bookingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Unique value (UUID) per operation; send the same value when retrying. See the Idempotency guide.",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateServicingRequestV1"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateServicingRequestV1"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateServicingRequestV1"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServicingRequestV1ApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "Flight servicing"
        ],
        "summary": "All post-booking requests of the booking, newest first.",
        "description": "**Scope:** `flights:post_booking`",
        "operationId": "flight_servicing_list",
        "parameters": [
          {
            "name": "bookingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServicingRequestV1IReadOnlyListApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/flights/bookings/{bookingId}/post-booking-requests/{requestId}": {
      "get": {
        "tags": [
          "Flight servicing"
        ],
        "description": "**Scope:** `flights:post_booking`",
        "operationId": "flight_servicing_get",
        "parameters": [
          {
            "name": "bookingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServicingRequestV1ApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/flights/bookings/{bookingId}/post-booking-requests/{requestId}/accept": {
      "post": {
        "tags": [
          "Flight servicing"
        ],
        "summary": "Accepts the quote: a refund is credited to your wallet, an amount to\r\ncollect is charged to it, and the desk executes the change with the airline.",
        "description": "**Scope:** `flights:post_booking`",
        "operationId": "flight_servicing_accept",
        "parameters": [
          {
            "name": "bookingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Unique value (UUID) per operation; send the same value when retrying. See the Idempotency guide.",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServicingRequestV1ApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/flights/bookings/{bookingId}/post-booking-requests/{requestId}/decline": {
      "post": {
        "tags": [
          "Flight servicing"
        ],
        "description": "**Scope:** `flights:post_booking`",
        "operationId": "flight_servicing_decline",
        "parameters": [
          {
            "name": "bookingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeclineBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DeclineBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DeclineBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServicingRequestV1ApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/flights/bookings/{bookingId}/post-booking-requests/{requestId}/withdraw": {
      "post": {
        "tags": [
          "Flight servicing"
        ],
        "summary": "Withdraws a request that has not been accepted yet.",
        "description": "**Scope:** `flights:post_booking`",
        "operationId": "flight_servicing_withdraw",
        "parameters": [
          {
            "name": "bookingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServicingRequestV1ApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/flights/bookings/{bookingId}/schedule-changes": {
      "get": {
        "tags": [
          "Flight servicing"
        ],
        "summary": "Airline schedule changes on the booking. Changes with `requiresAcceptance` need your reply before `replyDeadline`.",
        "description": "**Scope:** `flights:post_booking`",
        "operationId": "flight_servicing_scheduleChanges",
        "parameters": [
          {
            "name": "bookingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleChangeV1IReadOnlyListApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/flights/bookings/{bookingId}/schedule-changes/{noticeId}/accept": {
      "post": {
        "tags": [
          "Flight servicing"
        ],
        "summary": "Accepts the new schedule on behalf of the passengers. To refuse it,\r\ncreate a post-booking request (refund or date change) instead.",
        "description": "**Scope:** `flights:post_booking`",
        "operationId": "flight_servicing_acceptScheduleChange",
        "parameters": [
          {
            "name": "bookingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "noticeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleChangeV1ApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/flights/bookings/{bookingId}/schedule-changes/{noticeId}/acknowledge": {
      "post": {
        "tags": [
          "Flight servicing"
        ],
        "summary": "Tells the airline you have seen a change that needs no acceptance.",
        "description": "**Scope:** `flights:post_booking`",
        "operationId": "flight_servicing_acknowledge",
        "parameters": [
          {
            "name": "bookingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "noticeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleChangeV1ApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/flights/bookings/{id}": {
      "get": {
        "tags": [
          "Flight bookings"
        ],
        "summary": "The booking with its status, next actions, deadlines, passengers, tickets and open servicing.",
        "description": "**Scope:** `flights:read`",
        "operationId": "flight_bookings_get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlightBookingV1ApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/flights/bookings/{id}/cancel": {
      "post": {
        "tags": [
          "Flight bookings"
        ],
        "summary": "Cancels a booking that has not been issued: the seats are released and\r\nnothing is charged. Ticketed bookings are refunded or voided through a\r\npost-booking request instead.",
        "description": "**Scope:** `flights:book`",
        "operationId": "flight_bookings_cancel",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Unique value (UUID) per operation; send the same value when retrying. See the Idempotency guide.",
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlightBookingV1ApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/flights/bookings/{id}/documents/e-ticket": {
      "get": {
        "tags": [
          "Flight bookings"
        ],
        "summary": "The e-ticket (itinerary receipt) PDF, once the booking is ticketed.",
        "description": "**Scope:** `flights:read`",
        "operationId": "flight_bookings_eTicket",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/flights/bookings/{id}/events": {
      "get": {
        "tags": [
          "Flight bookings"
        ],
        "summary": "Everything that happened to the booking, oldest first.",
        "description": "**Scope:** `flights:read`",
        "operationId": "flight_bookings_events",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingEventV1IReadOnlyListApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/flights/bookings/{id}/issue": {
      "post": {
        "tags": [
          "Flight bookings"
        ],
        "summary": "Issues a held booking: the amount due is taken from your wallet and the\r\nairline issues the tickets. The booking becomes `ticketed`, or\r\n`issuing` when the airline confirms later — then wait for the\r\nwebhook or poll; never call issue again. Calling issue on a booking that\r\nis already issuing or ticketed just returns it.",
        "description": "**Scope:** `flights:book`",
        "operationId": "flight_bookings_issue",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Unique value (UUID) per operation; send the same value when retrying. See the Idempotency guide.",
            "required": true,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlightBookingV1ApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/flights/offers/{offerId}/fare-rules": {
      "get": {
        "tags": [
          "Flight shopping"
        ],
        "summary": "The fare's refund, change and no-show conditions, plus the airline's full rule text when available.",
        "description": "**Scope:** `flights:read`",
        "operationId": "flight_shopping_fareRules",
        "parameters": [
          {
            "name": "offerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FareRulesV1ApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/flights/offers/{offerId}/price": {
      "post": {
        "tags": [
          "Flight shopping"
        ],
        "summary": "Re-prices an offer with the airline right now. Call it before holding\r\nwhen the search is more than a few minutes old or before showing your\r\ncustomer the final price. When `priceChanged` is true the new price\r\nreplaces the old one for the hold.",
        "description": "**Scope:** `flights:read`",
        "operationId": "flight_shopping_price",
        "parameters": [
          {
            "name": "offerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfferPriceCheckV1ApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/flights/search": {
      "post": {
        "tags": [
          "Flight shopping"
        ],
        "summary": "Searches every airline source available to your agency and returns\r\nbookable offers, cheapest first. Each fare family of the same flights is\r\na separate offer. Offers expire (see `expiresAt`) — hold soon.",
        "description": "**Scope:** `flights:read`",
        "operationId": "flight_shopping_search",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FlightSearchRequestV1"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FlightSearchRequestV1"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FlightSearchRequestV1"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlightSearchResultV1ApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/webhook-deliveries": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Delivery attempts, newest first. Filter by `endpointId`, `eventId` or `status` (pending, succeeded, failed, cancelled).",
        "description": "**Scope:** `webhooks:manage`",
        "operationId": "webhooks_deliveries",
        "parameters": [
          {
            "name": "endpointId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "eventId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryDtoIReadOnlyListApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/webhook-deliveries/{id}/retry": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Sends a delivery again now (e.g. after fixing your receiver). A failure starts a fresh retry schedule.",
        "description": "**Scope:** `webhooks:manage`",
        "operationId": "webhooks_retry",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryDtoApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/webhook-endpoints": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Your webhook endpoints in this environment.",
        "description": "**Scope:** `webhooks:manage`",
        "operationId": "webhooks_list",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointDtoIReadOnlyListApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Registers an endpoint. The response contains the signing `secret`\r\n— store it; it is used to verify the `TAM-Signature` header.",
        "description": "**Scope:** `webhooks:manage`",
        "operationId": "webhooks_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveWebhookEndpointRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveWebhookEndpointRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveWebhookEndpointRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedWebhookEndpointDtoApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/webhook-endpoints/{id}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "description": "**Scope:** `webhooks:manage`",
        "operationId": "webhooks_get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointDtoApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      },
      "patch": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Changes the URL, description or event types (omitted fields keep their\r\nvalue), or pauses/resumes the endpoint with `enabled`.",
        "description": "**Scope:** `webhooks:manage`",
        "operationId": "webhooks_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveWebhookEndpointRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveWebhookEndpointRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveWebhookEndpointRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointDtoApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Deletes the endpoint; deliveries still waiting for it are cancelled.",
        "description": "**Scope:** `webhooks:manage`",
        "operationId": "webhooks_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/webhook-endpoints/{id}/rotate-secret": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Issues a new signing secret. For 24 hours deliveries carry two `v1`\r\nsignatures (new and old secret), so you can deploy the new one without\r\nlosing events.",
        "description": "**Scope:** `webhooks:manage`",
        "operationId": "webhooks_rotateSecret",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedWebhookEndpointDtoApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/webhook-endpoints/{id}/test": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Sends a `ping` event to this endpoint within a few seconds. Check the result with `GET /webhook-deliveries?eventId=…`.",
        "description": "**Scope:** `webhooks:manage`",
        "operationId": "webhooks_test",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEventDtoApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/webhook-event-types": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Every event type you can subscribe to, with when it is sent.",
        "description": "**Scope:** `webhooks:manage`",
        "operationId": "webhooks_eventTypes",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEventTypeDtoIReadOnlyListApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/webhook-events": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Events raised in this environment, newest first (kept 30 days). Use it\r\nto catch up after downtime: filter by `objectId` (a booking id) or `type`.",
        "description": "**Scope:** `webhooks:manage`",
        "operationId": "webhooks_events",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "objectId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEventDtoIReadOnlyListApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    },
    "/webhook-events/{id}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "description": "**Scope:** `webhooks:manage`",
        "operationId": "webhooks_event",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEventDtoApiEnvelope"
                }
              }
            }
          },
          "4XX": {
            "description": "Client error. Branch on `code`; see the error catalog.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "5XX": {
            "description": "Server or airline error. Retry when `retryable` is true, with the same Idempotency-Key.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": [ ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AccountDto": {
        "type": "object",
        "properties": {
          "agencyId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "keyId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AccountDtoApiEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AccountDto"
          },
          "meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "pagination": {
            "$ref": "#/components/schemas/ApiPagination"
          }
        },
        "additionalProperties": false,
        "description": "`{ \"data\": …, \"meta\": { \"requestId\" } }` — every successful public response."
      },
      "AgencyApiUsageDto": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "days": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiUsagePointDto"
            },
            "nullable": true
          },
          "totalRequests": {
            "type": "integer",
            "format": "int64"
          },
          "totalSearches": {
            "type": "integer",
            "format": "int64"
          },
          "totalBooked": {
            "type": "integer",
            "format": "int64"
          },
          "lookToBookRatio": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "maxLookToBookRatio": {
            "type": "integer",
            "format": "int32"
          },
          "ratioWindowDays": {
            "type": "integer",
            "format": "int32"
          },
          "breachStatus": {
            "$ref": "#/components/schemas/BreachStatus"
          },
          "restriction": {
            "$ref": "#/components/schemas/AppliedRestriction"
          },
          "isSuspended": {
            "type": "boolean"
          },
          "suspendedReason": {
            "type": "string",
            "nullable": true
          },
          "requestsPerMinute": {
            "type": "integer",
            "format": "int32"
          },
          "searchesPerDay": {
            "type": "integer",
            "format": "int32"
          },
          "searchesToday": {
            "type": "integer",
            "format": "int64"
          },
          "searchesPerMonth": {
            "type": "integer",
            "format": "int32"
          },
          "searchesThisMonth": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false,
        "description": "An agency's own view of its API usage and limits."
      },
      "AgencyApiUsageDtoApiEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AgencyApiUsageDto"
          },
          "meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "pagination": {
            "$ref": "#/components/schemas/ApiPagination"
          }
        },
        "additionalProperties": false,
        "description": "`{ \"data\": …, \"meta\": { \"requestId\" } }` — every successful public response."
      },
      "ApiMeta": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ApiPagination": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "total": {
            "type": "integer",
            "format": "int32"
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ApiUsagePointDto": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "requests": {
            "type": "integer",
            "format": "int64"
          },
          "searches": {
            "type": "integer",
            "format": "int64"
          },
          "holds": {
            "type": "integer",
            "format": "int64"
          },
          "booked": {
            "type": "integer",
            "format": "int64"
          },
          "bookedOtherChannels": {
            "type": "integer",
            "format": "int64"
          },
          "throttled": {
            "type": "integer",
            "format": "int64"
          },
          "clientErrors": {
            "type": "integer",
            "format": "int64"
          },
          "serverErrors": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "AppliedRestriction": {
        "enum": [
          0,
          1,
          2
        ],
        "type": "integer",
        "format": "int32"
      },
      "BaggageDto": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string",
            "nullable": true
          },
          "included": {
            "type": "boolean"
          },
          "pieces": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "weightKg": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "summary": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BalanceDto": {
        "type": "object",
        "properties": {
          "balance": {
            "type": "string",
            "nullable": true
          },
          "available": {
            "type": "string",
            "description": "What can be spent now.",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "active": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "BalanceDtoApiEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/BalanceDto"
          },
          "meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "pagination": {
            "$ref": "#/components/schemas/ApiPagination"
          }
        },
        "additionalProperties": false,
        "description": "`{ \"data\": …, \"meta\": { \"requestId\" } }` — every successful public response."
      },
      "BookingDeadlinesV1": {
        "type": "object",
        "properties": {
          "holdExpiresAt": {
            "type": "string",
            "description": "Issue before this or the seats are released and the booking is cancelled.",
            "format": "date-time",
            "nullable": true
          },
          "voidUntil": {
            "type": "string",
            "description": "Until when a ticketed booking can usually be voided without penalty (end of the issue day, airline permitting).",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BookingEventV1": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "actor": {
            "type": "string",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BookingEventV1IReadOnlyListApiEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BookingEventV1"
            },
            "nullable": true
          },
          "meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "pagination": {
            "$ref": "#/components/schemas/ApiPagination"
          }
        },
        "additionalProperties": false,
        "description": "`{ \"data\": …, \"meta\": { \"requestId\" } }` — every successful public response."
      },
      "BookingPassengerV1": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "format": "int32"
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "firstName": {
            "type": "string",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "nullable": true
          },
          "birthDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "ticketNumber": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BookingPriceV1": {
        "type": "object",
        "properties": {
          "amountDue": {
            "$ref": "#/components/schemas/MoneyDto"
          },
          "suggestedRetail": {
            "$ref": "#/components/schemas/MoneyDto"
          },
          "commission": {
            "$ref": "#/components/schemas/MoneyDto"
          },
          "cancellationFee": {
            "$ref": "#/components/schemas/MoneyDto"
          },
          "serviceFees": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeeV1"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BreachStatus": {
        "enum": [
          0,
          1,
          2
        ],
        "type": "integer",
        "format": "int32"
      },
      "ContactV1": {
        "required": [
          "email",
          "name",
          "phone"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 120,
            "minLength": 2,
            "type": "string"
          },
          "email": {
            "minLength": 1,
            "type": "string",
            "format": "email"
          },
          "phone": {
            "maxLength": 20,
            "minLength": 6,
            "type": "string",
            "description": "With country code, e.g. `+989121234567`. The airline may call this number about schedule changes."
          }
        },
        "additionalProperties": false
      },
      "CreateFlightBookingV1": {
        "required": [
          "contact",
          "offerId",
          "passengers"
        ],
        "type": "object",
        "properties": {
          "offerId": {
            "minLength": 1,
            "type": "string"
          },
          "passengers": {
            "maxItems": 9,
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PassengerV1"
            },
            "description": "Passengers in the same counts and types as the search. The first adult is the lead passenger."
          },
          "contact": {
            "$ref": "#/components/schemas/ContactV1"
          },
          "agencyReference": {
            "maxLength": 64,
            "minLength": 0,
            "type": "string",
            "description": "Your own reference (e.g. your order number), up to 64 characters. Echoed back everywhere and searchable.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateServicingRequestV1": {
        "required": [
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "minLength": 1,
            "type": "string",
            "description": "`refund`, `void`, `change_date`, `no_show_refund` or `other`."
          },
          "passengerIndexes": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Indexes of the passengers concerned (from `passengers[].index`). Empty = all active passengers.",
            "nullable": true
          },
          "sliceIndexes": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Indexes of the slices concerned, for a partial refund or change. Empty = all.",
            "nullable": true
          },
          "requestedDate": {
            "type": "string",
            "description": "For `change_date`: the new travel date wanted.",
            "format": "date",
            "nullable": true
          },
          "note": {
            "maxLength": 1000,
            "minLength": 0,
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreatedWebhookEndpointDto": {
        "type": "object",
        "properties": {
          "endpoint": {
            "$ref": "#/components/schemas/WebhookEndpointDto"
          },
          "secret": {
            "type": "string",
            "description": "The signing secret (`whsec_…`). Returned when the endpoint is created and when its secret is rotated.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreatedWebhookEndpointDtoApiEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CreatedWebhookEndpointDto"
          },
          "meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "pagination": {
            "$ref": "#/components/schemas/ApiPagination"
          }
        },
        "additionalProperties": false,
        "description": "`{ \"data\": …, \"meta\": { \"requestId\" } }` — every successful public response."
      },
      "DeclineBody": {
        "type": "object",
        "properties": {
          "note": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FarePenaltyV1": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "nullable": true
          },
          "condition": {
            "type": "string",
            "nullable": true
          },
          "permitted": {
            "type": "boolean"
          },
          "amount": {
            "$ref": "#/components/schemas/MoneyDto"
          },
          "percentOfFare": {
            "type": "number",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FareRulesV1": {
        "type": "object",
        "properties": {
          "offerId": {
            "type": "string",
            "nullable": true
          },
          "refundable": {
            "type": "boolean"
          },
          "changeable": {
            "type": "boolean",
            "nullable": true
          },
          "cancelPenalty": {
            "$ref": "#/components/schemas/MoneyDto"
          },
          "changePenalty": {
            "$ref": "#/components/schemas/MoneyDto"
          },
          "penalties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FarePenaltyV1"
            },
            "nullable": true
          },
          "text": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FareRulesV1ApiEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/FareRulesV1"
          },
          "meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "pagination": {
            "$ref": "#/components/schemas/ApiPagination"
          }
        },
        "additionalProperties": false,
        "description": "`{ \"data\": …, \"meta\": { \"requestId\" } }` — every successful public response."
      },
      "FareV1": {
        "type": "object",
        "properties": {
          "brandName": {
            "type": "string",
            "nullable": true
          },
          "brandCode": {
            "type": "string",
            "nullable": true
          },
          "cabin": {
            "type": "string",
            "nullable": true
          },
          "refundable": {
            "type": "boolean"
          },
          "changeable": {
            "type": "boolean",
            "nullable": true
          },
          "baggage": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BaggageDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FeeV1": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "perPassenger": {
            "$ref": "#/components/schemas/MoneyDto"
          },
          "total": {
            "$ref": "#/components/schemas/MoneyDto"
          }
        },
        "additionalProperties": false
      },
      "FlightBookingSummaryV1": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "bookingNumber": {
            "type": "string",
            "nullable": true
          },
          "agencyReference": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "isFinal": {
            "type": "boolean"
          },
          "pnr": {
            "type": "string",
            "nullable": true
          },
          "origin": {
            "type": "string",
            "nullable": true
          },
          "destination": {
            "type": "string",
            "nullable": true
          },
          "departureAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "passengerCount": {
            "type": "integer",
            "format": "int32"
          },
          "leadPassenger": {
            "type": "string",
            "nullable": true
          },
          "amountDue": {
            "$ref": "#/components/schemas/MoneyDto"
          },
          "holdExpiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "A booking in a list. Fetch the booking for passengers, slices and servicing."
      },
      "FlightBookingSummaryV1IReadOnlyListApiEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlightBookingSummaryV1"
            },
            "nullable": true
          },
          "meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "pagination": {
            "$ref": "#/components/schemas/ApiPagination"
          }
        },
        "additionalProperties": false,
        "description": "`{ \"data\": …, \"meta\": { \"requestId\" } }` — every successful public response."
      },
      "FlightBookingV1": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "bookingNumber": {
            "type": "string",
            "nullable": true
          },
          "agencyReference": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "isFinal": {
            "type": "boolean"
          },
          "pendingReason": {
            "type": "string",
            "nullable": true
          },
          "statusReason": {
            "type": "string",
            "nullable": true
          },
          "nextActions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NextActionV1"
            },
            "nullable": true
          },
          "deadlines": {
            "$ref": "#/components/schemas/BookingDeadlinesV1"
          },
          "pollAfterSeconds": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "pnr": {
            "type": "string",
            "nullable": true
          },
          "ticketNumbers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "price": {
            "$ref": "#/components/schemas/BookingPriceV1"
          },
          "slices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SliceDto"
            },
            "nullable": true
          },
          "passengers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BookingPassengerV1"
            },
            "nullable": true
          },
          "contact": {
            "$ref": "#/components/schemas/ContactV1"
          },
          "openServicingRequests": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServicingRequestSummaryV1"
            },
            "nullable": true
          },
          "openScheduleChanges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleChangeSummaryV1"
            },
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "ticketedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "cancelledAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastEventAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "A booking as the public API shows it. Follow TAM.Modules.FlightCloud.Api.PublicApi.V1.FlightBookingV1.Status,\r\nTAM.Modules.FlightCloud.Api.PublicApi.V1.FlightBookingV1.NextActions and TAM.Modules.FlightCloud.Api.PublicApi.V1.FlightBookingV1.Deadlines — they always say what\r\ncan happen next and until when."
      },
      "FlightBookingV1ApiEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/FlightBookingV1"
          },
          "meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "pagination": {
            "$ref": "#/components/schemas/ApiPagination"
          }
        },
        "additionalProperties": false,
        "description": "`{ \"data\": …, \"meta\": { \"requestId\" } }` — every successful public response."
      },
      "FlightOfferV1": {
        "type": "object",
        "properties": {
          "offerId": {
            "type": "string",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "slices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SliceDto"
            },
            "nullable": true
          },
          "price": {
            "$ref": "#/components/schemas/OfferPriceV1"
          },
          "fare": {
            "$ref": "#/components/schemas/FareV1"
          },
          "seatsLeft": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A bookable fare for an itinerary. Each fare family (brand) of the same\r\nflights is its own offer. Hold it with `POST /flights/bookings` before\r\nTAM.Modules.FlightCloud.Api.PublicApi.V1.FlightOfferV1.ExpiresAt."
      },
      "FlightSearchRequestV1": {
        "required": [
          "passengers",
          "slices"
        ],
        "type": "object",
        "properties": {
          "slices": {
            "maxItems": 6,
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchSliceV1"
            },
            "description": "1 slice for one-way, 2 for a return, up to 6 for multi-city."
          },
          "passengers": {
            "$ref": "#/components/schemas/PassengerCountV1"
          },
          "cabin": {
            "type": "string",
            "description": "`economy` (default), `premium_economy`, `business` or `first`.",
            "nullable": true
          },
          "currency": {
            "maxLength": 3,
            "minLength": 3,
            "type": "string",
            "description": "Currency to price in. Defaults to your wallet currency, else your agency's\r\ndefault currency; when neither is configured the search is refused and you\r\nmust send one.",
            "nullable": true
          },
          "nationality": {
            "maxLength": 2,
            "minLength": 2,
            "type": "string",
            "description": "ISO 3166-1 alpha-2 nationality of the travellers, when fares depend on it.",
            "nullable": true
          },
          "domestic": {
            "type": "boolean",
            "description": "True for a domestic trip (national IDs are then accepted as travel documents)."
          },
          "directOnly": {
            "type": "boolean"
          },
          "preferredAirline": {
            "maxLength": 3,
            "minLength": 2,
            "type": "string",
            "description": "Optional 2-letter airline code to prefer.",
            "nullable": true
          },
          "maxResults": {
            "maximum": 200,
            "minimum": 1,
            "type": "integer",
            "description": "Most offers to return (1–200, default 50), cheapest first.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FlightSearchResultV1": {
        "type": "object",
        "properties": {
          "offers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlightOfferV1"
            },
            "nullable": true
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchWarningV1"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FlightSearchResultV1ApiEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/FlightSearchResultV1"
          },
          "meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "pagination": {
            "$ref": "#/components/schemas/ApiPagination"
          }
        },
        "additionalProperties": false,
        "description": "`{ \"data\": …, \"meta\": { \"requestId\" } }` — every successful public response."
      },
      "MoneyDto": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "string",
            "description": "e.g. `\"1250.00\"`.",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "ISO 4217 code, e.g. `USD`.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An amount of money. `amount` is a decimal string so no client loses precision to floating point."
      },
      "NextActionV1": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "description": "`issue`, `cancel`, `wait`, `request_refund`, `request_void`,\r\n            `request_change`, `accept_quote`, `reply_schedule_change`, `download_ticket`, `search_again`.",
            "nullable": true
          },
          "method": {
            "type": "string",
            "description": "HTTP method to call, or null for `wait`/`search_again`.",
            "nullable": true
          },
          "href": {
            "type": "string",
            "description": "Path relative to the base URL.",
            "nullable": true
          },
          "deadline": {
            "type": "string",
            "description": "After this instant the action is no longer possible.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OfferPriceCheckV1": {
        "type": "object",
        "properties": {
          "offerId": {
            "type": "string",
            "nullable": true
          },
          "priceChanged": {
            "type": "boolean"
          },
          "previousTotal": {
            "$ref": "#/components/schemas/MoneyDto"
          },
          "price": {
            "$ref": "#/components/schemas/OfferPriceV1"
          },
          "taxes": {
            "$ref": "#/components/schemas/MoneyDto"
          },
          "refundable": {
            "type": "boolean"
          },
          "changeable": {
            "type": "boolean",
            "nullable": true
          },
          "holdAvailableUntil": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "baggage": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BaggageDto"
            },
            "nullable": true
          },
          "serviceFees": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeeV1"
            },
            "nullable": true
          },
          "hasFlightHold": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "OfferPriceCheckV1ApiEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/OfferPriceCheckV1"
          },
          "meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "pagination": {
            "$ref": "#/components/schemas/ApiPagination"
          }
        },
        "additionalProperties": false,
        "description": "`{ \"data\": …, \"meta\": { \"requestId\" } }` — every successful public response."
      },
      "OfferPriceV1": {
        "type": "object",
        "properties": {
          "total": {
            "$ref": "#/components/schemas/MoneyDto"
          },
          "suggestedRetail": {
            "$ref": "#/components/schemas/MoneyDto"
          },
          "commission": {
            "$ref": "#/components/schemas/MoneyDto"
          }
        },
        "additionalProperties": false
      },
      "PassengerCountV1": {
        "type": "object",
        "properties": {
          "adults": {
            "maximum": 9,
            "minimum": 1,
            "type": "integer",
            "format": "int32"
          },
          "children": {
            "maximum": 8,
            "minimum": 0,
            "type": "integer",
            "format": "int32"
          },
          "infants": {
            "maximum": 9,
            "minimum": 0,
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "PassengerV1": {
        "required": [
          "firstName",
          "gender",
          "lastName",
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "minLength": 1,
            "type": "string",
            "description": "`adult`, `child` (2–11) or `infant` (under 2)."
          },
          "gender": {
            "minLength": 1,
            "type": "string",
            "description": "`male` or `female`."
          },
          "firstName": {
            "maxLength": 60,
            "minLength": 1,
            "type": "string",
            "description": "As on the travel document, Latin letters only."
          },
          "lastName": {
            "maxLength": 60,
            "minLength": 1,
            "type": "string"
          },
          "birthDate": {
            "type": "string",
            "description": "Required for children and infants; recommended for everyone.",
            "format": "date",
            "nullable": true
          },
          "nationality": {
            "maxLength": 2,
            "minLength": 2,
            "type": "string",
            "nullable": true
          },
          "document": {
            "$ref": "#/components/schemas/TravelDocumentV1"
          }
        },
        "additionalProperties": false
      },
      "Problem": {
        "required": [
          "code",
          "status",
          "title"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Documentation page of this error code.",
            "format": "uri"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "code": {
            "type": "string",
            "description": "Stable error code, e.g. `flights.price_changed`.",
            "example": "flights.price_changed"
          },
          "detail": {
            "type": "string"
          },
          "suggestion": {
            "type": "string",
            "description": "What to do next."
          },
          "retryable": {
            "type": "boolean"
          },
          "requestId": {
            "type": "string",
            "description": "Quote this to support."
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Field → messages, for request.validation_failed."
          },
          "context": {
            "type": "object",
            "description": "Extra data for some codes."
          }
        },
        "description": "Error body (RFC 9457 problem details). Branch on `code`."
      },
      "SaveWebhookEndpointRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "Public `https://` URL that receives the events.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Optional note for yourself, e.g. \"Production booking sync\".",
            "nullable": true
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Event types to receive, or `[\"*\"]` for all (including ones added later).",
            "nullable": true
          },
          "enabled": {
            "type": "boolean",
            "description": "On update only: false pauses deliveries, true resumes them (also after an automatic disable).",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ScheduleChangeSummaryV1": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "requiresAcceptance": {
            "type": "boolean"
          },
          "receivedAt": {
            "type": "string",
            "format": "date-time"
          },
          "replyDeadline": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ScheduleChangeV1": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "requiresAcceptance": {
            "type": "boolean"
          },
          "receivedAt": {
            "type": "string",
            "format": "date-time"
          },
          "replyDeadline": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "original": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleSegmentV1"
            },
            "nullable": true
          },
          "changed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleSegmentV1"
            },
            "nullable": true
          },
          "remark": {
            "type": "string",
            "nullable": true
          },
          "repliedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ScheduleChangeV1ApiEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ScheduleChangeV1"
          },
          "meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "pagination": {
            "$ref": "#/components/schemas/ApiPagination"
          }
        },
        "additionalProperties": false,
        "description": "`{ \"data\": …, \"meta\": { \"requestId\" } }` — every successful public response."
      },
      "ScheduleChangeV1IReadOnlyListApiEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleChangeV1"
            },
            "nullable": true
          },
          "meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "pagination": {
            "$ref": "#/components/schemas/ApiPagination"
          }
        },
        "additionalProperties": false,
        "description": "`{ \"data\": …, \"meta\": { \"requestId\" } }` — every successful public response."
      },
      "ScheduleSegmentV1": {
        "type": "object",
        "properties": {
          "sliceIndex": {
            "type": "integer",
            "format": "int32"
          },
          "airline": {
            "type": "string",
            "nullable": true
          },
          "flightNumber": {
            "type": "string",
            "nullable": true
          },
          "origin": {
            "type": "string",
            "nullable": true
          },
          "destination": {
            "type": "string",
            "nullable": true
          },
          "departureLocal": {
            "type": "string",
            "format": "date-time"
          },
          "arrivalLocal": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "SearchSliceV1": {
        "required": [
          "departureDate",
          "destination",
          "origin"
        ],
        "type": "object",
        "properties": {
          "origin": {
            "maxLength": 40,
            "minLength": 3,
            "type": "string",
            "description": "IATA airport or city code. On a sandbox environment the fake supplier's scenario codes (e.g. `FAKE-006-ASYNC-TICKETING`) are accepted too; production is IATA-only."
          },
          "destination": {
            "maxLength": 40,
            "minLength": 3,
            "type": "string"
          },
          "departureDate": {
            "type": "string",
            "description": "Local departure date, `yyyy-MM-dd`.",
            "format": "date"
          }
        },
        "additionalProperties": false
      },
      "SearchWarningV1": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SegmentDto": {
        "type": "object",
        "properties": {
          "marketingCarrier": {
            "type": "string",
            "nullable": true
          },
          "flightNumber": {
            "type": "string",
            "nullable": true
          },
          "operatingCarrier": {
            "type": "string",
            "nullable": true
          },
          "origin": {
            "type": "string",
            "nullable": true
          },
          "destination": {
            "type": "string",
            "nullable": true
          },
          "departureAt": {
            "type": "string",
            "format": "date-time"
          },
          "arrivalAt": {
            "type": "string",
            "format": "date-time"
          },
          "cabin": {
            "type": "string",
            "nullable": true
          },
          "bookingClass": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One flight of a slice."
      },
      "ServicingOutcomeV1": {
        "type": "object",
        "properties": {
          "refunded": {
            "$ref": "#/components/schemas/MoneyDto"
          },
          "collected": {
            "$ref": "#/components/schemas/MoneyDto"
          },
          "newPnr": {
            "type": "string",
            "nullable": true
          },
          "newBookingId": {
            "type": "string",
            "nullable": true
          },
          "executedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ServicingQuoteV1": {
        "type": "object",
        "properties": {
          "airlinePenalty": {
            "$ref": "#/components/schemas/MoneyDto"
          },
          "serviceFee": {
            "$ref": "#/components/schemas/MoneyDto"
          },
          "fareDifference": {
            "$ref": "#/components/schemas/MoneyDto"
          },
          "refundAmount": {
            "$ref": "#/components/schemas/MoneyDto"
          },
          "collectAmount": {
            "$ref": "#/components/schemas/MoneyDto"
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "quotedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ServicingRequestSummaryV1": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "requestNumber": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "quoteExpiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ServicingRequestV1": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "requestNumber": {
            "type": "string",
            "nullable": true
          },
          "bookingId": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "isFinal": {
            "type": "boolean"
          },
          "nextActions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NextActionV1"
            },
            "nullable": true
          },
          "passengerIndexes": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "nullable": true
          },
          "sliceIndexes": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "nullable": true
          },
          "quote": {
            "$ref": "#/components/schemas/ServicingQuoteV1"
          },
          "outcome": {
            "$ref": "#/components/schemas/ServicingOutcomeV1"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BookingEventV1"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ServicingRequestV1ApiEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ServicingRequestV1"
          },
          "meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "pagination": {
            "$ref": "#/components/schemas/ApiPagination"
          }
        },
        "additionalProperties": false,
        "description": "`{ \"data\": …, \"meta\": { \"requestId\" } }` — every successful public response."
      },
      "ServicingRequestV1IReadOnlyListApiEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServicingRequestV1"
            },
            "nullable": true
          },
          "meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "pagination": {
            "$ref": "#/components/schemas/ApiPagination"
          }
        },
        "additionalProperties": false,
        "description": "`{ \"data\": …, \"meta\": { \"requestId\" } }` — every successful public response."
      },
      "SliceDto": {
        "type": "object",
        "properties": {
          "origin": {
            "type": "string",
            "nullable": true
          },
          "destination": {
            "type": "string",
            "nullable": true
          },
          "departureAt": {
            "type": "string",
            "format": "date-time"
          },
          "arrivalAt": {
            "type": "string",
            "format": "date-time"
          },
          "stops": {
            "type": "integer",
            "format": "int32"
          },
          "durationMinutes": {
            "type": "integer",
            "format": "int32"
          },
          "segments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SegmentDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One direction of travel (outbound, return, or one leg of a multi-city trip)."
      },
      "TravelDocumentV1": {
        "required": [
          "number"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "`passport` (default) or `national_id`.",
            "nullable": true
          },
          "number": {
            "maxLength": 30,
            "minLength": 3,
            "type": "string"
          },
          "issuingCountry": {
            "maxLength": 2,
            "minLength": 2,
            "type": "string",
            "nullable": true
          },
          "expiryDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "issueDate": {
            "type": "string",
            "description": "Passport issue date. Optional; some fares require it and are refused without it.",
            "format": "date",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "WebhookDeliveryDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "eventId": {
            "type": "string",
            "format": "uuid"
          },
          "endpointId": {
            "type": "string",
            "format": "uuid"
          },
          "eventType": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "attempts": {
            "type": "integer",
            "format": "int32"
          },
          "nextAttemptAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastAttemptAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastStatusCode": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "lastError": {
            "type": "string",
            "nullable": true
          },
          "lastResponseExcerpt": {
            "type": "string",
            "nullable": true
          },
          "lastDurationMs": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "WebhookDeliveryDtoApiEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/WebhookDeliveryDto"
          },
          "meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "pagination": {
            "$ref": "#/components/schemas/ApiPagination"
          }
        },
        "additionalProperties": false,
        "description": "`{ \"data\": …, \"meta\": { \"requestId\" } }` — every successful public response."
      },
      "WebhookDeliveryDtoIReadOnlyListApiEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookDeliveryDto"
            },
            "nullable": true
          },
          "meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "pagination": {
            "$ref": "#/components/schemas/ApiPagination"
          }
        },
        "additionalProperties": false,
        "description": "`{ \"data\": …, \"meta\": { \"requestId\" } }` — every successful public response."
      },
      "WebhookEndpointDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "disabledReason": {
            "type": "string",
            "nullable": true
          },
          "failingSince": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastSuccessAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastFailureAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "secretRotating": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "WebhookEndpointDtoApiEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/WebhookEndpointDto"
          },
          "meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "pagination": {
            "$ref": "#/components/schemas/ApiPagination"
          }
        },
        "additionalProperties": false,
        "description": "`{ \"data\": …, \"meta\": { \"requestId\" } }` — every successful public response."
      },
      "WebhookEndpointDtoIReadOnlyListApiEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookEndpointDto"
            },
            "nullable": true
          },
          "meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "pagination": {
            "$ref": "#/components/schemas/ApiPagination"
          }
        },
        "additionalProperties": false,
        "description": "`{ \"data\": …, \"meta\": { \"requestId\" } }` — every successful public response."
      },
      "WebhookEventDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "objectType": {
            "type": "string",
            "nullable": true
          },
          "objectId": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "payload": {
            "description": "The exact JSON body sent to endpoints (null until rendered).",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "WebhookEventDtoApiEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/WebhookEventDto"
          },
          "meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "pagination": {
            "$ref": "#/components/schemas/ApiPagination"
          }
        },
        "additionalProperties": false,
        "description": "`{ \"data\": …, \"meta\": { \"requestId\" } }` — every successful public response."
      },
      "WebhookEventDtoIReadOnlyListApiEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookEventDto"
            },
            "nullable": true
          },
          "meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "pagination": {
            "$ref": "#/components/schemas/ApiPagination"
          }
        },
        "additionalProperties": false,
        "description": "`{ \"data\": …, \"meta\": { \"requestId\" } }` — every successful public response."
      },
      "WebhookEventTypeDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "module": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "WebhookEventTypeDtoIReadOnlyListApiEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookEventTypeDto"
            },
            "nullable": true
          },
          "meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "pagination": {
            "$ref": "#/components/schemas/ApiPagination"
          }
        },
        "additionalProperties": false,
        "description": "`{ \"data\": …, \"meta\": { \"requestId\" } }` — every successful public response."
      }
    },
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "description": "Your API key: `Authorization: Bearer tam_live_…`.",
        "scheme": "bearer",
        "bearerFormat": "tam_live_…"
      }
    }
  },
  "tags": [
    {
      "name": "Flight bookings",
      "description": "Flight bookings: hold an offer, issue it (pay from the wallet and ticket),\r\ncancel an unissued hold, and follow the booking's state."
    },
    {
      "name": "Flight servicing",
      "description": "After ticketing: refunds, voids and date changes (post-booking requests)\r\nand airline schedule changes."
    },
    {
      "name": "Flight shopping",
      "description": "Flight shopping: search, re-price an offer, read its fare rules."
    },
    {
      "name": "Webhooks",
      "description": "Webhook endpoints: URLs in your system that receive signed notifications\r\nwhen bookings change."
    },
    {
      "name": "Account",
      "description": "Who am I: the calling key, its environment and permissions."
    }
  ],
  "externalDocs": {
    "description": "Guides, error catalog, llms-full.txt",
    "url": "https://quickota.com/developers"
  }
}