Data Format

This page describes the format which data needs to follow in FWB and FHL request and provides the error response structure related to data format errors

FWB/FHL request

Field NameRequiredData TypeData Format
awb_numberYesstringxxx-xxxxxxxx - length 12
userEmailYesstringemail format
awb_statusYesstringaccepts "PENDING_DELIVERY" only
userCompanyNameYesstringFree form text (spe char accepted: '.', ' ') - max length 50
isFhlOnlyNobooleantrue/false
hawbsConditional (isFhlOnly - true)[]HWBDetailsN/A
handlingNoHandlingN/A
senderReferenceNoSenderReferenceN/A
shipperYesShipperConsigneeInfoN/A
consigneeYesShipperConsigneeInfoN/A
notifyNoShipperConsigneeInfoN/A
routingDetailsYes[]RoutingN/A
chargesDeclarationConditional (required only for FWB)ChargesDeclarationN/A
ratesConditional (required only for FWB)[]RateDetailsN/A
executionConditional (required only for FWB)ExecutionN/A
ociNoOCIN/A
customsOriginNostring1-2 alphanumeric characters
agentNoAgentN/A
otherChargesNo[]OtherChargeN/A

Note: customsOrigin represents the customs status of the goods under the applicable customs regime, not the country of origin.

Example values under the EU/Common Transit Convention (illustrative, not an exhaustive list - the full set of values is defined by local customs authorities): T1, T2, T2F, C, F, X.

HWBDetails Object

Field NameRequiredData TypeData Format
mawbNumberNostringxxx-xxxxxxxx - length 12
slacNointlength 1 to 5 digits
hawb_numberYesstringAAXXXXXX - Alphanumeric - length 1 to 12 chars
number_of_piecesYesintlength 1 to 4 digits
commodityConditional (only when charges needs to be sent with HWB)stringFree form text (spe char accepted: '.', ' ') - max length 15
gross_weightYesWeightVolumeInfoN/A
locationsYesHWBLocationsN/A
currency_codeConditional (only when charges needs to be sent with HWB)string3 letters currency code (ISO 4217) - Alpha - length 3
charge_code*Conditional (only when charges needs to be sent with HWB)stringenum["CC", "CZ", "CG", "PP", "PX", "PZ", "PG", "CP", "CX", "CM", "NC", "NT", "NZ", "NG", "NP", "NX", "CA", "CB", "CE", "CH", "PC", "PD", "PE", "PH", "PF"]
otherNostringenum["P", "C"]
values_for_carriageNofloatlength 0.01 to 12 digits - API will replace it by NVD if \<= 0
values_for_customNofloatlength 0.01 to 12 digits - API will replace it by NCV if <= 0
values_for_insuranceNofloatlength 0.01 to 12 digits - API will replace it by XXX if <= 0

*see CargoAi FWB/FHL Charge code details here

WeightVolumeInfo Object

Field NameRequiredData TypeData Format
valueYesfloatlength 0.01 to 9 digits
uomYesstringenum["K", "L", "MC", "CF"] - K, L for weight | MC, CF for volume

HWBLocations Object

Field NameRequiredData TypeData Format
port_of_originYesCodeN/A
port_of_destinationYesCodeN/A

Handling Object

Field NameRequiredData TypeData Format
specialServiceInformationNostringFree form text (spe char accepted: '.', ' ') - max length 65
otherServiceInformationNostringFree form text (spe char accepted: '.', ' ') - max length 65
specialHandlingNo[]CodeN/A
specialServiceRequestNo[]stringSpecial service request (SSR) lines, one string per line

Code Object

Field NameRequiredData TypeData Format
codeYesstringIATA standards 3 letters code - Alpha - length 3

SenderReference Object

Field NameRequiredData TypeData Format
senderAirportNostringIATA standards 3 letters code - Alpha - length 3
senderOfficeDesignatorNostringenum["FF", "FR", "FM"]
FF - Freight/Cargo Handling
FR - Freight/Cargo Reservations
FM - Freight/Cargo Systems

ShipperConsigneeInfo Object

