Data structure

Structure example

All data must be structured in a flat JSON object. Example:
 {
    "timeStamp":"2019-02-03T11:43:26Z",
    "pnr": "L9XCR2",
    "destinationName": "JFK",
    "sequenceNumber": "001",
    "licensePlateCode": "0220998547",
    "flightdate": "205",
    "flightdateYear": "2019",
    "issuingStation": "JNB",
    "flightData": "SA02042051115JFKX",
    "passengerNameData": "VANZANDT/CHRIS",
    "airlineFrequentFlyerLevel": "Q",
    "showGreenBars": null,
    "optionalData": null,
    "layoutField01": "PRIORITY",
    "layoutField02": null,
    "layoutField03": null
    ...
}

Data fields

timeStamp:
A date/time value of when the data was created.
  • Required
  • The value should be presented in ISO 8601 format with UTC offset (e.g. 2019-02-03T11:43:26Z)
licensePlateCode
Also known as license plate number or barcode, as used on bag tags.
  • Required.
  • This field must contain 10 digits.
  • Regular expression: [0-9]{10,10}$
flightDate
Julian date of the day the flight will depart. Please take leap years into consideration!
  • Required.
  • This field must contain 1 to 3 numbers.
  • Regular expression: [0-9]{1,3}$
flightDateYear
The year of the flight.
  • Required.
  • This field must contain 4 digits.
  • Regular expression: [0-9]{4,4}$
issuingStation
The airport code which is issuing the label. “AMS” for example.
  • Required.
  • This field must contain 3 alphabetic capitalized characters.
  • Regular expression: [A-Z]{3,3}$
destinationName
The name of the destination.
  • Not required.
  • Should only contain capitalized alphabetic characters, numbers, spaces and dashes. Maximum of 20 characters.
  • Regular expression: [0-9A-Z -]{0,20}$
passengerNameData
Name of the passenger.
  • Required.
  • Must only contain capitalized alphabetic characters or a forward slash (/), with a minimum of 2 and a maximum of 26 characters
  • Regular expression: [A-Z/]{2,26}$
airlineFrequentFlyerLevel
Indicator of the Frequent Flyer level
  • Required.
  • Must contain a single digit.
  • Regular expression: [0-9]{1,1}$
sequenceNumber
The sequenceNumber if used on the BAGTAG label.
  • Required.
  • Must contain 1 to 4 digits.
  • Regular expression: [0-9]{1,4}$
pnr
Passenger Name Record locator.
  • Required.
  • Must consist of 6 capitalized alphanumeric characters.
  • Regular expression: [0-9A-Z]{6,6}$
flightData
This object contains information about all the legs, and is a comma delimited object, containing a predefined length and format. This object has to be read from right to left, so the last object is the first flight. The first object is the destination. Each leg has the following format:
  1. IATA Airline code for the exiting airline – 2 capital letters (A-Z)
  2. IATA Flight number – 4 digits including leading zeroes
  3. Flight date, day of year, Julian date, 3 digits including leading zeroes
  4. Flight time, 24 hours notation – 4 digits including leading zeroes
  5. IATA destination code – 3 capital letters (A-Z)
  6. Airline flight class cose – 1 capital letter (A-Z)
Single example "BD03311832100PEKX" The legs are separated by a comma (,) Multiple legs example: "BD03311832100PEKX,AI10121831800ICNX,WS90061831200CANX"
showGreenBars
Whether the greenbars should be displayed or not. When not set, this value is automatically determined based on the issuingStation field.
  • Not required.
  • Values can be 1/0 or null.
  • Regular expression: [10]?$
layoutField01 – layoutField16
Custom definable fields, can be used for e.g. priority or crew indicators. To be determined combined with the layouts as defined.
  • Not required.
  • Any alphanumeric value.

Success! What's next?

When the data structure has been formed, it can be signed using JWT.



Any questions about integration? Reach out to integration@bagtag.com

We're here to help

Please fill in your details and we will contact you.