Method Calls
addFlightBooking
this method call is only available to clients using the getting started with the monetate travel api addflightbooking method return flight example // addflightbooking method // return flight example window\ monetateq = window\ monetateq || \[]; var bookingobject = { // required 'depdate' \['20260315'], // march 15, 2026 'destination' \['cdg'], 'origin' \['lhr'], 'travelers' \[5], // optional 'adults' \[2], 'infants' \[1], 'minors' \[1], 'seniors' \[1], 'retdate' \['20260421'], // april 21, 2026 'serviceclass' \['economy'] }; window\ monetateq push(\['addflightbooking', bookingobject, 'lon12345', 'lhr cdg', 1, '1200 00', // optional 'eur' ]); window\ monetateq push(\['trackdata']); addflightbooking method multi flight example // addflightbooking method // multi flight example window\ monetateq = window\ monetateq || \[]; var bookingobject = { // required 'depdate' \['20260315', '20260320'], // march 15, 2026 and march 20, 2026 'destination' \['cdg', 'txl'], 'origin' \['lhr', 'cdg'], 'travelers' \[5], // optional 'adults' \[2], 'infants' \[1], 'minors' \[1], 'seniors' \[1], 'serviceclass' \['economy'] }; window\ monetateq push(\['addflightbooking', bookingobject, 'lon12345', 'lhr cdg', 1, '1200 00', // optional 'eur' ]); window\ monetateq push(\['trackdata']); the addflightbooking method passes information from your site to monetate when a customer purchases a flight this method consists of eight required attributes and seven optional attributes required attributes these attributes are required with the addflightbooking method depdate — a string that includes the flight's departure date in yyyymmdd format destination — a string that includes the flight's destination (airport or city) origin — a string that includes the flight's point of origin (airport or city) travelers — an integer that includes the number of travelers on a flight purchaseid — a string that includes the order id for a purchased flight pid — a string without spaces that includes an id used to identify a flight quantity — an integer that includes the number of flights booked unitprice — a string that includes the flight's price in the format xx xx optional attributes these attributes are optional for the addflightbooking method adults — an integer that includes the total number of adults booking a flight infants — an integer that includes the total number of infants booking a flight minors — an integer that includes the total number of minors booking a flight seniors — an integer that includes the total number of seniors booking a flight retdate — a string that includes the flight's return date in yyyymmdd format; not used for multiple flights serviceclass — a string that includes the service class for the seats on a flight booked (business, economy, first, etc ) currency — a string in the iso 4217 standard (three capital letters and no spaces) that includes the currency used to book the flight