-
Notifications
You must be signed in to change notification settings - Fork 1
Avia variants
this API endpoint intended to be used when you want to display flight recommendations on your site in your design, with "deep-links" leading directly to payment form on our site.
please note, that we do not provide (yet) IATA <=> city/airport name dictionaries, you have to have dictionaries on your side to use that API.
curl 'http://api.eviterra.com/avia/v1/variants.xml?from=MOW&to=LED&date1=2012-09-25'
<?xml version='1.0' encoding='utf-8' ?>
<variants>
<variant>
<price>2664</price>
<url>https://eviterra.com/api/booking/ilnlh1#recommendation=amadeus.UN.T.M.9.UN3DMELED250312&type=api&partner=</url>
<validatingCarrier>UN</validatingCarrier>
<segment>
<flight>
<marketingCarrier>UN</marketingCarrier>
<operatingCarrier>UN</operatingCarrier>
<number>3</number>
<departure>DME</departure>
<departureDate>2012-09-25</departureDate>
<departureTime>09:55</departureTime>
<arrival>LED</arrival>
<arrivalTerm>1</arrivalTerm>
<arrivalDate>2012-09-25</arrivalDate>
<arrivalTime>11:10</arrivalTime>
<equipment>735</equipment>
<class>T</class>
<cabin>Y</cabin>
</flight>
</segment>
</variant>
<variant>
...
http://api.eviterra.com/avia/v1/variants.xml?arg1=value&arg2=value...
HTTP method - GET
from
or from1
IATA code of departure city/airport
to
or to1
IATA code of arrival city/airport
date1
YYYY-MM-DD date of departure
date2
YYYY-MM-DD date of departure for a roundtrip journey. Should be omitted for oneway search.
from2
, to2
- IATA codes for second segment if date2
specified. If ommitted then it's a roundtrip search (from2
= to1
and to2
= from1
)
from3
, to3
, date3
... from6
, to6
, date6
- Complex route. When fromN
isn't specified, it's assumed to be equal with toN-1
.
adults
"1" if omitted!
children
"0" by default
infants
"0" by default
cabin
preferred booking class, could (and probably should) be omitted. "Y" for economy, "C" for business, "F" for first/premium. Empty by default (no preference)
partner
your company identificator
simple xml, no namespaces, no attributes (for now), just text elements
Less than 60 seconds in current implementation. Less than 10 seconds average, so far
HTTP 40x, 50x replies are possible and expected.
if 20x recieved, reply still could contain a single explanation text root element, or a...
/variants
root element, for now. We going to change it in the future, with a prior notice, of course.
//variant/price
total price for all the passengers
//variant/url
url to redirect customer to. See "Variant URL" section for details.
//variant/validatingCarrier
IATA code of ticket issuing airline
//variant/segment
- 1 elements for one way, 2 for roundtrip
//variant/segment/flight
- 1..n, more than one if there're connecting points in the requested leg
marketingCarrier
airline IATA code (2 latin letters)
operatingCarrier
airline IATA code (2 latin letters)
number
2..4 digits, almost always, full flight number is (marketingCarrier + number)
departure
departure airport IATA code (3 latin letters)
departureTerm
departure airport terminal, if known. one or more latin or cyrillic letters
departureDate
departure date, 'YYYY-MM-DD', local
departureTime
departure time, 'HH:MM', local
arrival
arrival airport IATA code (3 latin letters)
arrivalTerm
arrival airport terminal, if known. one or more latin or cyrillic letters
arrivalDate
arrival date, 'YYYY-MM-DD', local
arrivalTime
arrival time, 'HH:MM', local
equipment
IATA (or russian domestic) aircraft/bus/train equipment type code. several letters/digits
class
booking class. could be almost any letter, latin or cyrllic
cabin
cabin class. could be 'F' for 'first', 'C' for 'business', 'Y' for 'economy/couch'
it's assumed you redirect user browser to that url. It could contain significant for business logic anchor ("#..." part).
you can also add your tracking marker (string) to that url, for your internal tracking purposes. If there's anchor part, add marker after it. pseudocode illustration of the "guaranteed to work" way:
redirect_url = variant_url + '&marker=' + uri_escape(marker)
We return markers in our statistics on successful bookings.