function performsearch() {
var searchterm = '';
searchterm = $("#cid").val();
jQuery.support.cors = true;
$.ajax({
crossDomain: true,
url: "http://www.cds-connect.com/beta/api/api_search_shipment.php",
type: "POST",
data: {webapikey: '1-JVTRANS153-446-04142019', hawborcid: searchterm},
dataType: "JSON",
success: function(data) {
//$("#results").html( JSON.stringify(data)); //uncomment to see raw results
var out = '
Error: ' + shipment.error_description + ' (' + shipment.error_code + ') | |
' + shipment.error_description + ' | |
HAWB: | ' + shipment.hawb + ' |
PCS / WGT: | ' + shipment.pieces + ' / ' + shipment.weight + ' LBS' + ' |
ORIGIN: | ' + shipment.shipper_city + ' ,' + shipment.shipper_state + ' |
DESTINATION: | ' + shipment.consignee_city + ' ,' + shipment.consignee_state + ' |
STATUS: | ' + shipment.status + ' @ ' + shipment.status_datetime + ' |
SIGNED: | ' + shipment.signer + ' |
IMAGE: | Click for Image |
$("#results").html(out);
},
error: function(jqXHR, textStatus, errorThrown) {
$("#results").html(errorThrown);
}
});
//return information
return true;
}
Crown Data Systems API Template
|
|
|