Field NameRequiredData TypeData Format
nameYesstringFree form text (spe char accepted: '.', ' ') - max length 35
addressYesAddressN/A
account_numberNostringAccount number in the airline system - max length 47. Not sent for notify, nor in FHL
emailNostringEmail address. See note below
phoneNostringAccepted, not included in the FWB/FHL message
faxNostringAccepted, not included in the FWB/FHL message
eoriNostringEORI number. Used for the consignee only: sent in the FWB OCI line with oci.origin_country_code

Note on email: the notify party is only included in the FWB when both name and email are set. In FHL messages, the shipper and consignee are only included when their email is set.

Address Object

Field NameRequiredData TypeData Format
line1YesstringFree form text (spe char accepted: '.', ' ') - max length 35
line2NostringFree form text (spe char accepted: '.', ' ') - max length 35
placeConditional (mandatory if city.Code not provided)stringFree form text (spe char accepted: '.', ' ') - max length 17
cityConditional. (city.Code mandatory if place not provided)AddressLocationN/A
postal_codeNostringFree form text (spe char accepted: '.', ' ') - max length 9
state_provinceConditional (mandatory if country.code is US or CA)stringFree form text (spe char accepted: '.', ' ') - max length 9
countryYesAddressLocationN/A

AddressLocation Object

Field NameRequiredData TypeData Format
codeYesstringIATA standards 3 letters code - Alpha - length 3 (City) | 2 letters code - Alpha - length 2 - ISO 3166-1 (Country)
nameNostringFree form text (spe char accepted: '.', ' ') - max length 17

Routing Object

Field NameRequiredData TypeData Format
from_airport_codeYesstringIATA standards 3 letters code - Alpha - length 3
to_airport_codeYesstringIATA standards 3 letters code - Alpha - length 3
carrier_codeYesstringIATA standards 2 characters airline code - Alphanumeric - length 2
flight_numberNostringAlphanumeric - length 3 to 4 chars

ChargesDeclaration Object

Field NameRequiredData TypeData Format
currency_codeYesstring3 letters currency code (ISO 4217) - Alpha - length 3
charge_code*Yesstringenum["CC", "CZ", "CG", "PP", "PX", "PZ", "PG", "CP", "CX", "CM", "NC", "NT", "NZ", "NG", "NP", "NX", "CA", "CB", "CE", "CH", "PC", "PD", "PE", "PH", "PF"]
weight_or_valuationNostringenum["P", "C"] - P prepaid, C collect
values_for_carriageNofloatlength 0.01 to 12 digits - API will replace it by NVD if \<= 0
values_for_customNofloatlength 0.01 to 12 digits - API will replace it by NCV if <= 0
values_for_insuranceNofloatlength 0.01 to 12 digits - API will replace it by XXX if <= 0

RateDetails Object

Field NameRequiredData TypeData Format
number_of_piecesYesintlength 1 to 4 digits
gross_weightYesWeightVolumeInfoN/A
volumeConditional (mandatory if no ULD and no dims provided)WeightVolumeInfoN/A
slacNointlength 1 to 5 digits
rate_class_code*Yesstringenum["B", "R", "S", "P", "M", "N", "Q", "K", "C", "X", "E", "U", "Y"]
commodity_item_numberNostringlength 4 to 7 digits
chargeable_weight**Nofloatlength 0.01 to 7 digits
rate_or_chargeNofloatlength 0.01 to 8 digits
charge_amountNofloatlength 0.01 to 12 digits
nature_and_quantity_of_goodsNostringFree form text (spe char accepted: '.', ' ')
hscNo[]intlength 1 to 18 digits
dimsNo[]DimensionsN/A Mandatory if no ULD provided and no volume
uldNo[]ULDN/A

*see CargoAi FWB/FHL Rate Class code details here

**Please, see details about chargeable weight here

Dimensions Object

Field NameRequiredData TypeData Format
pcsYesintlength 1 to 4 digits
lengthYesintlength 1 to 5 digits
widthYesintlength 1 to 5 digits
heightYesintlength 1 to 5 digits
uomYesstringenum["CMT", "INH"]
weightNofloatlength 0.01 to 7 digits
volumeNofloatlength 0.01 to 7 digits

