{
    "info": {
        "_postman_id": "40658d7c-4ea4-4523-8544-0ec565f8bd41",
        "name": "Travel Companion API",
        "description": "This collection provides a comprehensive set of endpoints to support a complete user and flight management workflow, facilitating operations for retrieving user information, searching for flights, managing bookings, and processing payments. Each endpoint is structured for ease of integration and offers detailed data essential for creating a seamless travel booking experience. Key features include user account management, flight discovery, booking creation, and secure payment handling.\n\nAPI Main Flow:\n\n**Search Flights -> Get Flight by ID -> Create Booking -> Make Payment For Booking -> Get Booking Details**",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
        "_exporter_id": "33356025"
    },
    "item": [
        {
            "name": "User Details",
            "item": [
                {
                    "name": "Get User Details",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "exec": [
                                    ""
                                ],
                                "type": "text/javascript",
                                "packages": {}
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "X-API-KEY",
                                "value": "{{X-API-KEY}}",
                                "description": "The variable is configured at the collection level and can be modified within the collection variables",
                                "type": "text"
                            },
                            {
                                "key": "X-API-SECRET",
                                "value": "{{X-API-SECRET}}",
                                "description": "The variable is configured at the collection level and can be modified within the collection variables",
                                "type": "text"
                            }
                        ],
                        "url": {
                            "raw": "{{api-url}}/api/v1/user-details",
                            "host": [
                                "{{api-url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "user-details"
                            ]
                        },
                        "description": "### API Endpoint:\n\n`GET {{api-url}}/api/v1/user-details`\n\n### Description:\n\nThis endpoint is used to retrieve the details of a user including user ID, user name, balances, and credit limits.\n\n### Purpose:\n\nThe purpose of this request is to fetch the user details including user ID, user name, balances (total, wallet, credit, outstanding), and credit limits.\n\n### Request:\n\n- Method: GET\n    \n- Headers:\n    \n    - X-API-KEY\n        \n    - X-API-SECRET\n        \n\n### Response:\n\n- Status: 200 OK\n    \n- Content-Type: application/json\n    \n- { \"user\": { \"userId\": \"\", \"userName\": \"\" }, \"balances\": { \"totalBalance\": 0, \"walletBalance\": 0, \"creditBalance\": 0, \"outStanding\": 0 }, \"limits\": { \"creditLimit\": 0 } }\n    \n\n`GET {{api-url}}/api/v1/user-details`\n\n### Description:\n\nThis endpoint is used to retrieve the details of a user including user ID, user name, balances, and credit limits.\n\n### Request:\n\n- Method: GET\n    \n    - Headers: X-API-KEY, X-API-SECRET\n        \n\n### Response:\n\n- Status: 200 OK\n    \n- Content-Type: application/json\n    \n- { \"user\": { \"userId\": \"\", \"userName\": \"\" }, \"balances\": { \"totalBalance\": 0, \"walletBalance\": 0, \"creditBalance\": 0, \"outStanding\": 0 }, \"limits\": { \"creditLimit\": 0 }}\n    \n\n### Purpose:\n\nThis request is made to fetch the user details including user ID, user name, balances (total, wallet, credit, outstanding), and credit limits."
                    },
                    "response": []
                }
            ],
            "description": "The _User Details_ folder contains endpoints to retrieve and manage individual user information in the system. Its primary API request retrieves comprehensive user details, covering identification, balances, and credit limits. This data is essential for financial tracking, credit management, and personalized user services"
        },
        {
            "name": "Flights",
            "item": [
                {
                    "name": "Get Sector Availability",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "exec": [
                                    ""
                                ],
                                "type": "text/javascript",
                                "packages": {}
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "X-API-KEY",
                                "value": "{{X-API-KEY}}",
                                "description": "The variable is configured at the collection level and can be modified within the collection variables",
                                "type": "text"
                            },
                            {
                                "key": "X-API-SECRET",
                                "value": "{{X-API-SECRET}}",
                                "description": "The variable is configured at the collection level and can be modified within the collection variables",
                                "type": "text"
                            }
                        ],
                        "url": {
                            "raw": "{{api-url}}/api/v1/flights/sectors",
                            "host": [
                                "{{api-url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "flights",
                                "sectors"
                            ],
                            "query": [
                                {
                                    "key": "pnr",
                                    "value": "INSTANT_PNR",
                                    "description": "Optional. FareSearchPnrFilterEnum - ALL (default) or INSTANT_PNR",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "### API Endpoint:\n\n`GET {{api-url}}/api/v1/flights/sectors`\n\n### Description:\n\nThis endpoint returns the available origin-destination sectors along with the dates on which flights are available for each sector and the seats available on each date. The response should be cached on the client side for up to 30 minutes.\n\n### Request:\n\n- Method: GET\n    \n- Headers:\n    \n    - X-API-KEY\n        \n    - X-API-SECRET\n        \n- Query Parameters:\n    \n    - pnr (optional): FareSearchPnrFilterEnum - `ALL` (default) returns all sectors including awaiting pnr, `INSTANT_PNR` returns only sectors with instant pnr\n        \n\n### Response:\n\n- Status: 200 OK\n    \n- Content-Type: application/json\n    \n- { \"status\": \"success\", \"sectors\": 1, \"availableSectors\": [ { \"sector\": \"SXR-DEL\", \"totalSectorSeats\": 59, \"availability\": [ { \"date\": \"20261201\", \"availableSeats\": 29 }, { \"date\": \"20261202\", \"availableSeats\": 30 } ] } ] }\n    \n\nDates are formatted as `YYYYMMDD`. `totalSectorSeats` is the sum of `availableSeats` across all dates of the sector."
                    },
                    "response": []
                },
                {
                    "name": "Search Flights",
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "X-API-KEY",
                                "value": "{{X-API-KEY}}",
                                "description": "The variable is configured at the collection level and can be modified within the collection variables"
                            },
                            {
                                "key": "X-API-SECRET",
                                "value": "{{X-API-SECRET}}",
                                "description": "The variable is configured at the collection level and can be modified within the collection variables"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"cabinClass\": \"ECONOMY\",\r\n    \"passengers\": {\r\n        \"adult\": 1,\r\n        \"child\": 1,\r\n        \"infant\": 1\r\n    },\r\n    \"routeInfo\": [\r\n        {\r\n            \"from\": {\r\n                \"code\": \"IXC\"\r\n            },\r\n            \"to\": {\r\n                \"code\": \"BOM\"\r\n            },\r\n            \"travelDate\": \"20300920\"\r\n        }\r\n    ],\r\n    \"filter\": {\r\n        \"pft\": \"REGULAR\",\r\n        \"isDirectFlight\": false,\r\n        \"isConnectingFlight\": false,\r\n        \"pnr\": \"ALL\"\r\n    },\r\n    \"preferredAirlines\": []\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": {
                            "raw": "{{api-url}}/api/v1/flights",
                            "host": [
                                "{{api-url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "flights"
                            ]
                        },
                        "description": "### Flight Search API\n\nThis API endpoint allows you to search for flights based on the provided criteria.\n\n#### Request Body\n\n- `cabinClass` (string): The class of the cabin for the flight.\n    \n- `passengers` (object): Details of the passengers including adults, children, and infants.\n    \n    - `adult` (number): Number of adult passengers.\n        \n    - `child` (number): Number of child passengers.\n        \n    - `infant` (number): Number of infant passengers.\n        \n- `routeInfo` (array): Information about the route of the flight.\n    \n    - `from` (object): Details of the departure location.\n        \n        - `code` (string): The code of the departure airport.\n            \n    - `to` (object): Details of the destination location.\n        \n        - `code` (string): The code of the destination airport.\n            \n    - `travelDate` (string): The date of travel in the format \"YYYYMMDD\".\n        \n- `filter` (object): Filters for the flight search.\n    \n    - `pft` (string): Preference for the type of fare.\n        \n    - `isDirectFlight` (boolean): Indicates if the flight should be direct.\n        \n    - `isConnectingFlight` (boolean): Indicates if the flight should be connecting.\n        \n- `preferredAirlines` (array): Array of preferred airlines.\n    \n\n#### Response\n\nThe response is an array of flight options, each containing:\n\n- `segments` (array): Details of flight segments including duration, layover duration, stops, stops over airports, arrival and departure information.\n    \n- `priceList` (array): List of prices for the flight, including total fare, net fare, fare description for adult, child, and infant passengers, and duration."
                    },
                    "response": []
                },
                {
                    "name": "Review Flight",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "X-API-KEY",
                                "value": "{{X-API-KEY}}",
                                "description": "The variable is configured at the collection level and can be modified within the collection variables"
                            },
                            {
                                "key": "X-API-SECRET",
                                "value": "{{X-API-SECRET}}",
                                "description": "The variable is configured at the collection level and can be modified within the collection variables"
                            }
                        ],
                        "url": {
                            "raw": "{{api-url}}/api/v1/flights/{{fareIdToken}}",
                            "host": [
                                "{{api-url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "flights",
                                "{{fareIdToken}}"
                            ]
                        },
                        "description": "This endpoint allows you to create a new flight booking by sending an HTTP POST request to the specified URL.\n\n### Response\n\nUpon successful execution, the endpoint returns a 200 status code and a JSON response containing details of the flight segments and price information. The response includes information about the flight segments, such as flight name, code, number, duration, layover duration, stops, arrival and departure details, operating airline, and price details including total fare, base fare, taxes and fees for adult, child, and infant passengers.\n\n### Conditions\n\nThe `conditions` object in the response describes which fields should be passed in the Add Passenger Details request:\n\n- `dob.adultRequired`, `dob.childRequired`, `dob.infantRequired` (Boolean): Whether date of birth is required for the respective passenger type.\n    \n- `isPassportRequired` (Boolean): Whether passport details should be passed.\n    \n- `isPassportIssueDateRequired` (Boolean): Whether the passport issue date (`passport.issueDate`) should be passed."
                    },
                    "response": []
                },
                {
                    "name": "Get Fare Rules",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "X-API-KEY",
                                "value": "{{X-API-KEY}}",
                                "description": "The variable is configured at the collection level and can be modified within the collection variables"
                            },
                            {
                                "key": "X-API-SECRET",
                                "value": "{{X-API-SECRET}}",
                                "description": "The variable is configured at the collection level and can be modified within the collection variables"
                            }
                        ],
                        "url": {
                            "raw": "{{api-url}}/api/v1/flights/{{fareIdToken}}/fare-rules",
                            "host": [
                                "{{api-url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "flights",
                                "{{fareIdToken}}",
                                "fare-rules"
                            ]
                        },
                        "description": "### Flight Fare Rules API\n\nThis API endpoint is used to retrieve the fare rules for a specific flight"
                    },
                    "response": []
                }
            ],
            "description": "This folder contains endpoints for managing flight-related information, including searching flights, retrieving flight details, and viewing fare rules. These endpoints facilitate seamless flight discovery and provide essential details for planning and booking travel"
        },
        {
            "name": "Booking",
            "item": [
                {
                    "name": "Add Passenger Details",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "X-API-KEY",
                                "value": "{{X-API-KEY}}",
                                "description": "The variable is configured at the collection level and can be modified within the collection variables"
                            },
                            {
                                "key": "X-API-SECRET",
                                "value": "{{X-API-SECRET}}",
                                "description": "The variable is configured at the collection level and can be modified within the collection variables"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"passengers\": {\n        \"adults\": [\n            {\n                \"title\": \"Mr\",\n                \"firstName\": \"Rahul\",\n                \"lastName\": \"Sharma\",\n                \"dob\": \"\",\n                \"passport\": {\n                    \"expiry\": \"\",\n                    \"nationality\": \"\",\n                    \"number\": \"\",\n                    \"issueDate\": \"\"\n                }\n            }\n        ],\n        \"children\": [\n            {\n                \"title\": \"Ms\",\n                \"firstName\": \"Ananya\",\n                \"lastName\": \"Sharma\",\n                \"dob\": \"\",\n                \"passport\": {\n                    \"expiry\": \"\",\n                    \"nationality\": \"\",\n                    \"number\": \"\",\n                    \"issueDate\": \"\"\n                }\n            }\n        ],\n        \"infants\": [\n            {\n                \"title\": \"Master\",\n                \"firstName\": \"Arjun\",\n                \"lastName\": \"Sharma\",\n                \"dob\": \"20290315\",\n                \"passport\": {\n                    \"expiry\": \"\",\n                    \"nationality\": \"\",\n                    \"number\": \"\",\n                    \"issueDate\": \"\"\n                }\n            }\n        ]\n    },\n    \"contactDetails\": {\n        \"mobileNumber\": \"9876543210\",\n        \"email\": \"rahul@example.com\"\n    }\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": {
                            "raw": "{{api-url}}/api/v1/bookings/{{booking-id}}/passenger-details",
                            "host": [
                                "{{api-url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "bookings",
                                "{{booking-id}}",
                                "passenger-details"
                            ]
                        },
                        "description": "This endpoint allows you to add passenger details for a booking. The request body should include details of adults, children, infants, and contact details.\n\n### Request Body\n\n- `passengers.adults`: Array of adult passenger details including title, first name, last name, date of birth, and passport information.\n    \n- `passengers.children`: Array of child passenger details including title, first name, last name, date of birth, and passport information.\n    \n- `passengers.infants`: Array of infant passenger details including title, first name, last name, date of birth, and passport information.\n    \n- `passport.issueDate`: Required only when `isPassportIssueDateRequired` is `true` in the conditions of the Review Flight response.\n    \n- `contactDetails.mobileNumber`: Mobile number of the contact person.\n    \n- `contactDetails.email`: Email of the contact person.\n    \n\n### Response\n\nUpon successful execution, the endpoint returns a status code of 200 and a JSON object with order id as _id and amount in INR"
                    },
                    "response": []
                },
                {
                    "name": "Book + Make Payment",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "X-API-KEY",
                                "value": "{{X-API-KEY}}",
                                "description": "The variable is configured at the collection level and can be modified within the collection variables"
                            },
                            {
                                "key": "X-API-SECRET",
                                "value": "{{X-API-SECRET}}",
                                "description": "The variable is configured at the collection level and can be modified within the collection variables"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"amount\": 17816\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": {
                            "raw": "{{api-url}}/api/v1/bookings/{{_id}}/book",
                            "host": [
                                "{{api-url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "bookings",
                                "{{_id}}",
                                "book"
                            ]
                        },
                        "description": "### API Request Description\n\nThis POST request is used to create a new booking for a specific booking reference. The request payload is the booking amount.\n\n### Response\n\nThe response is in JSON format and includes various details related to the booking. However, the response contains masked or empty values for most of the fields, making it challenging to provide a complete JSON schema. If you have specific requirements for any fields in the response, please refer to the API documentation provided by the API provider for the complete JSON schema."
                    },
                    "response": []
                },
                {
                    "name": "Retrieve Booking Details",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "X-API-KEY",
                                "value": "{{X-API-KEY}}",
                                "description": "The variable is configured at the collection level and can be modified within the collection variables"
                            },
                            {
                                "key": "X-API-SECRET",
                                "value": "{{X-API-SECRET}}",
                                "description": "The variable is configured at the collection level and can be modified within the collection variables"
                            }
                        ],
                        "url": {
                            "raw": "{{api-url}}/api/v1/bookings/{{_id}}",
                            "host": [
                                "{{api-url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "bookings",
                                "{{_id}}"
                            ]
                        },
                        "description": "### Get Booking Details\n\nThis endpoint makes an HTTP GET request to retrieve the details of a specific booking identified by the booking reference code.\n\n#### Request Body\n\nThis request does not require a request body.\n\n#### Response Body\n\nThe response will be in JSON format and will contain detailed information about the booking, including price details, passenger information, flight segments, and booking status.\n\nThe response includes the following key information:\n\n- **_id**: The unique identifier for the booking.\n    \n- **priceDetail**: Information about the fare and additional charges for the booking, including details for adults, children, and infants.\n    \n- **passengers**: Details of the passengers included in the booking, categorized as adults, children, and infants.\n    \n- **segments**: Information about the flight segments included in the booking, including flight names, codes, numbers, durations, layover durations, arrival and departure details, and flight statuses.\n    \n- **duration**: Total duration of the booking.\n    \n- **departure**: Details of the departure, including date, time, airport code, name, city, and flight information.\n    \n- **arrival**: Details of the arrival, including date, time, airport code, name, city, and flight information.\n    \n- **status**: The status of the booking.\n    \n\n#### Headers\n\n- **Content-Type**: application/json\n    \n\n#### Important Note\n\nPlease note that specific values for passenger details and flight information are not included in this response.\n\nThis endpoint makes an HTTP GET request to retrieve the details of a specific booking identified by the booking reference code.\n\n#### Request Body\n\nThis request does not require a request body.\n\n#### Response Body\n\nThe response will be in JSON format and will contain detailed information about the booking, including price details, passenger information, flight segments, and booking status.\n\nThe response includes the following key information:\n\n- **_id**: The unique identifier for the booking.\n    \n- **priceDetail**: Information about the fare and additional charges for the booking, including details for adults, children, and infants.\n    \n- **passengers**: Details of the passengers included in the booking, categorized as adults, children, and infants.\n    \n- **segments**: Information about the flight segments included in the booking, including flight names, codes, numbers, durations, layover durations, arrival and departure details, and flight statuses.\n    \n- **duration**: Total duration of the booking.\n    \n- **departure**: Details of the departure, including date, time, airport code, name, city, and flight information.\n    \n- **arrival**: Details of the arrival, including date, time, airport code, name, city, and flight information.\n    \n- **status**: The status of the booking.\n    \n\nPlease note that specific values for passenger details and flight information are not included in this response."
                    },
                    "response": []
                }
            ],
            "description": "The _Booking_ folder provides endpoints to manage the end-to-end booking process, from creating a reservation to processing payments and retrieving booking details. These endpoints ensure a seamless and secure experience for users throughout their booking journey"
        }
    ],
    "event": [
        {
            "listen": "prerequest",
            "script": {
                "type": "text/javascript",
                "packages": {},
                "exec": [
                    ""
                ]
            }
        },
        {
            "listen": "test",
            "script": {
                "type": "text/javascript",
                "packages": {},
                "exec": [
                    ""
                ]
            }
        }
    ],
    "variable": [
        {
            "key": "X-API-KEY",
            "value": ""
        },
        {
            "key": "X-API-SECRET",
            "value": ""
        },
        {
            "key": "api-url",
            "value": "https://outward-api-dev.farepod.co"
        }
    ]
}