Regarding "enroute" flightaware API call

For FlightXML2, you can simply split the “ident” field (“BAW32”) by taking the first 3 letters (“BAW” as the airline), and the remaining numbers (“32”) as the flight number.

If you want to use FlightXML3 beta, you can use the “AirportBoards” function instead, and its response has the data parsed out into a more components for you automatically, including separate “airline” and “flightnumber” fields.