{
  "info": {
    "name": "Skyloom Partner API v1",
    "_postman_id": "skyloom-partner-api-v1",
    "description": "Skyloom Travel Partner API v1 — search flights and book end-to-end against your prepaid balance.\n\nSetup:\n1. Variables tab → set `api_key` to the key Skyloom issued you.\n2. `base_url` is preset to https://skyloomtravel.uk/api/v1.\n3. Run 'Ping' to confirm your key. Then Search → copy an offer_id into the `offer_id` variable → Book → check status.\n\nAuth is Authorization: Bearer {{api_key}} (set at the collection level).",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [ { "key": "token", "value": "{{api_key}}", "type": "string" } ]
  },
  "variable": [
    { "key": "base_url", "value": "https://skyloomtravel.uk/api/v1" },
    { "key": "api_key", "value": "" },
    { "key": "offer_id", "value": "" },
    { "key": "booking_ref_no", "value": "" }
  ],
  "item": [
    {
      "name": "Ping (verify key)",
      "request": {
        "method": "POST",
        "header": [],
        "url": { "raw": "{{base_url}}/ping", "host": ["{{base_url}}"], "path": ["ping"] }
      }
    },
    {
      "name": "Flights — Search",
      "request": {
        "method": "POST",
        "header": [],
        "body": {
          "mode": "urlencoded",
          "urlencoded": [
            { "key": "origin", "value": "IST" },
            { "key": "destination", "value": "ASB" },
            { "key": "departure_date", "value": "2026-07-15" },
            { "key": "type", "value": "oneway" },
            { "key": "adults", "value": "1" },
            { "key": "children", "value": "0" },
            { "key": "infants", "value": "0" },
            { "key": "currency", "value": "USD" },
            { "key": "class_type", "value": "economy" }
          ]
        },
        "url": { "raw": "{{base_url}}/flights/search", "host": ["{{base_url}}"], "path": ["flights", "search"] },
        "description": "Returns offers. Copy an offer_id into the `offer_id` collection variable for booking (valid 30 min). Set `currency` to a supported code (USD, EUR or GBP) — prices come back in that currency."
      }
    },
    {
      "name": "Flights — Book",
      "request": {
        "method": "POST",
        "header": [],
        "body": {
          "mode": "urlencoded",
          "urlencoded": [
            { "key": "offer_id", "value": "{{offer_id}}" },
            { "key": "passengers", "value": "[{\"type\":\"adult\",\"title\":\"Mr\",\"first_name\":\"John\",\"last_name\":\"Doe\",\"dob\":\"1990-05-20\",\"gender\":\"M\",\"nationality\":\"GB\",\"passport_number\":\"123456789\",\"passport_expiry\":\"2031-01-01\"}]" },
            { "key": "contact_email", "value": "ops@partner.com" },
            { "key": "contact_phone", "value": "+441234567890" },
            { "key": "issue_ticket", "value": "1", "description": "1 = issue ticket now; 0 = hold PNR without ticketing" }
          ]
        },
        "url": { "raw": "{{base_url}}/flights/book", "host": ["{{base_url}}"], "path": ["flights", "book"] },
        "description": "Creates a booking from an offer_id and charges your prepaid balance. Response includes booking_ref_no, pnr and (when issued) ticket_number."
      }
    },
    {
      "name": "Flights — Booking status",
      "request": {
        "method": "GET",
        "header": [],
        "url": { "raw": "{{base_url}}/flights/booking/{{booking_ref_no}}", "host": ["{{base_url}}"], "path": ["flights", "booking", "{{booking_ref_no}}"] },
        "description": "Poll a booking until ticket_number appears (issued automatically, or later by Skyloom)."
      }
    }
  ]
}
