Validate a flight
curl --request POST \
--url https://attend.hackclub.com/api/v1/travel/validate_flight \
--header 'Content-Type: application/json' \
--cookie _attend_session= \
--data '
{
"flight_code": "AA100",
"departure_date": "2026-08-01"
}
'import requests
url = "https://attend.hackclub.com/api/v1/travel/validate_flight"
payload = {
"flight_code": "AA100",
"departure_date": "2026-08-01"
}
headers = {
"cookie": "_attend_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: '_attend_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({flight_code: 'AA100', departure_date: '2026-08-01'})
};
fetch('https://attend.hackclub.com/api/v1/travel/validate_flight', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://attend.hackclub.com/api/v1/travel/validate_flight",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'flight_code' => 'AA100',
'departure_date' => '2026-08-01'
]),
CURLOPT_COOKIE => "_attend_session=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://attend.hackclub.com/api/v1/travel/validate_flight"
payload := strings.NewReader("{\n \"flight_code\": \"AA100\",\n \"departure_date\": \"2026-08-01\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "_attend_session=")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://attend.hackclub.com/api/v1/travel/validate_flight")
.header("cookie", "_attend_session=")
.header("Content-Type", "application/json")
.body("{\n \"flight_code\": \"AA100\",\n \"departure_date\": \"2026-08-01\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://attend.hackclub.com/api/v1/travel/validate_flight")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = '_attend_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"flight_code\": \"AA100\",\n \"departure_date\": \"2026-08-01\"\n}"
response = http.request(request)
puts response.read_body{
"valid": true,
"error": "<string>",
"flight_code": "AA100",
"carrier": "AA",
"number": "100",
"multiple_flights": true,
"airline": {
"code": "<string>",
"name": "<string>",
"country": "<string>",
"logo_url": "<string>"
},
"flights": [
{
"departure_airport": "<string>",
"arrival_airport": "<string>",
"departure_time": "2023-11-07T05:31:56Z",
"arrival_time": "2023-11-07T05:31:56Z",
"local_departure": "<string>",
"local_arrival": "<string>",
"status": "<string>",
"aircraft_type": "<string>"
}
],
"departure_airport": "<string>",
"arrival_airport": "<string>",
"departure_time": "2023-11-07T05:31:56Z",
"arrival_time": "2023-11-07T05:31:56Z",
"status": "<string>",
"aircraft_type": "<string>"
}Travel
Validate a flight
Validate a flight code + date and return matching legs and airline info. Authenticated with the web session cookie, not a bearer token. Always responds 200; check the valid field.
POST
/
travel
/
validate_flight
Validate a flight
curl --request POST \
--url https://attend.hackclub.com/api/v1/travel/validate_flight \
--header 'Content-Type: application/json' \
--cookie _attend_session= \
--data '
{
"flight_code": "AA100",
"departure_date": "2026-08-01"
}
'import requests
url = "https://attend.hackclub.com/api/v1/travel/validate_flight"
payload = {
"flight_code": "AA100",
"departure_date": "2026-08-01"
}
headers = {
"cookie": "_attend_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: '_attend_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({flight_code: 'AA100', departure_date: '2026-08-01'})
};
fetch('https://attend.hackclub.com/api/v1/travel/validate_flight', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://attend.hackclub.com/api/v1/travel/validate_flight",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'flight_code' => 'AA100',
'departure_date' => '2026-08-01'
]),
CURLOPT_COOKIE => "_attend_session=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://attend.hackclub.com/api/v1/travel/validate_flight"
payload := strings.NewReader("{\n \"flight_code\": \"AA100\",\n \"departure_date\": \"2026-08-01\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "_attend_session=")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://attend.hackclub.com/api/v1/travel/validate_flight")
.header("cookie", "_attend_session=")
.header("Content-Type", "application/json")
.body("{\n \"flight_code\": \"AA100\",\n \"departure_date\": \"2026-08-01\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://attend.hackclub.com/api/v1/travel/validate_flight")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = '_attend_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"flight_code\": \"AA100\",\n \"departure_date\": \"2026-08-01\"\n}"
response = http.request(request)
puts response.read_body{
"valid": true,
"error": "<string>",
"flight_code": "AA100",
"carrier": "AA",
"number": "100",
"multiple_flights": true,
"airline": {
"code": "<string>",
"name": "<string>",
"country": "<string>",
"logo_url": "<string>"
},
"flights": [
{
"departure_airport": "<string>",
"arrival_airport": "<string>",
"departure_time": "2023-11-07T05:31:56Z",
"arrival_time": "2023-11-07T05:31:56Z",
"local_departure": "<string>",
"local_arrival": "<string>",
"status": "<string>",
"aircraft_type": "<string>"
}
],
"departure_airport": "<string>",
"arrival_airport": "<string>",
"departure_time": "2023-11-07T05:31:56Z",
"arrival_time": "2023-11-07T05:31:56Z",
"status": "<string>",
"aircraft_type": "<string>"
}Authorizations
Web session cookie (Devise). Used only by the Travel endpoints.
Body
application/json
Response
200 - application/json
Validation result (valid or not).
Present when valid is false.
Example:
"AA100"
Example:
"AA"
Example:
"100"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Duplicated from flights[0].
Was this page helpful?