{
 "openapi": "3.0.3",
 "info": {
  "title": "AirIQ Flight API",
  "version": "1.0.0-sample",
  "description": "SAMPLE: generated from the documentation data before the API shape is frozen; regenerated after."
 },
 "servers": [
  {
   "url": "https://api.uat.airiqtech.com",
   "description": "uat"
  },
  {
   "url": "https://api.airiqtech.com",
   "description": "production"
  }
 ],
 "paths": {
  "/generate-token": {
   "post": {
    "operationId": "generate-token",
    "summary": "Exchange the API key for a token that lives 4 hours (expires_in 14400)",
    "description": "Exchange the API key for a token that lives 4 hours (expires_in 14400). Every later call sends it as Authorization: Bearer <token>.",
    "security": [],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "api_key": {
          "type": "string",
          "description": "Your API key (starts with aiqo_). Keep it on your server; never send it from a browser or app."
         }
        }
       },
       "example": {
        "api_key": "ak_3f2e1d0c9b8a7f6e5d4c3b2a1f0e9d8c"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "token": {
           "type": "string"
          },
          "token_type": {
           "type": "string"
          },
          "expires_in": {
           "type": "integer"
          },
          "expires_at": {
           "type": "string"
          }
         }
        },
        "example": {
         "token": "<token>",
         "token_type": "Bearer",
         "expires_in": 14400,
         "expires_at": "2026-10-16T10:12:00Z"
        }
       }
      }
     },
     "401": {
      "description": "9001 Authentication required.9001 Authentication required.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "400": {
      "description": "5000 Invalid request.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "9004 Too many requests.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/flights/search": {
   "post": {
    "operationId": "search",
    "summary": "One request, complete results: options grouped by the journeys their fares cover, each fare priced once for the whole option with a journey view; the per-flight segment view on request",
    "description": "One request, complete results: options grouped by the journeys their fares cover, each fare priced once for the whole option with a journey view; the per-flight segment view on request. The UI uses the streaming route instead; this one waits for all suppliers.",
    "security": [
     {
      "bearer": []
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "segments": {
          "type": "array",
          "items": {
           "type": "object",
           "properties": {
            "from": {
             "type": "string"
            },
            "to": {
             "type": "string"
            },
            "date": {
             "type": "string"
            }
           }
          }
         },
         "adult": {
          "type": "integer",
          "description": "Adults travelling. child and infant default to 0; an infant needs an adult."
         },
         "child": {
          "type": "integer"
         },
         "infant": {
          "type": "integer"
         },
         "cabin_class": {
          "type": "integer",
          "description": "1 economy (default), 2 premium economy, 3 business, 4 first."
         },
         "fare_types": {
          "type": "array",
          "items": {
           "type": "integer"
          }
         },
         "direct_flight": {
          "type": "boolean"
         },
         "preferred_airlines": {
          "type": "array",
          "items": {
           "type": "string"
          }
         },
         "detail": {
          "type": "string",
          "description": "journey (default) or segment. segment adds segments[] inside every fare option with the fare attributes per flight."
         },
         "include_fare_rules": {
          "type": "boolean",
          "description": "false leaves fare_rules out of the reply and off every fare; smaller reply."
         }
        }
       },
       "example": {
        "segments": [
         {
          "from": "BLR",
          "to": "BOM",
          "date": "2026-11-14"
         }
        ],
        "adult": 1,
        "child": 0,
        "infant": 0,
        "cabin_class": 1,
        "fare_types": [
         1
        ],
        "direct_flight": false,
        "preferred_airlines": [
         "QP"
        ],
        "detail": "journey",
        "include_fare_rules": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "search_id": {
           "type": "string"
          },
          "status": {
           "type": "string"
          },
          "valid_till": {
           "type": "string"
          },
          "fare_rules": {
           "type": "object",
           "properties": {
            "fr_1": {
             "type": "object",
             "properties": {
              "cancellation": {
               "type": "array",
               "items": {
                "type": "object",
                "properties": {
                 "allowed": {
                  "type": "boolean"
                 },
                 "from": {
                  "type": "object",
                  "properties": {
                   "value": {
                    "type": "integer"
                   },
                   "unit": {
                    "type": "string"
                   }
                  }
                 },
                 "to": {
                  "type": "object",
                  "properties": {
                   "value": {
                    "type": "integer"
                   },
                   "unit": {
                    "type": "string"
                   }
                  }
                 },
                 "text": {
                  "type": "string"
                 }
                }
               }
              },
              "date_change": {
               "type": "array",
               "items": {
                "type": "object",
                "properties": {
                 "allowed": {
                  "type": "boolean"
                 },
                 "amount": {
                  "type": "integer"
                 },
                 "from": {
                  "type": "object",
                  "properties": {
                   "value": {
                    "type": "integer"
                   },
                   "unit": {
                    "type": "string"
                   }
                  }
                 },
                 "to": {
                  "type": "object",
                  "properties": {
                   "value": {
                    "type": "integer"
                   },
                   "unit": {
                    "type": "string"
                   }
                  }
                 }
                }
               }
              }
             }
            }
           }
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "journey_indexes": {
              "type": "array",
              "items": {
               "type": "integer"
              }
             },
             "options": {
              "type": "array",
              "items": {
               "type": "object",
               "properties": {
                "option_id": {
                 "type": "string"
                },
                "segments": {
                 "type": "array",
                 "items": {
                  "type": "object",
                  "properties": {
                   "segment_index": {
                    "type": "integer"
                   },
                   "journey_index": {
                    "type": "integer"
                   },
                   "segment_id": {
                    "type": "string"
                   },
                   "from": {
                    "type": "string"
                   },
                   "to": {
                    "type": "string"
                   },
                   "airline_code": {
                    "type": "string"
                   },
                   "airline_name": {
                    "type": "string"
                   },
                   "aircraft_type": {
                    "type": "string"
                   },
                   "flight_number": {
                    "type": "string"
                   },
                   "departure_time": {
                    "type": "string"
                   },
                   "departure_terminal": {
                    "type": "string"
                   },
                   "arrival_time": {
                    "type": "string"
                   },
                   "arrival_terminal": {
                    "type": "string"
                   },
                   "duration": {
                    "type": "integer"
                   }
                  }
                 }
                },
                "fare_options": {
                 "type": "array",
                 "items": {
                  "type": "object",
                  "properties": {
                   "price_id": {
                    "type": "string"
                   },
                   "fare_rules": {
                    "type": "object",
                    "properties": {
                     "0": {
                      "type": "string"
                     }
                    }
                   },
                   "adult": {
                    "type": "object",
                    "properties": {
                     "fare_ref": {
                      "type": "string"
                     },
                     "refundable_type": {
                      "type": "string"
                     },
                     "cabin_class": {
                      "type": "string"
                     },
                     "booking_class": {
                      "type": "string"
                     },
                     "fare_basis": {
                      "type": "string"
                     },
                     "baggage": {
                      "type": "object",
                      "properties": {
                       "hand": {
                        "type": "object",
                        "properties": {
                         "kg": {
                          "type": "integer"
                         }
                        }
                       },
                       "checkin": {
                        "type": "object",
                        "properties": {
                         "kg": {
                          "type": "integer"
                         }
                        }
                       }
                      }
                     },
                     "fare": {
                      "type": "object",
                      "properties": {
                       "hand_baggage": {
                        "type": "string"
                       },
                       "checkin_baggage": {
                        "type": "string"
                       },
                       "base_fare": {
                        "type": "number"
                       },
                       "yq": {
                        "type": "number"
                       },
                       "yr": {
                        "type": "number"
                       },
                       "airline_gst": {
                        "type": "number"
                       },
                       "booking_fee": {
                        "type": "number"
                       },
                       "commission": {
                        "type": "number"
                       },
                       "other_taxes": {
                        "type": "number"
                       },
                       "total_fare": {
                        "type": "number"
                       },
                       "net_fare": {
                        "type": "number"
                       },
                       "pax_count": {
                        "type": "integer"
                       }
                      }
                     }
                    }
                   },
                   "varies_by_segment": {
                    "type": "boolean"
                   }
                  }
                 }
                }
               }
              }
             }
            }
           }
          }
         }
        },
        "example": {
         "search_id": "a1d2c3b4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
         "status": "completed",
         "valid_till": "2026-10-18T21:12:00+05:30",
         "fare_rules": {
          "fr_1": {
           "cancellation": [
            {
             "allowed": false,
             "from": {
              "value": 0,
              "unit": "HOURS"
             },
             "to": {
              "value": 3,
              "unit": "HOURS"
             },
             "text": "Non-refundable within 3 hours of departure"
            },
            {
             "allowed": true,
             "amount": 3899,
             "from": {
              "value": 3,
              "unit": "HOURS"
             },
             "to": {
              "value": 365,
              "unit": "DAYS"
             }
            }
           ],
           "date_change": [
            {
             "allowed": true,
             "amount": 2999,
             "from": {
              "value": 3,
              "unit": "HOURS"
             },
             "to": {
              "value": 365,
              "unit": "DAYS"
             }
            }
           ]
          }
         },
         "results": [
          {
           "journey_indexes": [
            0
           ],
           "options": [
            {
             "option_id": "3f9e8d7c-6b5a-4f3e-9d2c-1b0a9f8e7d6c",
             "segments": [
              {
               "segment_index": 0,
               "journey_index": 0,
               "segment_id": "BLR_BOM_QP_1101",
               "from": "BLR",
               "to": "BOM",
               "airline_code": "QP",
               "airline_name": "Akasa Air",
               "aircraft_type": "737 MAX 8",
               "flight_number": "1101",
               "departure_time": "2026-11-14T06:00:00",
               "departure_terminal": "1",
               "arrival_time": "2026-11-14T07:45:00",
               "arrival_terminal": "2",
               "duration": 105
              }
             ],
             "fare_options": [
              {
               "price_id": "7c1b2f3e-9a4d-4c2e-8f1a-2b3c4d5e6f70",
               "fare_rules": {
                "0": "fr_1"
               },
               "adult": {
                "fare_ref": "SAVER",
                "refundable_type": "PARTIALLY_REFUNDABLE",
                "cabin_class": "Economy",
                "booking_class": "Q",
                "fare_basis": "QPSAVER",
                "baggage": {
                 "hand": {
                  "kg": 7
                 },
                 "checkin": {
                  "kg": 15
                 }
                },
                "fare": {
                 "hand_baggage": "7Kg",
                 "checkin_baggage": "15Kg",
                 "base_fare": 4200.0,
                 "yq": 0.0,
                 "yr": 0.0,
                 "airline_gst": 0.0,
                 "booking_fee": 0.0,
                 "commission": 0.0,
                 "other_taxes": 812.0,
                 "total_fare": 5012.0,
                 "net_fare": 5012.0,
                 "pax_count": 1
                }
               },
               "varies_by_segment": false
              }
             ]
            }
           ]
          }
         ]
        }
       }
      }
     },
     "401": {
      "description": "9001 Authentication required.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "400": {
      "description": "5100 Invalid search request.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "500": {
      "description": "9000 Something went wrong.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/flights/reprice": {
   "post": {
    "operationId": "reprice",
    "summary": "Reprice the chosen fare(s) with the airline and return the itinerary: the final price, what the booking needs (passport, DOB, GST, hold allowed) and any price change.",
    "description": "Reprice the chosen fare(s) with the airline and return the itinerary: the final price, what the booking needs (passport, DOB, GST, hold allowed) and any price change.",
    "security": [
     {
      "bearer": []
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "items": {
          "type": "array",
          "items": {
           "type": "object",
           "properties": {
            "option_id": {
             "type": "string"
            },
            "price_id": {
             "type": "string"
            }
           }
          }
         }
        }
       },
       "example": {
        "items": [
         {
          "option_id": "3f9e8d7c-6b5a-4f3e-9d2c-1b0a9f8e7d6c",
          "price_id": "7c1b2f3e-9a4d-4c2e-8f1a-2b3c4d5e6f70"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "itinerary_id": {
           "type": "string"
          },
          "valid_till": {
           "type": "string"
          },
          "fare_rules": {
           "type": "object",
           "properties": {
            "fr_1": {
             "type": "object",
             "properties": {
              "cancellation": {
               "type": "array",
               "items": {
                "type": "object",
                "properties": {
                 "allowed": {
                  "type": "boolean"
                 },
                 "from": {
                  "type": "object",
                  "properties": {
                   "value": {
                    "type": "integer"
                   },
                   "unit": {
                    "type": "string"
                   }
                  }
                 },
                 "to": {
                  "type": "object",
                  "properties": {
                   "value": {
                    "type": "integer"
                   },
                   "unit": {
                    "type": "string"
                   }
                  }
                 },
                 "text": {
                  "type": "string"
                 }
                }
               }
              },
              "date_change": {
               "type": "array",
               "items": {
                "type": "object",
                "properties": {
                 "allowed": {
                  "type": "boolean"
                 },
                 "amount": {
                  "type": "integer"
                 },
                 "from": {
                  "type": "object",
                  "properties": {
                   "value": {
                    "type": "integer"
                   },
                   "unit": {
                    "type": "string"
                   }
                  }
                 },
                 "to": {
                  "type": "object",
                  "properties": {
                   "value": {
                    "type": "integer"
                   },
                   "unit": {
                    "type": "string"
                   }
                  }
                 }
                }
               }
              }
             }
            }
           }
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "journey_indexes": {
              "type": "array",
              "items": {
               "type": "integer"
              }
             },
             "option_id": {
              "type": "string"
             },
             "segments": {
              "type": "array",
              "items": {
               "type": "object",
               "properties": {
                "segment_index": {
                 "type": "integer"
                },
                "journey_index": {
                 "type": "integer"
                },
                "segment_id": {
                 "type": "string"
                },
                "from": {
                 "type": "string"
                },
                "to": {
                 "type": "string"
                },
                "airline_code": {
                 "type": "string"
                },
                "airline_name": {
                 "type": "string"
                },
                "aircraft_type": {
                 "type": "string"
                },
                "flight_number": {
                 "type": "string"
                },
                "departure_time": {
                 "type": "string"
                },
                "departure_terminal": {
                 "type": "string"
                },
                "arrival_time": {
                 "type": "string"
                },
                "arrival_terminal": {
                 "type": "string"
                },
                "duration": {
                 "type": "integer"
                }
               }
              }
             },
             "fare": {
              "type": "object",
              "properties": {
               "price_id": {
                "type": "string"
               },
               "fare_rules": {
                "type": "object",
                "properties": {
                 "0": {
                  "type": "string"
                 }
                }
               },
               "adult": {
                "type": "object",
                "properties": {
                 "fare_ref": {
                  "type": "string"
                 },
                 "refundable_type": {
                  "type": "string"
                 },
                 "cabin_class": {
                  "type": "string"
                 },
                 "booking_class": {
                  "type": "string"
                 },
                 "fare_basis": {
                  "type": "string"
                 },
                 "baggage": {
                  "type": "object",
                  "properties": {
                   "hand": {
                    "type": "object",
                    "properties": {
                     "kg": {
                      "type": "integer"
                     }
                    }
                   },
                   "checkin": {
                    "type": "object",
                    "properties": {
                     "kg": {
                      "type": "integer"
                     }
                    }
                   }
                  }
                 },
                 "fare": {
                  "type": "object",
                  "properties": {
                   "hand_baggage": {
                    "type": "string"
                   },
                   "checkin_baggage": {
                    "type": "string"
                   },
                   "base_fare": {
                    "type": "number"
                   },
                   "yq": {
                    "type": "number"
                   },
                   "yr": {
                    "type": "number"
                   },
                   "airline_gst": {
                    "type": "number"
                   },
                   "booking_fee": {
                    "type": "number"
                   },
                   "commission": {
                    "type": "number"
                   },
                   "other_taxes": {
                    "type": "number"
                   },
                   "total_fare": {
                    "type": "number"
                   },
                   "net_fare": {
                    "type": "number"
                   },
                   "pax_count": {
                    "type": "integer"
                   }
                  }
                 }
                }
               },
               "varies_by_segment": {
                "type": "boolean"
               }
              }
             }
            }
           }
          },
          "booking_requirements": {
           "type": "object",
           "properties": {
            "is_gst_mandatory": {
             "type": "boolean"
            },
            "pan_applicable": {
             "type": "boolean"
            },
            "passport_mandatory": {
             "type": "boolean"
            },
            "dob_applicable": {
             "type": "object",
             "properties": {
              "adt": {
               "type": "boolean"
              },
              "chd": {
               "type": "boolean"
              },
              "inf": {
               "type": "boolean"
              }
             }
            },
            "is_hold": {
             "type": "boolean"
            },
            "firstname_length": {
             "type": "integer"
            },
            "lastname_length": {
             "type": "integer"
            },
            "firstname_min_length": {
             "type": "integer"
            },
            "lastname_min_length": {
             "type": "integer"
            },
            "seat_mandatory": {
             "type": "boolean"
            },
            "meal_mandatory": {
             "type": "boolean"
            },
            "baggage_mandatory": {
             "type": "boolean"
            }
           }
          },
          "price": {
           "type": "object",
           "properties": {
            "adult": {
             "type": "object",
             "properties": {
              "hand_baggage": {
               "type": "string"
              },
              "checkin_baggage": {
               "type": "string"
              },
              "base_fare": {
               "type": "number"
              },
              "yq": {
               "type": "number"
              },
              "yr": {
               "type": "number"
              },
              "airline_gst": {
               "type": "number"
              },
              "booking_fee": {
               "type": "number"
              },
              "commission": {
               "type": "number"
              },
              "other_taxes": {
               "type": "number"
              },
              "total_fare": {
               "type": "number"
              },
              "net_fare": {
               "type": "number"
              },
              "pax_count": {
               "type": "integer"
              }
             }
            },
            "total": {
             "type": "object",
             "properties": {
              "hand_baggage": {
               "type": "string"
              },
              "checkin_baggage": {
               "type": "string"
              },
              "base_fare": {
               "type": "number"
              },
              "yq": {
               "type": "number"
              },
              "yr": {
               "type": "number"
              },
              "airline_gst": {
               "type": "number"
              },
              "booking_fee": {
               "type": "number"
              },
              "commission": {
               "type": "number"
              },
              "other_taxes": {
               "type": "number"
              },
              "total_fare": {
               "type": "number"
              },
              "net_fare": {
               "type": "number"
              },
              "pax_count": {
               "type": "integer"
              }
             }
            }
           }
          },
          "messages": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "type": {
              "type": "string"
             },
             "option_id": {
              "type": "string"
             },
             "message": {
              "type": "string"
             },
             "old_value": {
              "type": "number"
             },
             "new_value": {
              "type": "number"
             }
            }
           }
          }
         }
        },
        "example": {
         "itinerary_id": "9b8a7f6e-5d4c-4b3a-2f1e-0d9c8b7a6f5e",
         "valid_till": "2026-10-18T20:27:00+05:30",
         "fare_rules": {
          "fr_1": {
           "cancellation": [
            {
             "allowed": false,
             "from": {
              "value": 0,
              "unit": "HOURS"
             },
             "to": {
              "value": 3,
              "unit": "HOURS"
             },
             "text": "Non-refundable within 3 hours of departure"
            },
            {
             "allowed": true,
             "amount": 3899,
             "from": {
              "value": 3,
              "unit": "HOURS"
             },
             "to": {
              "value": 365,
              "unit": "DAYS"
             }
            }
           ],
           "date_change": [
            {
             "allowed": true,
             "amount": 2999,
             "from": {
              "value": 3,
              "unit": "HOURS"
             },
             "to": {
              "value": 365,
              "unit": "DAYS"
             }
            }
           ]
          }
         },
         "results": [
          {
           "journey_indexes": [
            0
           ],
           "option_id": "3f9e8d7c-6b5a-4f3e-9d2c-1b0a9f8e7d6c",
           "segments": [
            {
             "segment_index": 0,
             "journey_index": 0,
             "segment_id": "BLR_BOM_QP_1101",
             "from": "BLR",
             "to": "BOM",
             "airline_code": "QP",
             "airline_name": "Akasa Air",
             "aircraft_type": "737 MAX 8",
             "flight_number": "1101",
             "departure_time": "2026-11-14T06:00:00",
             "departure_terminal": "1",
             "arrival_time": "2026-11-14T07:45:00",
             "arrival_terminal": "2",
             "duration": 105
            }
           ],
           "fare": {
            "price_id": "7c1b2f3e-9a4d-4c2e-8f1a-2b3c4d5e6f70",
            "fare_rules": {
             "0": "fr_1"
            },
            "adult": {
             "fare_ref": "SAVER",
             "refundable_type": "PARTIALLY_REFUNDABLE",
             "cabin_class": "Economy",
             "booking_class": "Q",
             "fare_basis": "QPSAVER",
             "baggage": {
              "hand": {
               "kg": 7
              },
              "checkin": {
               "kg": 15
              }
             },
             "fare": {
              "hand_baggage": "7Kg",
              "checkin_baggage": "15Kg",
              "base_fare": 4200.0,
              "yq": 0.0,
              "yr": 0.0,
              "airline_gst": 0.0,
              "booking_fee": 0.0,
              "commission": 0.0,
              "other_taxes": 812.0,
              "total_fare": 5012.0,
              "net_fare": 5012.0,
              "pax_count": 1
             }
            },
            "varies_by_segment": false
           }
          }
         ],
         "booking_requirements": {
          "is_gst_mandatory": false,
          "pan_applicable": false,
          "passport_mandatory": false,
          "dob_applicable": {
           "adt": false,
           "chd": true,
           "inf": true
          },
          "is_hold": true,
          "firstname_length": 30,
          "lastname_length": 30,
          "firstname_min_length": 2,
          "lastname_min_length": 2,
          "seat_mandatory": false,
          "meal_mandatory": false,
          "baggage_mandatory": false
         },
         "price": {
          "adult": {
           "hand_baggage": "7Kg",
           "checkin_baggage": "15Kg",
           "base_fare": 4200.0,
           "yq": 0.0,
           "yr": 0.0,
           "airline_gst": 0.0,
           "booking_fee": 0.0,
           "commission": 0.0,
           "other_taxes": 812.0,
           "total_fare": 5012.0,
           "net_fare": 5012.0,
           "pax_count": 1
          },
          "total": {
           "hand_baggage": "7Kg",
           "checkin_baggage": "15Kg",
           "base_fare": 4200.0,
           "yq": 0.0,
           "yr": 0.0,
           "airline_gst": 0.0,
           "booking_fee": 0.0,
           "commission": 0.0,
           "other_taxes": 812.0,
           "total_fare": 5012.0,
           "net_fare": 5012.0,
           "pax_count": 1
          }
         },
         "messages": [
          {
           "type": "FARE_ALERT",
           "option_id": "3f9e8d7c-6b5a-4f3e-9d2c-1b0a9f8e7d6c",
           "message": "Fare has changed: previous price 5012.00, current price 5112.00 (difference: 100.00)",
           "old_value": 5012.0,
           "new_value": 5112.0
          }
         ]
        }
       }
      }
     },
     "401": {
      "description": "9001 Authentication required.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "400": {
      "description": "5100 Invalid search request.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "5103 Flight not found.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "410": {
      "description": "5102 Search results have expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "502": {
      "description": "5001 The airline or supplier could not complete the request.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "504": {
      "description": "5002 A supplier or service did not answer in time.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/flights/ancillaries": {
   "post": {
    "operationId": "addons",
    "summary": "Optional",
    "description": "Optional. Baggage, meal and other add-ons on sale on the itinerary, each with the journey and the flights it covers.",
    "security": [
     {
      "bearer": []
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "itinerary_id": {
          "type": "string",
          "description": "The itinerary_id from reprice. An expired one answers 404: reprice again."
         }
        }
       },
       "example": {
        "itinerary_id": "9b8a7f6e-5d4c-4b3a-2f1e-0d9c8b7a6f5e"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "itinerary_id": {
           "type": "string"
          },
          "segments": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "journey_index": {
              "type": "integer"
             },
             "segment_index": {
              "type": "integer"
             },
             "airline_code": {
              "type": "string"
             },
             "flight_number": {
              "type": "string"
             },
             "from": {
              "type": "string"
             },
             "to": {
              "type": "string"
             }
            }
           }
          },
          "baggage": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "journey_index": {
              "type": "integer"
             },
             "items": {
              "type": "array",
              "items": {
               "type": "object",
               "properties": {
                "code": {
                 "type": "string"
                },
                "label": {
                 "type": "string"
                },
                "price": {
                 "type": "number"
                }
               }
              }
             }
            }
           }
          },
          "meal": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "journey_index": {
              "type": "integer"
             },
             "segment_index": {
              "type": "integer"
             },
             "items": {
              "type": "array",
              "items": {
               "type": "object",
               "properties": {
                "code": {
                 "type": "string"
                },
                "label": {
                 "type": "string"
                },
                "price": {
                 "type": "number"
                }
               }
              }
             }
            }
           }
          },
          "other": {
           "type": "array",
           "items": {}
          }
         }
        },
        "example": {
         "itinerary_id": "9b8a7f6e-5d4c-4b3a-2f1e-0d9c8b7a6f5e",
         "segments": [
          {
           "journey_index": 0,
           "segment_index": 0,
           "airline_code": "QP",
           "flight_number": "1101",
           "from": "BLR",
           "to": "BOM"
          }
         ],
         "baggage": [
          {
           "journey_index": 0,
           "items": [
            {
             "code": "XBAG05",
             "label": "Extra 5 Kg",
             "price": 1500.0
            }
           ]
          }
         ],
         "meal": [
          {
           "journey_index": 0,
           "segment_index": 0,
           "items": [
            {
             "code": "VGML",
             "label": "Vegetarian meal",
             "price": 350.0
            }
           ]
          }
         ],
         "other": []
        }
       }
      }
     },
     "401": {
      "description": "9001 Authentication required.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "400": {
      "description": "5100 Invalid search request.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "5104 Itinerary not found or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "502": {
      "description": "5001 The airline or supplier could not complete the request.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/flights/seat-map": {
   "post": {
    "operationId": "seat",
    "summary": "Optional",
    "description": "Optional. The seat map of every flight of the itinerary with price and availability per seat.",
    "security": [
     {
      "bearer": []
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "itinerary_id": {
          "type": "string",
          "description": "The itinerary_id from reprice."
         }
        }
       },
       "example": {
        "itinerary_id": "9b8a7f6e-5d4c-4b3a-2f1e-0d9c8b7a6f5e"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "itinerary_id": {
           "type": "string"
          },
          "segments": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "journey_index": {
              "type": "integer"
             },
             "segment_index": {
              "type": "integer"
             },
             "airline_code": {
              "type": "string"
             },
             "flight_number": {
              "type": "string"
             },
             "from": {
              "type": "string"
             },
             "to": {
              "type": "string"
             }
            }
           }
          },
          "seats": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "journey_index": {
              "type": "integer"
             },
             "segment_index": {
              "type": "integer"
             },
             "aircraft_type": {
              "type": "string"
             },
             "total_seats": {
              "type": "integer"
             },
             "seats": {
              "type": "array",
              "items": {
               "type": "object",
               "properties": {
                "aisle": {
                 "type": "boolean"
                },
                "amount": {
                 "type": "number"
                },
                "code": {
                 "type": "string"
                },
                "column": {
                 "type": "integer"
                },
                "desc": {
                 "type": "string"
                },
                "exit_row": {
                 "type": "boolean"
                },
                "infant": {
                 "type": "boolean"
                },
                "is_available": {
                 "type": "boolean"
                },
                "leg_room": {
                 "type": "boolean"
                },
                "middle": {
                 "type": "boolean"
                },
                "near_wings": {
                 "type": "boolean"
                },
                "reclining": {
                 "type": "boolean"
                },
                "row": {
                 "type": "integer"
                },
                "tax": {
                 "type": "number"
                },
                "window": {
                 "type": "boolean"
                }
               }
              }
             }
            }
           }
          }
         }
        },
        "example": {
         "itinerary_id": "9b8a7f6e-5d4c-4b3a-2f1e-0d9c8b7a6f5e",
         "segments": [
          {
           "journey_index": 0,
           "segment_index": 0,
           "airline_code": "QP",
           "flight_number": "1101",
           "from": "BLR",
           "to": "BOM"
          }
         ],
         "seats": [
          {
           "journey_index": 0,
           "segment_index": 0,
           "aircraft_type": "737 MAX 8",
           "total_seats": 189,
           "seats": [
            {
             "aisle": false,
             "amount": 600.0,
             "code": "WINDOW",
             "column": 1,
             "desc": "1A",
             "exit_row": false,
             "infant": true,
             "is_available": true,
             "leg_room": true,
             "middle": false,
             "near_wings": false,
             "reclining": true,
             "row": 1,
             "tax": 0.0,
             "window": true
            }
           ]
          }
         ]
        }
       }
      }
     },
     "401": {
      "description": "9001 Authentication required.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "400": {
      "description": "5100 Invalid search request.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "5104 Itinerary not found or expired.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "502": {
      "description": "5001 The airline or supplier could not complete the request.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/flights/book": {
   "post": {
    "operationId": "book",
    "summary": "Save the passengers on the itinerary, then pay from the wallet and ticket (is_hold false) or hold the booking without payment (is_hold true).",
    "description": "Save the passengers on the itinerary, then pay from the wallet and ticket (is_hold false) or hold the booking without payment (is_hold true).",
    "security": [
     {
      "bearer": []
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "itinerary_id": {
          "type": "string",
          "description": "The itinerary_id from reprice, before its valid_till."
         },
         "is_hold": {
          "type": "boolean",
          "description": "false: book directly, paid at once from your balance or credit and ticketed. true: hold the seats without payment until pay_till (only when reprice said booking_requirements.is_hold true); then confirm-hold or release."
         },
         "gst_details": {
          "type": "object",
          "properties": {
           "name": {
            "type": "string"
           },
           "number": {
            "type": "string"
           },
           "address": {
            "type": "string"
           },
           "email": {
            "type": "string"
           },
           "mobile": {
            "type": "string"
           }
          },
          "description": "The company on the invoice: name, number (GSTIN), address, email, mobile."
         },
         "pax_details": {
          "type": "array",
          "items": {
           "type": "object",
           "properties": {
            "first_name": {
             "type": "string"
            },
            "last_name": {
             "type": "string"
            },
            "pax_type": {
             "type": "string"
            },
            "title": {
             "type": "string"
            },
            "gender": {
             "type": "string"
            },
            "dob": {
             "type": "string"
            },
            "phone": {
             "type": "string"
            },
            "email": {
             "type": "string"
            },
            "passport_details": {
             "type": "object",
             "properties": {
              "passport_number": {
               "type": "string"
              },
              "passport_issue_date": {
               "type": "string"
              },
              "passport_expiry_date": {
               "type": "string"
              },
              "passport_issue_country": {
               "type": "string"
              },
              "nationality": {
               "type": "string"
              }
             }
            },
            "ancillaries": {
             "type": "object",
             "properties": {
              "seat": {
               "type": "array",
               "items": {
                "type": "object",
                "properties": {
                 "code": {
                  "type": "string"
                 },
                 "price": {
                  "type": "number"
                 },
                 "label": {
                  "type": "string"
                 },
                 "journey_index": {
                  "type": "integer"
                 },
                 "segment_index": {
                  "type": "integer"
                 }
                }
               }
              },
              "baggage": {
               "type": "array",
               "items": {
                "type": "object",
                "properties": {
                 "code": {
                  "type": "string"
                 },
                 "price": {
                  "type": "number"
                 },
                 "label": {
                  "type": "string"
                 },
                 "journey_index": {
                  "type": "integer"
                 }
                }
               }
              },
              "meal": {
               "type": "array",
               "items": {}
              },
              "other": {
               "type": "array",
               "items": {}
              }
             }
            }
           }
          }
         }
        }
       },
       "example": {
        "itinerary_id": "9b8a7f6e-5d4c-4b3a-2f1e-0d9c8b7a6f5e",
        "is_hold": false,
        "gst_details": {
         "name": "Example Travels Pvt Ltd",
         "number": "27AABCE1234F1Z5",
         "address": "12 MG Road, Mumbai 400001",
         "email": "accounts@example.com",
         "mobile": "+919876543210"
        },
        "pax_details": [
         {
          "first_name": "Rahul",
          "last_name": "Sharma",
          "pax_type": "ADULT",
          "title": "Mr",
          "gender": "male",
          "dob": "1990-05-12",
          "phone": "+919876543210",
          "email": "rahul.sharma@example.com",
          "passport_details": {
           "passport_number": "Z1234567",
           "passport_issue_date": "2022-01-10",
           "passport_expiry_date": "2032-01-09",
           "passport_issue_country": "IN",
           "nationality": "IN"
          },
          "ancillaries": {
           "seat": [
            {
             "code": "1A",
             "price": 600.0,
             "label": "window",
             "journey_index": 0,
             "segment_index": 0
            }
           ],
           "baggage": [
            {
             "code": "XBAG05",
             "price": 1500.0,
             "label": "Extra 5 Kg",
             "journey_index": 0
            }
           ],
           "meal": [],
           "other": []
          }
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "booking_id": {
           "type": "string"
          },
          "itinerary_id": {
           "type": "string"
          },
          "status": {
           "type": "string"
          },
          "amount": {
           "type": "number"
          }
         }
        },
        "example": {
         "booking_id": "AIOR482913",
         "itinerary_id": "9b8a7f6e-5d4c-4b3a-2f1e-0d9c8b7a6f5e",
         "status": "SUCCESS",
         "amount": 7112.0
        }
       }
      }
     },
     "401": {
      "description": "9001 Authentication required.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "9002 You do not have permission for this action.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "400": {
      "description": "3000 Invalid request.9003 Some fields are missing or invalid.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "3003 A service the API depends on is unavailable.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "3101 Hold booking limit reached.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "500": {
      "description": "9000 Something went wrong.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/flights/booking/details": {
   "post": {
    "operationId": "details",
    "summary": "The booking as stored: status, payment status, the flights with the PNR, the passengers with their fare and ticket number per flight, the price.",
    "description": "The booking as stored: status, payment status, the flights with the PNR, the passengers with their fare and ticket number per flight, the price.",
    "security": [
     {
      "bearer": []
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "booking_id": {
          "type": "string",
          "description": "The id book returned."
         }
        }
       },
       "example": {
        "booking_id": "AIOR482913"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "booking_id": {
           "type": "string"
          },
          "status": {
           "type": "string"
          },
          "payment_status": {
           "type": "string"
          },
          "created_at": {
           "type": "string"
          },
          "route_type": {
           "type": "string"
          },
          "journeys": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "journey_index": {
              "type": "integer"
             },
             "from": {
              "type": "string"
             },
             "to": {
              "type": "string"
             },
             "departure_time": {
              "type": "string"
             },
             "arrival_time": {
              "type": "string"
             },
             "segments": {
              "type": "array",
              "items": {
               "type": "object",
               "properties": {
                "segment_index": {
                 "type": "integer"
                },
                "from": {
                 "type": "string"
                },
                "to": {
                 "type": "string"
                },
                "airline_code": {
                 "type": "string"
                },
                "airline_name": {
                 "type": "string"
                },
                "flight_number": {
                 "type": "string"
                },
                "departure_time": {
                 "type": "string"
                },
                "arrival_time": {
                 "type": "string"
                },
                "departure_terminal": {
                 "type": "string"
                },
                "arrival_terminal": {
                 "type": "string"
                },
                "duration": {
                 "type": "integer"
                }
               }
              }
             },
             "passengers": {
              "type": "array",
              "items": {
               "type": "object",
               "properties": {
                "passenger_index": {
                 "type": "integer"
                },
                "first_name": {
                 "type": "string"
                },
                "last_name": {
                 "type": "string"
                },
                "pax_type": {
                 "type": "string"
                },
                "title": {
                 "type": "string"
                },
                "gender": {
                 "type": "string"
                },
                "dob": {
                 "type": "string"
                },
                "passport_details": {
                 "type": "object",
                 "properties": {
                  "passport_number": {
                   "type": "string"
                  },
                  "passport_issue_date": {
                   "type": "string"
                  },
                  "passport_expiry_date": {
                   "type": "string"
                  },
                  "nationality": {
                   "type": "string"
                  }
                 }
                },
                "fare": {
                 "type": "object",
                 "properties": {
                  "base_fare": {
                   "type": "number"
                  },
                  "yq": {
                   "type": "number"
                  },
                  "other_taxes": {
                   "type": "number"
                  },
                  "ancillaries": {
                   "type": "number"
                  },
                  "total_fare": {
                   "type": "number"
                  },
                  "net_fare": {
                   "type": "number"
                  }
                 }
                },
                "status": {
                 "type": "string"
                },
                "pnr": {
                 "type": "string"
                },
                "ticket_number": {
                 "type": "string"
                },
                "fare_ref": {
                 "type": "string"
                },
                "refundable_type": {
                 "type": "string"
                },
                "cabin_class": {
                 "type": "string"
                },
                "booking_class": {
                 "type": "string"
                },
                "fare_basis": {
                 "type": "string"
                },
                "baggage": {
                 "type": "object",
                 "properties": {
                  "hand": {
                   "type": "object",
                   "properties": {
                    "kg": {
                     "type": "integer"
                    }
                   }
                  },
                  "checkin": {
                   "type": "object",
                   "properties": {
                    "kg": {
                     "type": "integer"
                    }
                   }
                  }
                 }
                },
                "ancillaries": {
                 "type": "object",
                 "properties": {
                  "seat": {
                   "type": "array",
                   "items": {
                    "type": "object",
                    "properties": {
                     "code": {
                      "type": "string"
                     },
                     "price": {
                      "type": "number"
                     },
                     "label": {
                      "type": "string"
                     },
                     "segment_index": {
                      "type": "integer"
                     }
                    }
                   }
                  },
                  "baggage": {
                   "type": "array",
                   "items": {
                    "type": "object",
                    "properties": {
                     "code": {
                      "type": "string"
                     },
                     "price": {
                      "type": "number"
                     },
                     "label": {
                      "type": "string"
                     }
                    }
                   }
                  }
                 }
                }
               }
              }
             }
            }
           }
          },
          "price": {
           "type": "object",
           "properties": {
            "base_fare": {
             "type": "number"
            },
            "yq": {
             "type": "number"
            },
            "other_taxes": {
             "type": "number"
            },
            "ancillaries": {
             "type": "number"
            },
            "total_fare": {
             "type": "number"
            },
            "net_fare": {
             "type": "number"
            }
           }
          },
          "gst_details": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "number": {
             "type": "string"
            },
            "address": {
             "type": "string"
            },
            "email": {
             "type": "string"
            },
            "mobile": {
             "type": "string"
            }
           }
          }
         }
        },
        "example": {
         "booking_id": "AIOR482913",
         "status": "SUCCESS",
         "payment_status": "SUCCESS",
         "created_at": "2026-10-15T10:12:34Z",
         "route_type": "DOMESTIC",
         "journeys": [
          {
           "journey_index": 0,
           "from": "BLR",
           "to": "BOM",
           "departure_time": "2026-11-14T06:00:00",
           "arrival_time": "2026-11-14T07:45:00",
           "segments": [
            {
             "segment_index": 0,
             "from": "BLR",
             "to": "BOM",
             "airline_code": "QP",
             "airline_name": "Akasa Air",
             "flight_number": "1101",
             "departure_time": "2026-11-14T06:00:00",
             "arrival_time": "2026-11-14T07:45:00",
             "departure_terminal": "1",
             "arrival_terminal": "2",
             "duration": 105
            }
           ],
           "passengers": [
            {
             "passenger_index": 0,
             "first_name": "Rahul",
             "last_name": "Sharma",
             "pax_type": "ADULT",
             "title": "Mr",
             "gender": "male",
             "dob": "1990-05-12",
             "passport_details": {
              "passport_number": "Z1234567",
              "passport_issue_date": "2022-01-10",
              "passport_expiry_date": "2032-01-09",
              "nationality": "IN"
             },
             "fare": {
              "base_fare": 4200.0,
              "yq": 500.0,
              "other_taxes": 312.0,
              "ancillaries": 2100.0,
              "total_fare": 7112.0,
              "net_fare": 7112.0
             },
             "status": "CONFIRMED",
             "pnr": "H7K2PQ",
             "ticket_number": "",
             "fare_ref": "SAVER",
             "refundable_type": "PARTIALLY_REFUNDABLE",
             "cabin_class": "Economy",
             "booking_class": "Q",
             "fare_basis": "QPSAVER",
             "baggage": {
              "hand": {
               "kg": 7
              },
              "checkin": {
               "kg": 15
              }
             },
             "ancillaries": {
              "seat": [
               {
                "code": "1A",
                "price": 600.0,
                "label": "window",
                "segment_index": 0
               }
              ],
              "baggage": [
               {
                "code": "XBAG05",
                "price": 1500.0,
                "label": "Extra 5 Kg"
               }
              ]
             }
            }
           ]
          }
         ],
         "price": {
          "base_fare": 4200.0,
          "yq": 500.0,
          "other_taxes": 312.0,
          "ancillaries": 2100.0,
          "total_fare": 7112.0,
          "net_fare": 7112.0
         },
         "gst_details": {
          "name": "Example Travels Pvt Ltd",
          "number": "27AABCE1234F1Z5",
          "address": "12 MG Road, Mumbai 400001",
          "email": "accounts@example.com",
          "mobile": "+919876543210"
         }
        }
       }
      }
     },
     "401": {
      "description": "9001 Authentication required.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "9002 You do not have permission for this action.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "400": {
      "description": "3000 Invalid request.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "9005 Not found.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/flights/booking/confirm-hold": {
   "post": {
    "operationId": "confirm-hold",
    "summary": "Pay a held booking from the wallet and ticket it, before pay_till.",
    "description": "Pay a held booking from the wallet and ticket it, before pay_till.",
    "security": [
     {
      "bearer": []
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "booking_id": {
          "type": "string",
          "description": "A booking on hold (status ONHOLD), before its pay_till."
         }
        }
       },
       "example": {
        "booking_id": "AIOR482914"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "booking_id": {
           "type": "string"
          },
          "itinerary_id": {
           "type": "string"
          },
          "status": {
           "type": "string"
          },
          "amount": {
           "type": "number"
          }
         }
        },
        "example": {
         "booking_id": "AIOR482914",
         "itinerary_id": "9b8a7f6e-5d4c-4b3a-2f1e-0d9c8b7a6f5e",
         "status": "SUCCESS",
         "amount": 7112.0
        }
       }
      }
     },
     "401": {
      "description": "9001 Authentication required.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "9002 You do not have permission for this action.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "400": {
      "description": "3000 Invalid request.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "9005 Not found.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "3102 Booking is not pending.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "500": {
      "description": "9000 Something went wrong.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/flights/booking/release": {
   "post": {
    "operationId": "release",
    "summary": "Give up a held booking: the PNR is released at the airline and the order becomes PNR_RELEASED",
    "description": "Give up a held booking: the PNR is released at the airline and the order becomes PNR_RELEASED. A ticketed booking cannot be released.",
    "security": [
     {
      "bearer": []
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "booking_id": {
          "type": "string",
          "description": "A booking on hold. A booking that is not on hold answers an error."
         }
        }
       },
       "example": {
        "booking_id": "AIOR482914"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "booking_id": {
           "type": "string"
          },
          "status": {
           "type": "string"
          },
          "pnr": {
           "type": "string"
          }
         }
        },
        "example": {
         "booking_id": "AIOR482914",
         "status": "PNR_RELEASED",
         "pnr": "H7K2PQ"
        }
       }
      }
     },
     "401": {
      "description": "9001 Authentication required.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "9002 You do not have permission for this action.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "400": {
      "description": "3000 Invalid request.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "9005 Not found.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "3102 Booking is not pending.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer",
    "description": "Token from POST /generate-token, 4 hours."
   }
  },
  "schemas": {
   "Error": {
    "type": "object",
    "properties": {
     "code": {
      "type": "integer"
     },
     "message": {
      "type": "string"
     },
     "detail": {
      "type": "string"
     },
     "traceId": {
      "type": "string"
     },
     "errors": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "field": {
         "type": "string"
        },
        "rule": {
         "type": "string"
        },
        "message": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  }
 }
}
