API Reference

This page provides details, examples and object definition for the FlyWINDOW callback

Introduction

The FlyWINDOW callback is a feature of the FlyWINDOW that can provide you all the details about a recent booking creation.

In the callback you will find the flight information and associated rate, shipment details, as well as user information. In other words, you will have all the information needed to recreate the booking and link it to the corresponding user even if your user didn't create the shipment in your TMS first. This feature will enhance productivity and reduce human error as you will remove manual input for booking creation.

To be able to receive the FlyWINDOW callback you need to contact us to set a URL allowing http POST requests.

FlyWINDOW Callback Object Definition

NameTypeDescription
awbstringSearch Id for getting missing results
flightUUIDstringUnique flight id used for booking
rateIDstringFlyWINDOW link
bookingStatusstringStatus of the booking after creation
bookingCreatedDatestringbooking creation date
flightFlightFlight associated to booking
searchRequestSearchRequestShipment details used for booking
userUserUser that performed the booking

Flight Object

NameTypeDescription
flightUUIDstringUnique flight id for booking
flightUIDstringUnique flight id for booking (DEPRECATED)
airlineCodestringFlight airline code
flightNumberstringFlight number (with airline code). In case of connected flights flight numbers of every leg, e.g. "00768-00687"
arrivalTimestringFlight arrival time and date in the format YYYY-MM-DDTHH:MM:SS±HH:MM
arrivalAirportstringFlight arrival airport code
departureTimestringFlight departure time and date in the format YYYY-MM-DDTHH:MM:SS±HH:MM
departureAirportstringFlight departure airport code
latestAcceptanceTimestringLatest acceptance time at the first origin warehouse
timeOfAvailabilitystringThe earliest time the shipment will be at the final destination
stopsintNumber of stops
legs[]LegLegs of the flight
featuresFlightFeaturesFeatures available for the flight
rates[]RateRates available for the flight
availableboolIndicates whether flight is eligible for booking ("bookable" in FlightFeatures has to be true as well)
availableReasonstringReasons for not available booking
awbPrefixes[]stringAWB prefixes that can be used with the airline
airlineConditionsstringConditions imposed by airline
salesConditionsstringConditions related to the sale of the rate imposed by airline (can be related to product, market, etc.)
contacts[]stringEmail addresses for questions regarding booking to GHA or airline
handlingInfoLinkstringLink to Terms and Conditions
ghaNamestringGround Handling Agent name
hlestring"Heure Limite d'Enregistrement" refer to latestAcceptanceTime
ghaAddressstringGround Handling Agent address

Leg Object

NameTypeDescription
flightNumberstringLeg flight number (with airline code)
arrivalTimestringLeg arrival time and date in the format YYYY-MM-DDTHH:MM:SS±HH:MM
arrivalAirportstringLeg arrival airport code
departureTimestringLeg departure time and date in the format YYYY-MM-DDTHH:MM:SS±HH:MM
departureAirportstringLeg departure airport code
bodyTypestringLeg aircraft body type (Narrowbody, Widebody, Surface, Freighter or Unknown)
aircraftCodestringLeg aircraft code (ex: B72)
co2CO2CalculationLeg CO2 emissions calculation
detailedFlightNumberFlightNumberLeg flight number as carrier code and number separately

CO2Calculation Object

NameTypeDescription
valuefloat64CO2 emissions in kg
estimationboolIndicates whether the value is an estimation or a calculated exact number

FlightNumber Object

NameTypeDescription
carrierstringCarrier code part of a flight number
numberstringNumbers part of a flight number

FlightFeatures Object

NameTypeDescription
bookableboolIndicates whether flight is eligible for booking ("available" in the Flight has to be true as well)
awbOptionalboolIndicates whether booking will require an AWB number or not
allotmentboolIndicates whether flight booking is eligible to be placed under allotment

Rate Object

NameTypeDescription
idstringRate id for booking
namestringRate name provided by airline
typestringRate type (live, express, Market, Contract, Promo or Express*)
currencystringRate currency
netRatefloat64Net rate: applied to a shipment without the charges calculation (rate/kg)
allInRatefloat64All in rate: applied to a shipment with the charges calculation (rate/kg)
totalfloat64Total price applied to a shipment
minimumRateboolIndicates whether the rate to apply is the lowest price the carrier will charge for this shipment
lastUpdatedDatestringRate last updated date
charges[]ChargeRate charges
ocdc[]ChargeRate OCDC charges
isManualRateboolIndicates whether the rate has been manually uploaded into cargoAi system (not bookable with API)
isSpotQuoteRateboolIndicates whether the rate is a spot rate
latestAcceptanceTimestringLatest acceptance time at the first origin warehouse (rate specific)
timeOfAvailabilitystringThe earliest time the shipment will be at the final destination (rate specific)
handlingCodes[]stringHandling codes for which rate is applicable
allotmentCodestringAllotment code

