将序列化数据附加到url

I am using a flight search api. My question is in my form, if I send the form fields to an ajax file as

var data = $('form').serialize();

Is there a way in my ajax file to append serialize() string sent to my api url. Right now my ajax file looks like this and although it works, it is very messy and code needs refactored:

require('lib/Unirest.php'); 

if(isset($_POST['departureAirport'])){
    $customerSessionId = $_POST['customerSessionId'];
    $departureAirport = $_POST['departureAirport'];
    $destinationAirport = $_POST['destinationAirport'];
    $departureDate = $_POST['departureDate'];
    $returnDate = $_POST['returnDate'];
    $adults = $_POST['adults'];





$getdata = Unirest::get("http://test.api.theapidomain.com/airticket/v1/list.aspx?cid=N7Y5C1&customerSessionId=".$customerSessionId."&departureAirport=".$departureAirport."&destinationAirport=".$destinationAirport."&departureDate=".$departureDate."&returnDate=".$returnDate."&adults=".$adults."", array( "Accept" => "application/json" )
);

I was really hoping for something like this:

$dataSent = //the serialized data sent
$getdata = Unirest::get("http://test.api.theapidomain.com/airticket/v1/list.aspx? + $dataSent, array( "Accept" => "application/json" )
    );

here is my jquery

<script type="text/javascript">
   $('#myform').submit(function(e){
         e.preventDefault();   
        var data = $('form').serialize(); 
        $.ajax({  
            type: "POST",  
            url: "ajax.php",  
            data: data,
            success: function(response){
            $("#result").html(response);
            }
    });
});
</script>

Send your form data as a string

Javascript

$('#myform').submit(function(e){
    e.preventDefault();   
    $.ajax({  
        type: "POST",  
        url: "ajax.php",  
        data: {data: $('form').serialize()},
        success: function(response){
            $("#result").html(response);
        }
});

Or simplified using $.post()

$('#myform').submit(function(e){
    e.preventDefault();   
    $.post("ajax.php", {data: $('form').serialize()}, function(response){
        $("#result").html(response);
    });
});

PHP

$dataSent = isset($_POST['data']) ? $_POST['data'] : NULL
$getdata = Unirest::get("http://test.api.theapidomain.com/airticket/v1/list.aspx?" . $dataSent, array( "Accept" => "application/json" ));
$dataSent = file_get_contents('php://input');

$getdata = Unirest::get("http://test.api.theapidomain.com/airticket/v1/list.aspx?".$dataSent, array( "Accept" => "application/json" )
    );

But it's not safe