ULD Object

Field NameRequiredData TypeData Format
numberYesstringlength 1 to 10 chars - Alpha numeric

Execution Object

Field NameRequiredData TypeData Format
dateYesstringformat 02-Jan-06
placeYesstringFree form text (spe char accepted: '.', ' ') - max length 17
shipper_signatureYesstringFree form text (spe char accepted: '.', ' ') - max length 20
carrier_signatureYesstringFree form text (spe char accepted: '.', ' ') - max length 20

OCI Object

Field NameRequiredData TypeData Format
origin_country_codeYesstring2 letters code - Alpha - length 2 - ISO 3166-1
securityNoSecurityN/A

Security Object

The e-CSD security group. Emitted as the leading OCI group (<country>/ISS/RA/<agent> for a
regulated agent, <country>//<issuer>/<agent> otherwise) followed by continuation lines in
this fixed order: ED, one SM per screening method, L, SD, SN.

{
  "regulated_agent": "ESRA0123-01",
  "issuer_type": "RA",
  "expiry_date": "0626",
  "screening_methods": ["XRY"],
  "security_status": "SPX",
  "screening_datetime": "05031200",
  "screener_name": "JOHNNY WALKER",
  "exemption_code": "DIPL"
}
Field NameRequiredData TypeData Format
regulated_agentYesstringFree form text (spe char accepted: '.', ' ', '-') - max length 35
issuer_typeNo (default RA)stringenum["RA", "KC", "AC", "RC"] - RA (regulated agent), KC (known consignor), AC (account consignor), RC (regulated carrier). Empty treated as RA
expiry_dateConditionalstringFormat MMYY. Required when issuer_type is RA/empty or KC; must be empty for AC and RC
screening_methodsConditional[]stringEach element is a code from the SM, or AOM-<description>. Required (≥1) when issuer_type is RA/empty and exemption_code is empty; must be empty for KC, AC, RC.
security_statusYesstringenum["SPX", "SCO", "NSC", "SHR"]. Emitted as an SPH code, not in the OCI line
screening_datetimeNostringAlphanumeric - length 0 to 14 chars. Must be empty unless issuer_type is RA/empty and a screening method or exemption code is present
screener_nameNostringFree form text - max length 35
exemption_codeNostringenum["SMUS", "MAIL", "BIOM", "DIPL", "LFSM", "NUCL", "TRNS"]. Substitutes for screening_methods on an RA block

The block has no country field of its own - it uses oci.origin_country_code.

Agent Object

Field NameRequiredData TypeData Format
accountNumberNostringFree form text (spe char accepted: '.', ' ') - max length 14
iataYesstringlength 7 digit
cassNostringlength 4 digit
nameYesstringFree form text (spe char accepted: '.', ' ') - max length 35
placeYesstringFree form text (spe char accepted: '.', ' ') - max length 17

OtherCharge Object

Field NameRequiredData TypeData Format
pc_indicatorYesstringExactly 1 character: "P" or "C"
charge_codeYesstringExactly 2 alphabetic characters
entitlement_codeYesstringExactly 1 alphabetic character
charge_amountYesfloatMin 0.01, max 7 digits

Error Examples

All errors related to data format will follow structure shown in below examples:

Arrays

{
    "errorCode": 400,
    "errorMessage": "invalid request: routing: 0: carrier_code: must contain English letters and digits only.; 1: carrier_code: the length must be exactly 2.."
}

Enum

{
    "errorCode": 400,
    "errorMessage": "invalid request: awb_status: AWB Status must be \"PENDING_DELIVERY\"(confirmed)."
}

Others

{
    "errorCode": 400,
    "errorMessage": "invalid request: userEmail: must be a valid email address."
}
{
    "errorCode": 400,
    "errorMessage": "invalid request: shipper: name: must be in a valid format."
}
{
    "errorCode": 400,
    "errorMessage": "invalid request: shipper: city.code: cannot be blank."
}
{
    "errorCode": 400,
    "errorMessage": "invalid request: rates: 0: number_of_pieces: must be no greater than 9999.."
}