*Dynamic rates are all in lower case whereas static rates are starting with a capital letter. express is dynamic; Express is static.

**In airfreight, OCDC (Other Charge Due Carrier) refers to additional fees or surcharges that the carrier imposes on the shipment. These charges are collected to cover costs not included in the base airfreight rate, which could arise from handling, security, fuel, or special services required for the cargo. Most of the time they are collected apart and are part of the all-in rate calculation, because they are just here as information and depends of the shipments.

Charge Object

NameTypeDescription
labelstringCharge label
ratefloat64Charge rate
typestringCharge type (SHIPMENT, GROSS_WEIGHT or CHARGEABLE_WEIGHT)*
codestringCharge code
minAmountfloat64Refers to the minimum charge a carrier will apply to a shipment**
maxAmountfloat64Refers to a cap or maximum charge a carrier will apply to a shipment**

*Please, see details about charge types here

**after calculation of the charge rate times the type (Shipment or Gross weight or Chargeable weight) and if the total is lower/higher than the amount displayed

SearchRequest Object

NameTypeDescription
destinationCriteriastringshipment final destination
originCriteriastringshipment first origin
requestDatestringshipment's search requested departure date
offsetintshipment's search offset
productstringshipment's product code
weightfloat64shipment's total weight
piecesintshipment's total pieces
chargeableWeightfloat64shipment's total chargeable weight*
dimensions[]Dimensionshipment's piece group dimensions
specialHandlingCodes[]stringshipment's handling codes
dangerousGoods[]stringshipment's dangerous goods (if any)
scrs[]stringshipment's scrs code (Specific Commodity Rate code)
globalHS[]stringshipment's global HS codes (Harmonized System code)
europeanHS[]stringshipment's European HS codes (Harmonized System code)
volumefloat64shipment's total volume
airlinestringairline code (if filtered during user's search)
isScreenedbooleanflag to inform if booking is screened (secured)
measurementUnitstringshipment's measurement unit (METRIC, IMPERIAL) (unit of the shipments will depend on the value of measurement unit:

- Metric: Kg, cm, cbm
- Imperial: Kg, in, cbf
filtersFiltersshipment's search filters to refine API results

*Please, see details about chargeable weight here

Dimension Object

NameTypeDescription
piecesintnumber of piece of the piece group
lengthfloat64indicates length of piece group
widthfloat64indicates width of piece group
heightfloat64indicates height of piece group
weightfloat64indicates piece group weight (per piece or total, based on weightType field value)
loadTypestringenum["DIMENSIONS", "TOTAL", "BUP"]
weightTypestringindicates if piece group weight is total or per piece enum["PER_ITEM", "TOTAL"]
stackablebooleanindicates if shipment can be stack during loading in aircraft
tiltablebooleanindicates if shipment is turnable during loading in aircraft
toploadablebooleanindicates if shipment can be loaded on top during loading in aircraft
uldTypebooleanindicates piece group uld type (if loadType = BUP)
volumefloat64volume of the piece group

Filters Object

NameTypeDescription
airlineCodestringfilters results to a specific airline - accepts only IATA 2 letter code
withRateOnlybooleanfilters results to return only flights with a rate
liveRequestsbooleanfilters results to return only Airlines' APIs results
isOriginByCitybooleanindicates if the origin of your search is a city code or an airport code (only true if isDestinationByCity is false)
isDestinationByCitybooleanindicates if the destination of your search is a city code or an airport code (only true if isOriginByCity is false)

User Object

NameTypeDescription
airportstringuser's office airport code (or closest airport)
countrystringuser's country code
iatastringuser's IATA code
cassstringuser's Cass code
userNamestringusername of the user
firstNamestringfirst name of the user
lastNamestringlast name of the user
emailstringuser's email address

FlyWINDOW Callback example

{ "awb": "000-00092142", "flightUUID": "d88ea3cc-864e-11ef-9f4f-465af58dc8d0", "rateID": "d88ea3ab-864e-11ef-9f4f-465af58dc8d0", "bookingStatus": "PENDING_DELIVERY", "bookingCreatedDate": "2024-10-09T14:58:34+00:00", "flight": { "flightUUID": "d88ea3cc-864e-11ef-9f4f-465af58dc8d0", "flightUID": "d88ea3cc-864e-11ef-9f4f-465af58dc8d0", "airlineCode": "00", "flightNumber": "00768", "arrivalTime": "2024-10-14T04:00:01+08:00", "arrivalAirport": "SIN", "departureTime": "2024-10-13T16:00:01+02:00", "departureAirport": "CDG", "latestAcceptanceTime": "2024-10-13T11:00:01+02:00", "timeOfAvailability": "2024-10-14T09:00:01+08:00", "legs": [ { "flightNumber": "00768", "arrivalTime": "2024-10-14T04:00:01+08:00", "arrivalAirport": "SIN", "departureTime": "2024-10-13T16:00:01+02:00", "departureAirport": "CDG", "bodyType": "Widebody", "aircraftCode": "777", "parentFlightUID": "d88ea3cc-864e-11ef-9f4f-465af58dc8d0", "parentFlightUUID": "d88ea3cc-864e-11ef-9f4f-465af58dc8d0", "co2": { "value": 537.4540892175812, "estimation": false } } ], "sortingFlightKey": "00007682024-10-13", "features": { "bookable": true, "awbOptional": true }, "rates": [ { "id": "d88ea3ab-864e-11ef-9f4f-465af58dc8d0", "name": "Spot", "type": "live", "currency": "EUR", "netRate": 6.08, "allInRate": 6.23, "total": 1246, "minimumRate": false, "lastUpdatedDate": "", "charges": [ { "label": "Fuel surcharge", "rate": 0.07, "type": "CHARGEABLE_WEIGHT", "code": "fsc", "minAmount": 0, "maxAmount": 0 }, { "label": "Security surcharge", "rate": 0.08, "type": "GROSS_WEIGHT", "code": "ssc", "minAmount": 0, "maxAmount": 0 } ], "ocdc": null, "isSpotQuoteRate": true, "handlingCodes": [ "GCR" ], "coloaderOfficeId": 0 } ], "available": true, "source": "AI-MOCK", "awbPrefixes": [ "000" ], "airlineConditions": "\n\t<b>1- Offer subject to capacity when booking.</b>\n\t2- Quotation reference to be imperatively mentioned when booking.\n\t3- This quotation is valid for the packaging indicated only, in the event of modification, please make a new request to the sales department.\n\t4- Taxes (IRC – MYC – etc…) subject to change without notice.\n\t5- In the event of cancellation or no show, we reserve the right to pass on all or part of the costs\n\t- Cancellation 72 hours before the departure of the truck and/or the flight (working hours): invoicing 50% of the amount of the freight\n\t- Cancellation 48 hours before the departure of the truck and/or the flight (working hours): invoicing of 75% of the amount of the freight\n\t- Cancellation 24 hours before the departure of the truck and/or the flight (working hours): invoicing of 100% of the amount of the freight\n\t- In the case of a no show (no presentation of the freight): invoicing of 100% of the amount of the freight\n\t- In the case of a low show (discount less than 50% of the reserved taxable weight): invoicing of 75% of the reserved taxable weight\n", "contacts": [ "tests@cargoai.co" ], "handlingInfoLink": "https://www.cargoai.co/terms", "ghaName": "Mocked GHA", "hle": "19:00", "ghaAddress": "Airport road, Cargo Terminal, Mocked Cargo building" }, "searchRequest": { "clientEnv": "", "clientID": "damien+tests_fw_cgogate@cargoaitest.co", "destinationCriteria": "SIN", "originCriteria": "CDG", "requestDate": "2024-10-10", "offset": 5, "product": "GCR", "weight": 200, "pieces": 50, "chargeableWeight": 200, "dimensions": [ { "length": 100, "width": 100, "height": 100, "pieces": 50, "weight": 200, "volume": 1, "stackable": true, "tiltable": false, "toploadable": false, "weightType": "TOTAL", "loadType": "TOTAL" } ], "specialHandlingCodes": [ "GCR" ], "dangerousGoods": null, "scrs": null, "globalHS": null, "europeanHS": null, "volume": 1, "forwarder": 0, "providers": null, "airline": "00", "isScreened": false, "officeId": "", "measurementUnit": "METRIC", "commodities": null, "filters": { "airlineCode": "00", "withRateOnly": false, "liveRequests": true, "scheduleOnly": null }, "isAllotment": false, "isAdvancedBooking": false, "isMultiCallBlocked": false, "isInterlineEnabled": false }, "user": { "airport": "CDG", "country": "FR", "iata": "0000000", "cass": "0000", "userName": "Test FW CgoGate", "firstName": "Test FW", "lastName": "CgoGate", "email": "email@tests.co", "isColoader": false, } }