{
  "info": {
    "_postman_id": "9f7b3a42-1f8e-4d2c-9b1a-8c4f2d5a9e10",
    "name": "Neptune Flights API",
    "description": "Complete B2B flight booking API \u2014 search \u2192 fare rules \u2192 create booking \u2192 passengers \u2192 reprice \u2192 book.\n\nAll requests are flat at the root level. Where multiple scenarios share the same endpoint (search, create booking, save passengers), the alternates live under each request's **Examples** tab \u2014 click the Examples dropdown next to the request name to see them with their own request bodies and sample responses.\n\n**Auth:** every request sends `Authorization: Api-Key {{api_key}}` automatically via the collection-level auth setting. Set `api_key` and `base_url` in your environment.\n\n**Auto-chaining:** test scripts capture `trace_id`, `result_index`, `out_result_index`, `in_result_index`, and `booking_id` after each step \u2014 click through the requests in order with no manual copy/paste.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "apikey",
    "apikey": [
      {
        "key": "key",
        "value": "Authorization",
        "type": "string"
      },
      {
        "key": "value",
        "value": "Api-Key {{api_key}}",
        "type": "string"
      },
      {
        "key": "in",
        "value": "header",
        "type": "string"
      }
    ]
  },
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "exec": [
          "// Refresh dynamic dates on every request so examples always use a future date.",
          "const daysFromNow = (n) => {",
          "  const d = new Date();",
          "  d.setUTCDate(d.getUTCDate() + n);",
          "  return d.toISOString().slice(0, 10) + 'T00:00:00';",
          "};",
          "pm.collectionVariables.set('depart_date', daysFromNow(30));",
          "pm.collectionVariables.set('return_date', daysFromNow(35));"
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "base_url",
      "value": "https://dev.neptune.tarzanway.com",
      "type": "string"
    },
    {
      "key": "api_key",
      "value": "REPLACE_WITH_KEY_SHARED_BY_NEPTUNE",
      "type": "string"
    },
    {
      "key": "depart_date",
      "value": ""
    },
    {
      "key": "return_date",
      "value": ""
    },
    {
      "key": "trace_id",
      "value": ""
    },
    {
      "key": "result_index",
      "value": ""
    },
    {
      "key": "out_result_index",
      "value": ""
    },
    {
      "key": "in_result_index",
      "value": ""
    },
    {
      "key": "booking_id",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "01. Flight Search",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"direct_flight\": false,\n  \"adult_count\": 1,\n  \"child_count\": 0,\n  \"infant_count\": 0,\n  \"flight_cabin_class\": 1,\n  \"journey_type\": 1,\n  \"preferred_departure_time\": \"{{depart_date}}\",\n  \"origin\": \"DEL\",\n  \"destination\": \"BOM\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{base_url}}/v1/flights/search/",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "v1",
            "flights",
            "search",
            ""
          ]
        },
        "description": "Search for flights. Each search response is valid for **exactly 15 minutes**.\n\n**Body fields:**\n- `journey_type`: \"1\" = One-way \u00b7 \"2\" = Round-trip \u00b7 \"3\" = Multi-city\n- `flight_cabin_class`: \"1\" = Any \u00b7 \"2\" = Economy \u00b7 \"3\" = Premium Economy \u00b7 \"4\" = Business \u00b7 \"5\" = Premium Business \u00b7 \"6\" = First\n- `direct_flight`: \"true\" or \"false\"\n- `preferred_departure_time`, `preferred_return_departure_time`: ISO format `YYYY-MM-DDTHH:mm:ss`\n- `origin`, `destination`: 3-letter IATA codes (e.g. \"DEL\", \"BOM\")\n- `adult_count`, `child_count`, `infant_count`: string integers, max 9 each\n\n**Examples below** cover all four canonical scenarios: domestic one-way, domestic round-trip, international one-way, international round-trip."
      },
      "response": [
        {
          "name": "Domestic one-way (DEL \u2192 BOM)",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"direct_flight\": false,\n  \"adult_count\": 1,\n  \"child_count\": 0,\n  \"infant_count\": 0,\n  \"flight_cabin_class\": 1,\n  \"journey_type\": 1,\n  \"preferred_departure_time\": \"2026-06-15T00:00:00\",\n  \"origin\": \"DEL\",\n  \"destination\": \"BOM\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/v1/flights/search/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "flights",
                "search",
                ""
              ]
            }
          },
          "status": "OK",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"trace_id\": \"b9754c9f-8bdc-4300-97db-696031eec680\",\n  \"currency\": \"INR\",\n  \"journey_type\": \"one_way\",\n  \"is_domestic\": true,\n  \"pax_count\": {\n    \"adult\": 1,\n    \"child\": 0,\n    \"infant\": 0\n  },\n  \"outbound\": [\n    {\n      \"result_index\": \"04726d37-c4d8-40fe-850f-784c5a338ccf\",\n      \"is_refundable\": true,\n      \"stop_count\": 0,\n      \"fare_name\": \"Published\",\n      \"fare_class\": \"PUBLISHED\",\n      \"airline_remark\": null,\n      \"group_id\": 74,\n      \"pricing\": {\n        \"currency\": \"INR\",\n        \"base_fare\": 4837.5,\n        \"service_fee\": 0.0,\n        \"published_fare\": 5375.0,\n        \"final_fare\": 5375.0\n      },\n      \"segments\": [\n        {\n          \"airline\": {\n            \"code\": \"AI\",\n            \"name\": \"Air India\",\n            \"flight_number\": \"814\",\n            \"fare_class\": \"S\"\n          },\n          \"origin\": {\n            \"airport_code\": \"DEL\",\n            \"city_name\": \"Delhi\",\n            \"terminal\": \"Terminal 3\",\n            \"departure_time\": \"2026-06-15T22:30:00\"\n          },\n          \"destination\": {\n            \"airport_code\": \"BOM\",\n            \"city_name\": \"Mumbai\",\n            \"terminal\": \"Terminal 2\",\n            \"arrival_time\": \"2026-06-16T00:45:00\"\n          },\n          \"cabin_class\": \"economy\",\n          \"duration_minutes\": 135,\n          \"baggage_allowance\": \"25 Kg (01 Piece only)\",\n          \"cabin_baggage_allowance\": \"7 Kg\",\n          \"seats_available\": 9\n        }\n      ]\n    }\n  ],\n  \"inbound\": []\n}"
        },
        {
          "name": "Domestic round-trip (DEL \u21cc BOM)",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"direct_flight\": false,\n  \"adult_count\": 1,\n  \"child_count\": 0,\n  \"infant_count\": 0,\n  \"flight_cabin_class\": 1,\n  \"journey_type\": 2,\n  \"preferred_departure_time\": \"2026-06-15T00:00:00\",\n  \"preferred_return_departure_time\": \"2026-06-20T00:00:00\",\n  \"origin\": \"DEL\",\n  \"destination\": \"BOM\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/v1/flights/search/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "flights",
                "search",
                ""
              ]
            }
          },
          "status": "OK",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"trace_id\": \"b9754c9f-8bdc-4300-97db-696031eec680\",\n  \"currency\": \"INR\",\n  \"journey_type\": \"round_trip\",\n  \"is_domestic\": true,\n  \"outbound\": [\n    {\n      \"result_index\": \"04726d37-c4d8-40fe-850f-784c5a338ccf\",\n      \"pricing\": {\n        \"final_fare\": 5375.0\n      },\n      \"segments\": [\n        {\n          \"origin\": {\n            \"airport_code\": \"DEL\"\n          },\n          \"destination\": {\n            \"airport_code\": \"BOM\"\n          }\n        }\n      ]\n    }\n  ],\n  \"inbound\": [\n    {\n      \"result_index\": \"bc3df4cf-4d9e-4e8a-86ba-8e7defca0b4d\",\n      \"pricing\": {\n        \"final_fare\": 5163.18\n      },\n      \"segments\": [\n        {\n          \"origin\": {\n            \"airport_code\": \"BOM\"\n          },\n          \"destination\": {\n            \"airport_code\": \"DEL\"\n          }\n        }\n      ]\n    }\n  ]\n}"
        },
        {
          "name": "International one-way (DEL \u2192 DXB)",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"direct_flight\": false,\n  \"adult_count\": 1,\n  \"child_count\": 0,\n  \"infant_count\": 0,\n  \"flight_cabin_class\": 1,\n  \"journey_type\": 1,\n  \"preferred_departure_time\": \"2026-06-15T00:00:00\",\n  \"origin\": \"DEL\",\n  \"destination\": \"DXB\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/v1/flights/search/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "flights",
                "search",
                ""
              ]
            }
          },
          "status": "OK",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"trace_id\": \"d380f8d1-3406-40c8-808a-618ab89f080a\",\n  \"currency\": \"INR\",\n  \"journey_type\": \"one_way\",\n  \"is_domestic\": false,\n  \"outbound\": [\n    {\n      \"result_index\": \"eb0dd017-c953-408e-b85d-05dbf4f333f3\",\n      \"is_refundable\": false,\n      \"pricing\": {\n        \"final_fare\": 17337.6\n      },\n      \"segments\": [\n        {\n          \"airline\": {\n            \"code\": \"AI\",\n            \"name\": \"Air India\",\n            \"flight_number\": \"929\"\n          },\n          \"origin\": {\n            \"airport_code\": \"DEL\",\n            \"city_name\": \"Delhi\",\n            \"country_name\": \"India\",\n            \"departure_time\": \"2026-06-15T07:00:00\"\n          },\n          \"destination\": {\n            \"airport_code\": \"DXB\",\n            \"city_name\": \"Dubai\",\n            \"country_name\": \"United Arab Emirates\",\n            \"arrival_time\": \"2026-06-15T09:30:00\"\n          },\n          \"duration_minutes\": 240\n        }\n      ]\n    }\n  ],\n  \"inbound\": []\n}"
        },
        {
          "name": "International round-trip (DEL \u21cc DXB)",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"direct_flight\": false,\n  \"adult_count\": 1,\n  \"child_count\": 0,\n  \"infant_count\": 0,\n  \"flight_cabin_class\": 1,\n  \"journey_type\": 2,\n  \"preferred_departure_time\": \"2026-06-15T00:00:00\",\n  \"preferred_return_departure_time\": \"2026-06-20T00:00:00\",\n  \"origin\": \"DEL\",\n  \"destination\": \"DXB\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/v1/flights/search/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "flights",
                "search",
                ""
              ]
            }
          },
          "status": "OK",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"trace_id\": \"7dbc004b-e2f7-4e51-b6d1-1e15b91b930b\",\n  \"currency\": \"INR\",\n  \"journey_type\": \"round_trip\",\n  \"is_domestic\": false,\n  \"outbound\": [\n    {\n      \"result_index\": \"f54e4dff-0efc-4b82-81a5-71d0fc59d6d1\",\n      \"pricing\": {\n        \"final_fare\": 16428.15\n      },\n      \"segments\": [\n        {\n          \"origin\": {\n            \"airport_code\": \"DEL\"\n          },\n          \"destination\": {\n            \"airport_code\": \"DXB\"\n          }\n        }\n      ],\n      \"inbound_options\": [\n        {\n          \"result_index\": \"f54e4dff-0efc-4b82-81a5-71d0fc59d6d1\",\n          \"pricing\": {\n            \"final_fare\": 16428.15\n          },\n          \"segments\": [\n            {\n              \"origin\": {\n                \"airport_code\": \"DXB\"\n              },\n              \"destination\": {\n                \"airport_code\": \"DEL\"\n              }\n            }\n          ]\n        },\n        {\n          \"result_index\": \"57e7968f-64e7-4a22-bae7-ff0391afcbb5\",\n          \"pricing\": {\n            \"final_fare\": 16428.15\n          },\n          \"segments\": [\n            {\n              \"origin\": {\n                \"airport_code\": \"DXB\"\n              },\n              \"destination\": {\n                \"airport_code\": \"DEL\"\n              }\n            }\n          ]\n        }\n      ]\n    }\n  ],\n  \"inbound\": []\n}"
        }
      ],
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "pm.test('Status is 200', () => pm.response.to.have.status(200));",
              "const r = pm.response.json();",
              "if (r.trace_id) pm.collectionVariables.set('trace_id', r.trace_id);",
              "if (r.outbound && r.outbound.length) {",
              "  const o = r.outbound[0];",
              "  pm.collectionVariables.set('out_result_index', o.result_index);",
              "  pm.collectionVariables.set('result_index', o.result_index);",
              "  if (o.inbound_options && o.inbound_options.length) {",
              "    // International RT \u2014 use the inbound option's rI as the bookable identifier",
              "    pm.collectionVariables.set('in_result_index', o.inbound_options[0].result_index);",
              "    pm.collectionVariables.set('result_index', o.inbound_options[0].result_index);",
              "  } else {",
              "    pm.collectionVariables.set('in_result_index', '');",
              "  }",
              "}",
              "if (r.inbound && r.inbound.length) {",
              "  // Domestic RT \u2014 independent top-level inbound list",
              "  pm.collectionVariables.set('in_result_index', r.inbound[0].result_index);",
              "}",
              "console.log('\u2713 saved trace_id + result_indices');"
            ]
          }
        }
      ]
    },
    {
      "name": "02. Fare Rules",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"trace_id\": \"{{trace_id}}\",\n  \"result_index\": \"{{result_index}}\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{base_url}}/v1/flights/fare-rules/",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "v1",
            "flights",
            "fare-rules",
            ""
          ]
        },
        "description": "Cancellation and change rules for a chosen flight result. Optional but recommended before locking the booking. Uses `trace_id` + `result_index` saved by the most recent search."
      },
      "response": [
        {
          "name": "Sample response",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"trace_id\": \"b9754c9f-8bdc-4300-97db-696031eec680\",\n  \"result_index\": \"04726d37-c4d8-40fe-850f-784c5a338ccf\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/v1/flights/fare-rules/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "flights",
                "fare-rules",
                ""
              ]
            }
          },
          "status": "OK",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"trace_id\": \"b9754c9f-8bdc-4300-97db-696031eec680\",\n  \"result_index\": \"04726d37-c4d8-40fe-850f-784c5a338ccf\",\n  \"expires_at\": \"2026-05-14T10:35:00\",\n  \"remaining_seconds\": 845,\n  \"rules\": [\n    {\n      \"airline\": \"AI\",\n      \"origin\": \"DEL\",\n      \"destination\": \"BOM\",\n      \"rule_text\": \"Cancellation charges: INR 3,500 + Airline Fee. Date change: INR 3,000 + fare difference.\"\n    }\n  ]\n}"
        }
      ]
    },
    {
      "name": "03. Create Booking",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"trace_id\": \"{{trace_id}}\",\n  \"result_indices\": [\"{{out_result_index}}\"]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{base_url}}/v1/flights/booking/",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "v1",
            "flights",
            "booking",
            ""
          ]
        },
        "description": "Locks fares with the airline and creates a Neptune `Booking` record. Returns a stable `booking_id` used for every subsequent step.\n\n**How many `result_indices` to send:**\n\n| Scenario | Count | Composition |\n|---|---|---|\n| Domestic one-way | 1 | `[outbound.result_index]` |\n| Domestic round-trip | 2 | `[outbound.result_index, inbound.result_index]` |\n| International one-way | 1 | `[outbound.result_index]` |\n| International round-trip | 1 | `[chosen inbound_options[j].result_index]` only \u2014 the outbound's own `result_index` is a display token, do NOT send it |\n\nThe default body uses `{{out_result_index}}` (one entry). For domestic round-trip, switch to the example below that sends two indices."
      },
      "response": [
        {
          "name": "Domestic one-way (1 result_index)",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"trace_id\": \"b9754c9f-8bdc-4300-97db-696031eec680\",\n  \"result_indices\": [\"04726d37-c4d8-40fe-850f-784c5a338ccf\"]\n}"
            },
            "url": {
              "raw": "{{base_url}}/v1/flights/booking/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "flights",
                "booking",
                ""
              ]
            }
          },
          "status": "Created",
          "code": 201,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"booking_id\": \"527668c2-9b07-47f2-9940-0d27a176acd4\",\n  \"trace_id\": \"b9754c9f-8bdc-4300-97db-696031eec680\",\n  \"itinerary_code\": \"itrjieq\",\n  \"status\": \"draft\",\n  \"is_domestic\": true,\n  \"pax_count\": {\n    \"adult\": 1,\n    \"child\": 0,\n    \"infant\": 0\n  },\n  \"expires_at\": \"2026-05-14T10:35:00\",\n  \"remaining_seconds\": 1798,\n  \"pricing\": {\n    \"currency\": \"INR\",\n    \"base_fare\": 4837.5,\n    \"service_fee\": 0.0,\n    \"tax_and_surcharge\": 537.5,\n    \"published_fare\": 5375.0,\n    \"final_fare\": 5375.0,\n    \"previous_total_amount\": 5375.0,\n    \"price_changed\": false\n  },\n  \"pax_rules\": {\n    \"leadPax\": {\n      \"dateOfBirth\": {\n        \"isVisible\": true,\n        \"isMandatoryIfVisible\": true\n      },\n      \"contactNumber\": {\n        \"isVisible\": true,\n        \"isMandatoryIfVisible\": true\n      },\n      \"email\": {\n        \"isVisible\": true,\n        \"isMandatoryIfVisible\": true\n      }\n    }\n  },\n  \"itinerary_items\": [\n    {\n      \"item_code\": \"itmqmy2\",\n      \"result_index\": \"04726d37-c4d8-40fe-850f-784c5a338ccf\",\n      \"journey_type\": \"one_way\",\n      \"is_refundable\": true,\n      \"fare_name\": \"Published\",\n      \"legs\": [\n        {\n          \"direction\": \"outbound\",\n          \"stop_count\": 0,\n          \"segments\": [\n            {\n              \"airline\": {\n                \"code\": \"AI\"\n              },\n              \"origin\": {\n                \"airport_code\": \"DEL\"\n              },\n              \"destination\": {\n                \"airport_code\": \"BOM\"\n              }\n            }\n          ]\n        }\n      ]\n    }\n  ]\n}"
        },
        {
          "name": "Domestic round-trip (2 result_indices)",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"trace_id\": \"b9754c9f-8bdc-4300-97db-696031eec680\",\n  \"result_indices\": [\n    \"04726d37-c4d8-40fe-850f-784c5a338ccf\",\n    \"bc3df4cf-4d9e-4e8a-86ba-8e7defca0b4d\"\n  ]\n}"
            },
            "url": {
              "raw": "{{base_url}}/v1/flights/booking/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "flights",
                "booking",
                ""
              ]
            }
          },
          "status": "Created",
          "code": 201,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"booking_id\": \"527668c2-9b07-47f2-9940-0d27a176acd4\",\n  \"trace_id\": \"b9754c9f-8bdc-4300-97db-696031eec680\",\n  \"itinerary_code\": \"itrjieq\",\n  \"status\": \"draft\",\n  \"is_domestic\": true,\n  \"pricing\": {\n    \"currency\": \"INR\",\n    \"final_fare\": 10748.93\n  },\n  \"itinerary_items\": [\n    {\n      \"item_code\": \"itmqmy2\",\n      \"result_index\": \"04726d37-...\",\n      \"journey_type\": \"round_trip\",\n      \"legs\": [\n        {\n          \"direction\": \"outbound\",\n          \"stop_count\": 0,\n          \"segments\": [\n            \"...\"\n          ]\n        }\n      ]\n    },\n    {\n      \"item_code\": \"itmqmyc\",\n      \"result_index\": \"bc3df4cf-...\",\n      \"journey_type\": \"round_trip\",\n      \"legs\": [\n        {\n          \"direction\": \"inbound\",\n          \"stop_count\": 0,\n          \"segments\": [\n            \"...\"\n          ]\n        }\n      ]\n    }\n  ]\n}"
        },
        {
          "name": "International one-way (1 result_index)",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"trace_id\": \"d380f8d1-3406-40c8-808a-618ab89f080a\",\n  \"result_indices\": [\"eb0dd017-c953-408e-b85d-05dbf4f333f3\"]\n}"
            },
            "url": {
              "raw": "{{base_url}}/v1/flights/booking/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "flights",
                "booking",
                ""
              ]
            }
          },
          "status": "Created",
          "code": 201,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"booking_id\": \"a7b8c9d0-e1f2-3456-7890-abcdef123456\",\n  \"trace_id\": \"d380f8d1-3406-40c8-808a-618ab89f080a\",\n  \"itinerary_code\": \"itrjieq\",\n  \"status\": \"draft\",\n  \"is_domestic\": false,\n  \"pricing\": {\n    \"currency\": \"INR\",\n    \"final_fare\": 17337.6\n  },\n  \"pax_rules\": {\n    \"leadPax\": {\n      \"passportNumber\": {\n        \"isVisible\": true,\n        \"isMandatoryIfVisible\": true\n      },\n      \"passportExpiry\": {\n        \"isVisible\": true,\n        \"isMandatoryIfVisible\": true\n      },\n      \"nationality\": {\n        \"isVisible\": true,\n        \"isMandatoryIfVisible\": true\n      }\n    }\n  },\n  \"itinerary_items\": [\n    {\n      \"journey_type\": \"one_way\",\n      \"legs\": [\n        {\n          \"direction\": \"outbound\"\n        }\n      ]\n    }\n  ]\n}"
        },
        {
          "name": "International round-trip (1 inbound_options result_index)",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"trace_id\": \"7dbc004b-e2f7-4e51-b6d1-1e15b91b930b\",\n  \"result_indices\": [\"57e7968f-64e7-4a22-bae7-ff0391afcbb5\"]\n}"
            },
            "url": {
              "raw": "{{base_url}}/v1/flights/booking/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "flights",
                "booking",
                ""
              ]
            }
          },
          "status": "Created",
          "code": 201,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"booking_id\": \"f3e4d5c6-b7a8-9012-3456-789012345abc\",\n  \"trace_id\": \"7dbc004b-...\",\n  \"itinerary_code\": \"itrq0o7\",\n  \"status\": \"draft\",\n  \"is_domestic\": false,\n  \"pricing\": {\n    \"currency\": \"INR\",\n    \"final_fare\": 16428.15\n  },\n  \"itinerary_items\": [\n    {\n      \"journey_type\": \"round_trip\",\n      \"legs\": [\n        {\n          \"direction\": \"outbound\"\n        }\n      ]\n    },\n    {\n      \"journey_type\": \"round_trip\",\n      \"legs\": [\n        {\n          \"direction\": \"inbound\"\n        }\n      ]\n    }\n  ]\n}"
        }
      ],
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "pm.test('Status is 201', () => pm.response.to.have.status(201));",
              "const r = pm.response.json();",
              "if (r.booking_id) {",
              "  pm.collectionVariables.set('booking_id', r.booking_id);",
              "  console.log('\u2713 booking_id saved:', r.booking_id);",
              "}"
            ]
          }
        }
      ]
    },
    {
      "name": "04. Save Passengers",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"passengers\": [\n    {\n      \"title\": \"Mr\",\n      \"first_name\": \"Aman\",\n      \"last_name\": \"Sharma\",\n      \"gender\": \"male\",\n      \"pax_type\": \"adult\",\n      \"dob\": \"1990-01-15\",\n      \"is_lead\": true,\n      \"nationality\": \"IN\",\n      \"email\": \"aman@example.com\",\n      \"contact_number\": \"9876543210\",\n      \"cell_country_code\": \"91\",\n      \"address_line_one\": \"12 MG Road\",\n      \"address_line_two\": \"Indiranagar\",\n      \"city\": \"Bangalore\",\n      \"country_code\": \"IN\",\n      \"country_name\": \"India\",\n      \"passport_number\": \"T1234563\",\n      \"passport_expiry\": \"2030-12-06\",\n      \"passport_issue_date\": \"2020-12-06\"\n    }\n  ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{base_url}}/v1/flights/booking/{{booking_id}}/passengers/",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "v1",
            "flights",
            "booking",
            "{{booking_id}}",
            "passengers",
            ""
          ]
        },
        "description": "Submit traveller details. Passport fields are optional for domestic but mandatory for international. Lead passenger needs `email` and `contact_number`. Inspect `pax_rules.leadPax` / `pax_rules.adult` from create-booking to know exactly which fields are required for this specific itinerary.\n\n**SSR (meal \u00b7 baggage \u00b7 seat)** is optional \u2014 see the *With SSR* example below for the structure. Each SSR entry is per-segment (`origin` \u2192 `destination`).\n\n**Duplicate detection:** the response includes `duplicates_found` + `duplicates[]` when the system spots a recent (last 7 days) booking with the same lead passenger + sector + date. Booking is NOT blocked \u2014 your app decides whether to proceed to `/book/`."
      },
      "response": [
        {
          "name": "Without SSR",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"passengers\": [\n    {\n      \"title\": \"Mr\",\n      \"first_name\": \"Aman\",\n      \"last_name\": \"Sharma\",\n      \"gender\": \"male\",\n      \"pax_type\": \"adult\",\n      \"dob\": \"1990-01-15\",\n      \"is_lead\": true,\n      \"nationality\": \"IN\",\n      \"email\": \"aman@example.com\",\n      \"contact_number\": \"9876543210\",\n      \"cell_country_code\": \"91\",\n      \"address_line_one\": \"12 MG Road\",\n      \"city\": \"Bangalore\",\n      \"country_code\": \"IN\",\n      \"country_name\": \"India\",\n      \"passport_number\": \"T1234563\",\n      \"passport_expiry\": \"2030-12-06\",\n      \"passport_issue_date\": \"2020-12-06\"\n    }\n  ]\n}"
            },
            "url": {
              "raw": "{{base_url}}/v1/flights/booking/527668c2-.../passengers/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "flights",
                "booking",
                "527668c2-...",
                "passengers",
                ""
              ]
            }
          },
          "status": "OK",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"booking_id\": \"527668c2-9b07-47f2-9940-0d27a176acd4\",\n  \"trace_id\": \"b9754c9f-...\",\n  \"itinerary_code\": \"itrjieq\",\n  \"status\": \"passenger_saved\",\n  \"pricing\": {\n    \"currency\": \"INR\",\n    \"final_fare\": 5375.0\n  },\n  \"itinerary_items\": [\n    \"...\"\n  ],\n  \"duplicates_found\": false,\n  \"duplicates\": []\n}"
        },
        {
          "name": "With SSR (meal + baggage + seat)",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"passengers\": [\n    {\n      \"title\": \"Mr\",\n      \"first_name\": \"Aman\",\n      \"last_name\": \"Sharma\",\n      \"gender\": \"male\",\n      \"pax_type\": \"adult\",\n      \"dob\": \"1990-01-15\",\n      \"is_lead\": true,\n      \"nationality\": \"IN\",\n      \"email\": \"aman@example.com\",\n      \"contact_number\": \"9876543210\",\n      \"cell_country_code\": \"91\",\n      \"address_line_one\": \"12 MG Road\",\n      \"city\": \"Bangalore\",\n      \"country_code\": \"IN\",\n      \"country_name\": \"India\",\n      \"passport_number\": \"T1234563\",\n      \"passport_expiry\": \"2030-12-06\",\n      \"ssr\": {\n        \"meal\": [\n          { \"code\": \"VCSW\", \"origin\": \"DEL\", \"destination\": \"BOM\", \"amt\": 400 }\n        ],\n        \"baggage\": [\n          { \"code\": \"IXBB\", \"origin\": \"DEL\", \"destination\": \"BOM\", \"amt\": 3000 }\n        ],\n        \"seat\": [\n          { \"code\": \"4B\", \"origin\": \"DEL\", \"destination\": \"BOM\", \"amt\": 450, \"seat\": \"4B\" }\n        ]\n      }\n    }\n  ]\n}"
            },
            "url": {
              "raw": "{{base_url}}/v1/flights/booking/527668c2-.../passengers/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "flights",
                "booking",
                "527668c2-...",
                "passengers",
                ""
              ]
            }
          },
          "status": "OK",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"booking_id\": \"527668c2-9b07-47f2-9940-0d27a176acd4\",\n  \"status\": \"passenger_saved\",\n  \"pricing\": {\n    \"currency\": \"INR\",\n    \"final_fare\": 9225.0\n  },\n  \"itinerary_items\": [\n    \"...\"\n  ],\n  \"duplicates_found\": false,\n  \"duplicates\": []\n}"
        },
        {
          "name": "With duplicate booking detected",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{ \"passengers\": [ \"... same as Without SSR ...\" ] }"
            },
            "url": {
              "raw": "{{base_url}}/v1/flights/booking/527668c2-.../passengers/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "flights",
                "booking",
                "527668c2-...",
                "passengers",
                ""
              ]
            }
          },
          "status": "OK",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"booking_id\": \"527668c2-9b07-47f2-9940-0d27a176acd4\",\n  \"status\": \"passenger_saved\",\n  \"pricing\": {\n    \"final_fare\": 5375.0,\n    \"...\": \"...\"\n  },\n  \"itinerary_items\": [\n    \"...\"\n  ],\n  \"duplicates_found\": true,\n  \"duplicates\": [\n    {\n      \"pnr\": \"9DYP4N\",\n      \"status\": \"CONFIRMED\",\n      \"bms_booking_code\": \"tk34z\",\n      \"member_code\": \"mjcoq\",\n      \"origin_city_code\": \"DEL\",\n      \"destination_city_code\": \"BOM\",\n      \"created_at\": \"2026-05-12T18:21:32.000Z\"\n    }\n  ]\n}"
        }
      ]
    },
    {
      "name": "05. Reprice",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{base_url}}/v1/flights/booking/{{booking_id}}/reprice/",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "v1",
            "flights",
            "booking",
            "{{booking_id}}",
            "reprice",
            ""
          ]
        },
        "description": "Revalidate the price with the airline before booking. If the fare has moved since create-booking, `pricing.price_changed` will be `true` \u2014 your app should confirm with the user before continuing.\n\nNo request body required. The `booking_id` is in the path."
      },
      "response": [
        {
          "name": "Sample response \u2014 price unchanged",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{}"
            },
            "url": {
              "raw": "{{base_url}}/v1/flights/booking/527668c2-.../reprice/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "flights",
                "booking",
                "527668c2-...",
                "reprice",
                ""
              ]
            }
          },
          "status": "OK",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"booking_id\": \"527668c2-9b07-47f2-9940-0d27a176acd4\",\n  \"status\": \"priced\",\n  \"pricing\": {\n    \"currency\": \"INR\",\n    \"base_fare\": 4837.5,\n    \"tax_and_surcharge\": 537.5,\n    \"published_fare\": 5375.0,\n    \"final_fare\": 5375.0,\n    \"previous_total_amount\": 5375.0,\n    \"price_changed\": false\n  },\n  \"itinerary_items\": [\n    \"...\"\n  ]\n}"
        }
      ]
    },
    {
      "name": "06. Book (issue PNR)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{base_url}}/v1/flights/booking/{{booking_id}}/book/",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "v1",
            "flights",
            "booking",
            "{{booking_id}}",
            "book",
            ""
          ]
        },
        "description": "Issues the PNR. Synchronous \u2014 the response carries the confirmation. **Irreversible**: only call when the user has committed.\n\nNo request body required."
      },
      "response": [
        {
          "name": "Sample response",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{}"
            },
            "url": {
              "raw": "{{base_url}}/v1/flights/booking/527668c2-.../book/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "flights",
                "booking",
                "527668c2-...",
                "book",
                ""
              ]
            }
          },
          "status": "OK",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"booking_id\": \"527668c2-9b07-47f2-9940-0d27a176acd4\",\n  \"status\": \"confirmed\",\n  \"pnr\": \"ABC123\",\n  \"bms_booking_code\": \"tk34z\",\n  \"itinerary_code\": \"itrjieq\",\n  \"is_domestic\": true,\n  \"pricing\": {\n    \"currency\": \"INR\",\n    \"final_fare\": 5375.0\n  },\n  \"itinerary_items\": [\n    \"...\"\n  ]\n}"
        }
      ]
    },
    {
      "name": "07. Get Booking",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{base_url}}/v1/flights/booking/{{booking_id}}/",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "v1",
            "flights",
            "booking",
            "{{booking_id}}",
            ""
          ]
        },
        "description": "Returns the current state of the booking, including latest pricing and PNR if confirmed."
      },
      "response": [
        {
          "name": "Sample response",
          "originalRequest": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/v1/flights/booking/527668c2-.../",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "flights",
                "booking",
                "527668c2-...",
                ""
              ]
            }
          },
          "status": "OK",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"booking_id\": \"527668c2-9b07-47f2-9940-0d27a176acd4\",\n  \"trace_id\": \"b9754c9f-...\",\n  \"itinerary_code\": \"itrjieq\",\n  \"status\": \"confirmed\",\n  \"pnr\": \"ABC123\",\n  \"is_domestic\": true,\n  \"pricing\": {\n    \"currency\": \"INR\",\n    \"final_fare\": 5375.0\n  },\n  \"itinerary_items\": [\n    \"...\"\n  ]\n}"
        }
      ]
    },
    {
      "name": "08. List Bookings",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{base_url}}/v1/bookings/?limit=25&offset=0",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "v1",
            "bookings",
            ""
          ],
          "query": [
            {
              "key": "limit",
              "value": "25"
            },
            {
              "key": "offset",
              "value": "0"
            }
          ]
        },
        "description": "Paginated list of all bookings for your partner account. Most recent first. Tune `limit` (max 100) and `offset` for pagination."
      },
      "response": [
        {
          "name": "Sample response",
          "originalRequest": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/v1/bookings/?limit=25&offset=0",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "bookings",
                ""
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "25"
                },
                {
                  "key": "offset",
                  "value": "0"
                }
              ]
            }
          },
          "status": "OK",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"count\": 132,\n  \"next\": \"https://dev.neptune.tarzanway.com/v1/bookings/?limit=25&offset=25\",\n  \"previous\": null,\n  \"results\": [\n    {\n      \"id\": \"527668c2-9b07-47f2-9940-0d27a176acd4\",\n      \"status\": \"confirmed\",\n      \"pnr\": \"ABC123\",\n      \"trace_id\": \"b9754c9f-...\",\n      \"itinerary_code\": \"itrjieq\",\n      \"currency\": \"INR\",\n      \"amount_charged\": 5375.0,\n      \"passengers\": [\n        \"...\"\n      ],\n      \"flight_segments\": [\n        \"...\"\n      ],\n      \"created_at\": \"2026-05-14T10:12:33Z\",\n      \"modified_at\": \"2026-05-14T10:15:01Z\"\n    }\n  ]\n}"
        }
      ]
    },
    {
      "name": "09. Get Booking (from list)",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{base_url}}/v1/bookings/{{booking_id}}/",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "v1",
            "bookings",
            "{{booking_id}}",
            ""
          ]
        },
        "description": "Fetch a specific booking by its `booking_id` from the bookings list endpoint. Returns the partner-side record (status, PNR, amounts, stored passengers, etc.).\n\nNote: this is different from `07. Get Booking` \u2014 that endpoint returns the live itinerary state from the upstream airline, this one returns the persisted record from our database."
      },
      "response": [
        {
          "name": "Sample response",
          "originalRequest": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/v1/bookings/527668c2-.../",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "bookings",
                "527668c2-...",
                ""
              ]
            }
          },
          "status": "OK",
          "code": 200,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"id\": \"527668c2-9b07-47f2-9940-0d27a176acd4\",\n  \"status\": \"confirmed\",\n  \"pnr\": \"ABC123\",\n  \"trace_id\": \"b9754c9f-...\",\n  \"itinerary_code\": \"itrjieq\",\n  \"currency\": \"INR\",\n  \"amount_charged\": 5375.0,\n  \"passengers\": [\n    \"...\"\n  ],\n  \"flight_segments\": [\n    \"...\"\n  ],\n  \"created_at\": \"2026-05-14T10:12:33Z\",\n  \"modified_at\": \"2026-05-14T10:15:01Z\"\n}"
        }
      ]
    }
  ]
}
