[javascript] iati

Viewer

  1. {
  2.         name: "book_flights",
  3.         method: "POST",
  4.         url: "https://testapi.iati.com/rest/flight/v2/search",
  5.         headers: {
  6.                 Content-Type: "application/json"
  7.         },
  8.         body: {
  9.                 from_destination: {
  10.                         city: true,
  11.                         code: "{{fromCode}}"
  12.                 },
  13.                 to_destination: {
  14.                         city: true,
  15.                         code: "{{toCode}}"
  16.                 },
  17.                 departure_date: "{{departureDate}}",
  18.                 return_date: "{{returnDate}}",
  19.                 pax_list: [
  20.                         {
  21.                                 type: "ADULT",
  22.                                 count: 1
  23.                         }
  24.                 ],
  25.                 accept_pending: true,
  26.                 cabin_type: "{{cabinType}}"
  27.         },
  28.         description: "Arabjet function sends a POST request to search for available flights based on specified parameters. It expects airport codes for departure and arrival, travel dates, a list of passengers, and cabin type."
  29. }

Editor

You can edit this paste and save as new:


File Description
  • iati
  • Paste Code
  • 17 Apr-2024
  • 727 Bytes
You can Share it: