Docs

Block Flight Ticket API

Blocks the flight ticket for 15 minutes.
BODY PARAMS

RAW_BODY
json

HEADERS

Request headers

Accept : application/json
Content-Type: application/json

Request Parameters
Send these parameters in the request body:

Parameter Type Position # Description
token string RAW_BODY Required Your API token from the ClubApi dashboard. Keep it private.


Response
These fields are returned in the response:

Parameter Type Description
status string Request status: SUCCESS or FAILED.
data array List of bus stops with their IDs. Pass the ID in the Bus List API.

{
  "blockedId": "66697c70bac66",
  "orderId": "24061216160875652",
  "status": "SUCCESS",
  "journeyType": "1",
  "isInternational": "0",
  "passengerDetails": [
    {
      "dob": "2009-06-12",
      "firstName": "Rajdeep",
      "gender": "M",
      "lastName": "Kumar",
      "passengerType": "adt",
      "passportExpireDate": "",
      "passportNumber": ""
    }
  ],
  "bookingDetails": {
    "mobile": "xxxxxxxx",
    "email": "xxxxxxx@gmail.com",
    "address": "Delhi",
    "sourceName": "Ranchi",
    "destinationName": "Delhi",
    "source": "IXR",
    "destination": "DEL",
    "journeyDate": "2024-06-15",
    "returnDate": "",
    "journeyType": "1",
    "flightDetails": {
      "flightId": "66697ad2a2eb9",
      "flightName": "Air India Express",
      "flightIcon": "https://prod.rechapi.com/flight/image/airlineLogo/I5.gif",
      "flightCode": "I5",
      "flightNumber": "549",
      "flightClass": "KC",
      "departureTimeString": "2024-06-15T13:30:00",
      "arrivalTimeString": "2024-06-15T15:15:00",
      "departureTime": "01:30 PM",
      "departureDay": "2024-06-15",
      "travelDuration": "01:45 Hrs",
      "departureData": {
        "airportCode": "IXR",
        "airportName": "Ranchi",
        "terminal": "",
        "cityCode": "IXR",
        "cityName": "Ranchi",
        "countryCode": "IN",
        "countryName": "India"
      },
      "noOfStops": "0",
      "flightStops": [
        {
          "flightName": "Air India Express",
          "flightIcon": "https://prod.rechapi.com/flight/image/airlineLogo/I5.gif",
          "flightCode": "I5",
          "flightNumber": "549",
          "departureTime": "01:30 PM",
          "departureDay": "2024-06-15",
          "travelDuration": "01:45",
          "departurePlace": "Ranchi",
          "arrivalTime": "03:15 PM",
          "arrivalDay": "2024-06-15",
          "arrivalPlace": "Indira Gandhi Airport",
          "baggage": {
            "checkin": "15KG",
            "cabin": "7 Kg"
          },
          "stopDetails": "",
          "flightCraft": "320"
        }
      ],
      "arrivalTime": "03:15 PM",
      "arrivalDay": "2024-06-15",
      "arrivalData": {
        "airportCode": "DEL",
        "airportName": "Indira Gandhi Airport",
        "terminal": "3",
        "cityCode": "DEL",
        "cityName": "Delhi",
        "countryCode": "IN",
        "countryName": "India"
      },
      "fare": 5599,
      "fareDetails": [
        {
          "total": "5599",
          "title": "Total"
        },
        {
          "total": "4165",
          "title": "Base Fare"
        },
        {
          "total": "1434",
          "title": "Surcharge"
        }
      ],
      "baggage": {
        "checkin": "15KG",
        "cabin": "7 Kg"
      },
      "priceData": [
        {
          "fare": "5599",
          "fareType": "Publish",
          "fareId": "66697ad28b85e",
          "fareCode": "KNRA000",
          "fareRules": null
        },
        {
          "fare": "5599",
          "fareType": "Publish",
          "fareId": "66697ad28c018",
          "fareCode": "KNRA000",
          "fareRules": null
        },
        {
          "fare": "6019",
          "fareType": "Publish",
          "fareId": "66697ad28d710",
          "fareCode": "KNOA000",
          "fareRules": null
        }
      ],
      "isLCC": true,
      "fareCode": "KNRA000",
      "airlineRemark": "This is a Xpress Value fare.",
      "isRefundable": true,
      "seatsAvailable": "9",
      "penaltyCharges": {
        "reissueCharge": null,
        "cancellationCharge": null
      },
      "returnFlight": null,
      "slotDepartureTime": {
        "timeSlot": {
          "name": "Mid Day",
          "value": "12pm - 4pm"
        },
        "flightTime": "1718438400",
        "flightDepartureTimeString": "2024-06-15T13:30:00",
        "flightDate": "2024-06-15 13:30:00",
        "earlyMorningTime": "1718418600",
        "morningTime": "1718433000",
        "midDayTime": "1718447400",
        "eveningTime": "1718461800",
        "nightTime": "1718476176"
      },
      "connectingAirports": [],
      "isInternational": "0",
      "passengerDetails": [
        {
          "firstName": "Rajxxxx",
          "lastName": "Kumar",
          "gender": "M",
          "passengerType": "adt",
          "passportNumber": "",
          "passportExpireDate": "",
          "name": "Rajxxxxx xxxxxx",
          "dob": "2009-06-12",
          "pnr": "",
          "journeyDate": "",
          "fare": "",
          "status": "PENDING",
          "ticketId": "",
          "ssr": null
        }
      ]
    },
    "returnFlightDetails": null,
    "totalFareData": {
      "total": "5599",
      "baseFare": "4165",
      "surcharge": "1434"
    }
  },
  "rules": "UnVsZSBmb3IgSxxxxxxxxxxxxxxx",
  "returnRules": "",
  "adults": "1",
  "childrens": "0",
  "infants": "0",
  "resText": ""
}
            

              curl 'https://api.clubapi.in/flight/blockTicket.php' \
                --max-time 10 \

              -H 'accept: application/json' \
              -H 'content-type: application/json' \
              --data-raw '{"token":"xxxxxx","fare":"5599","passengerDetails":[{"dob":"2009-06-12","firstName":"Raxxxxx","gender":"M","lastName":"Kumar","passengerType":"adt","passportExpireDate":"","passportNumber":""}],"customerEmail":"xxxxxx@gmail.com","gstAddress":"","gstContactNumber":"","gstNumber":"","gstCompanyName":"","gstEmail":"","customerMobile":"xxxxxxxxx","sessionId":"66697ae4b5e7a","urid":"40394","mealId":null,"seatId":null}' \
            
          

            <?php

            $url = "https://api.clubapi.in/flight/blockTicket.php";

            $curl = curl_init($url);
            curl_setopt($curl, CURLOPT_URL, $url);
            curl_setopt($curl, CURLOPT_POST, true);
            curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10); // wait max 10 seconds to connect
            curl_setopt($curl, CURLOPT_TIMEOUT, 10); // wait max 10 seconds for response

            $headers = array(
            "accept: application/json",
            "content-type: application/json",
            );
            curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);

            $data = '{"token":"xxxxxx","fare":"5599","passengerDetails":[{"dob":"2009-06-12","firstName":"Raxxxxx","gender":"M","lastName":"Kumar","passengerType":"adt","passportExpireDate":"","passportNumber":""}],"customerEmail":"xxxxxx@gmail.com","gstAddress":"","gstContactNumber":"","gstNumber":"","gstCompanyName":"","gstEmail":"","customerMobile":"xxxxxxxxx","sessionId":"66697ae4b5e7a","urid":"40394","mealId":null,"seatId":null}';

            curl_setopt($curl, CURLOPT_POSTFIELDS, $data);

            //for debug only!
            curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
            curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);

            $resp = curl_exec($curl);
            curl_close($curl);
            var_dump($resp);

            ?>
          

            URL url = new URL("https://api.clubapi.in/flight/blockTicket.php");
            HttpURLConnection http = (HttpURLConnection)url.openConnection();
            http.setRequestMethod("POST");
            http.setDoOutput(true);
            http.setConnectTimeout(10000); // 10 seconds
            http.setReadTimeout(10000);    // 10 seconds
            http.setRequestProperty("accept", "application/json");
            http.setRequestProperty("content-type", "application/json");

            String data = "{\"token\":\"xxxxxx\",\"fare\":\"5599\",\"passengerDetails\":[{\"dob\":\"2009-06-12\",\"firstName\":\"Raxxxxx\",\"gender\":\"M\",\"lastName\":\"Kumar\",\"passengerType\":\"adt\",\"passportExpireDate\":\"\",\"passportNumber\":\"\"}],\"customerEmail\":\"xxxxxx@gmail.com\",\"gstAddress\":\"\",\"gstContactNumber\":\"\",\"gstNumber\":\"\",\"gstCompanyName\":\"\",\"gstEmail\":\"\",\"customerMobile\":\"xxxxxxxxx\",\"sessionId\":\"66697ae4b5e7a\",\"urid\":\"40394\",\"mealId\":null,\"seatId\":null}";

            byte[] out = data.getBytes(StandardCharsets.UTF_8);

            OutputStream stream = http.getOutputStream();
            stream.write(out);

            System.out.println(http.getResponseCode() + " " + http.getResponseMessage());
            http.disconnect();
          

            var url = "https://api.clubapi.in/flight/blockTicket.php";

            var httpRequest = (HttpWebRequest)WebRequest.Create(url);
            httpRequest.Method = "POST";
            httpRequest.Timeout = 10000; // 10 seconds

            httpRequest.Headers["accept"] = "application/json";
            httpRequest.Headers["content-type"] = "application/json";

            var data = "{\"token\":\"xxxxxx\",\"fare\":\"5599\",\"passengerDetails\":[{\"dob\":\"2009-06-12\",\"firstName\":\"Raxxxxx\",\"gender\":\"M\",\"lastName\":\"Kumar\",\"passengerType\":\"adt\",\"passportExpireDate\":\"\",\"passportNumber\":\"\"}],\"customerEmail\":\"xxxxxx@gmail.com\",\"gstAddress\":\"\",\"gstContactNumber\":\"\",\"gstNumber\":\"\",\"gstCompanyName\":\"\",\"gstEmail\":\"\",\"customerMobile\":\"xxxxxxxxx\",\"sessionId\":\"66697ae4b5e7a\",\"urid\":\"40394\",\"mealId\":null,\"seatId\":null}";

            using (var streamWriter = new StreamWriter(httpRequest.GetRequestStream()))
            {
              streamWriter.Write(data);
            }

            var httpResponse = (HttpWebResponse)httpRequest.GetResponse();
            using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
            {
              var result = streamReader.ReadToEnd();
            }

            Console.WriteLine(httpResponse.StatusCode);