333
edits
Changes
Jump to navigation
Jump to search
Created page with "'''Attention!''' The system implements an improved API-project "Nemo Connect", we strongly recommend to connect using the scheme described in the documentation at [http://docs..."
'''Attention!''' The system implements an improved API-project "Nemo Connect", we strongly recommend to connect using the scheme described in the documentation at [http://docs.nemo.travel/ link].
== Information ==
The agency ticketing API allows you to determine the validating carrier and the commission value from the airline for the booking, and to run the ticketing procedure.
As a rule for ticketing it is enough to have a "Paid" status. If the option '''For successful bookings do processing: automatically after changing the status to ''Paid" ''' from the '''For technical support → Outdated settings → Booking settings''' section is activated, the ticket will be automatically issued after the payment. However, this is a prerequisite only for users, it is possible to get a ticket that does not require payment, for this you need to have API user rights. For example, API account must be created for the agency manager.
Additionally the '''Allowed IP addresses''' setting is implemented in the section '''System settings → Integration → Nemo 1.0 (SOAP API)''' , defining a range of IP addresses for additional protection of accounts under which a ticket is issued without paying or fixing the payment. IP-addresses have the following acceptable format: <syntaxhighlight lang="text" enclose="none" style="font-size: 1em; padding: 0 3px; background: #F0F0F0; border: 1px dashed #2F6FAB;">125.125.25.5/8</syntaxhighlight>, that is possible to specify with the subnet mask.
'''Attention!''' When the Websky system does not have the booking locator data in the airline system, the ticketing operation is not possible. That's why in response to Ticketing request you may get an error message like "The requested operation is not allowed for this object".
If GDS doesn't have data about a booking locator in the airline's system, an empty value will be returned in the response to the BookFlight request in the Segments.Segment.SupplierCode parameter. In this case you need to send an [[Additional_requests_API_airline tickets#.D0.97.D0.B0.D0.BF.D1.80.D0.BE.D1.81_.D0.BD.D0.B0_.D0.BE.D0.B1.D0.BD.D0.BE.D0.B2.D0.BB.D0. B5.D0.BD.D0.B8.D0.B5_.D0.B7.D0.B0.D0.BA.D0.B0.D0.B7.D0.B0 | UpdateBook]] request several times until GDS side receives information about booking locator in the airline system. Websky system will then receive this value from GDS. The ticketing request can only be sent after a non-zero value is received in the Segments.Segment.SupplierCode parameter in the response from the Websky Agent API.
In Nemo Connect, additional settings have been added to the agent service (the interface to the booking server) for ticketing. The new version of the API allows you to:
* report the VC (validating carrier) for a given combination
* inform the commission for the given combination;
* report the endorsements for the given combination;
* accept ticketing requests;
* check the availability of the booking in the GDS;
* synchronize the booking;
* perform ticketing;
* transmit additional information in the remarks;
* perform voiding for tickets.
== General format of ticketing request/response ==
This request is launched after the payment for the order, it can be launched either manually - by a user who has rights for it - or automatically. It is possible to make a ticketing for unpaid order via Websky only from certain IP addresses, the list of which is configured in the settings section described above. When the ticketing request is triggered, the order update process is also launched, during which the price and other parameters of the order are checked, as well as its relevance is checked. Orders with an expired time limit cannot be ticketed.
WSDL: http://CLIENT_DOMAIN/nemoflights/wsdl.php?for=Ticketing
<div class="toccolours mw-collapsible mw-collapsed" style="width:1000px">
==== Request ====
<div class="mw-collapsible-content">
<syntaxhighlight lang="xml" line enclose="div" style="font-size:9pt;background: #F9F9F9; border: 1px dashed #2F6FAB; padding: 10px 5px; margin: 10px 0;">
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ver="http://CLIENT_DOMAIN/nemoflights/?version%3D1.0%26for%3DTicketing">
<soapenv:Header/>
<soapenv:Body>
<ver:Ticketing>
<RequestBin>
<Request>
<Ticketing>
<BookID>?</BookID>
<!--BookID — Order ID in the Websky system-->
<ValCompany>?</ValCompany>
<!--ValCompany —validating carrier (the one that issues a ticket)-->
<Comission Amount="?" Percent="?" CurrencyCode="?"/>
<!--Comission Amount - commissions, indicated either in currency or in percentage, for currency, the
currency code is obligatory. If it is indicated both in currency and in percent, the commission at the supplier is established in currency-->
<!--Amount - commission in currency-->
<!--Percent - commission in percent-->
<!--CurrencyCode - commission currency code-->
<PassengerFops>
<!--Zero or more repetitions:-->
<PassengerFop>
<PassengerId>?</PassengerId>
<!--PassengerId — sequence number of the passenger on the flight-->
<Fops>
<!--Zero or more repetitions:-->
<Fop>
<Type>?</Type>
<!--Type - form of payment: CC (credit card) or CA (cash)-->
<Money Currency="?">?</Money>
<!--Money - payment amount-->
<!--Currency - currency code-->
<VendorCode>?</VendorCode>
<!--VendorCode — card type code: (for example, VI — Visa,
MC — MasterCard,
AX — American Express
DC — DCL,
CA — EURO,
IK — EURO,
JB — JCB,
JC — JCB,
BA — Visa)-->
<Number>?</Number>
<!--Number — card number-->
<ExpireDate>?</ExpireDate>
<!--ExpireDate — he expiration date of the card, for example 12.2020-->
<ManualApprovalCode>?</ManualApprovalCode>
<!--ManualApprovalCode - Preauthorization code for the transaction for which the funds have been blocked for ticketing. This is NOT a CVV code. It is optional. If not specified, it will be automatically obtained by the Websky system through GDS/-->
</Fop>
</Fops>
</PassengerFop>
</PassengerFops>
<DataItems>
<!--Zero or more repetitions:-->
<DataItem>
<Type>Remark</Type>
<!--Type — type of content in this block, for example: Meal, Remark-->
<Remark>
<Type>?</Type>
<!--Type — remark type, for example: General, Historical-->
<Text>?</Text>
<!--Text — remark content-->
</Remark>
</DataItem>
</DataItems>
</Ticketing>
</Request>
<Source>
<ClientId>?</ClientId>
<!--ClientId - client ID in the Websky system. You can see/add it in
"System Settings" → "Integration" → "Nemo 1.0 (SOAP API)".-->
<APIKey>?</APIKey>
<! --APIKey - the secret access key to Websky API. You can see / add it in the section
"System Settings → Integration → Nemo 1.0 (SOAP API).-->
<Language>?</Language>
<!--Language - for example: RU-->
<Currency>?</Currency>
<!-- Currency - for example: RUB, EUR-->
</Source>
</RequestBin>
</ver:Ticketing>
</soapenv:Body>
</soapenv:Envelope>
</syntaxhighlight>
</div>
</div>
<div class="toccolours mw-collapsible mw-collapsed" style="width:1000px">
==== Response ====
<div class="mw-collapsible-content">
<syntaxhighlight lang="xml" line enclose="div" style="font-size:9pt;background: #F9F9F9; border: 1px dashed #2F6FAB; padding: 10px 5px; margin: 10px 0;">
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://CLIENT_DOMAIN/nemoflights/?version%3D1.0%26for%3DTicketing" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:TicketingResponse>
<ResponseBin>
<Response>
<Ticketing ID="?" Status="?" Code="?">
<!--ID - ID of the booking in Websky system, integer, mandatory-->
<!--Status - booking status indicator, possible values:
booked - booked,
canceled - booking is canceled,
ticket - ticketed
UNDEFINED - status not defined-->
<!--Code - booking code in the supplier's system-->
<QueryPlace xsi:nil="true"/>
<!--QueryPlace — booking position in the queue, Number - booking number in the queue-->
<Flight FlightId="?">
<!--FlightId — Flight ID in the Websky system-->
<WebService>?</WebService>
<!--WebService — flight supplier-->
<ValCompany>?</ValCompany>
<!--ValCompany — code of the airline which is a validating carrier, IATA-->
<URL>?</URL>
<!--URL — link to booking of a particular flight-->
<Segments>
<Segment SegNum="?" SegGroupNum="?">
<!--SegNum — segment number in the flight-->
<!--SegGroupNum – leg number in the flight-->
<SupplierCode>?</SupplierCode>
<!--SupplierCode – order number in the airline's system-->
<DepAirp CodeType="IATA">?</DepAirp>
<!--DepAirp — Departure airport, for example: MOW - any airport in Moscow
or SVO - Sheremetyevo-->
<DepTerminal>?</DepTerminal>
<!--DepTerminal — terminal of the point of departure, if empty,
there is only 1 terminal at the airport-->
<ArrAirp CodeType="IATA">?</ArrAirp>
<!--ArrAirp — arrival airport-->
<ArrTerminal>?</ArrTerminal>
<!--ArrTerminal — terminal of the point of arrival, if empty,
there is only 1 terminal at the airport-->
<OpAirline>?</OpAirline>
<!--OpAirline — airline carrier, for example: SU — Aeroflot-->
<MarkAirline>?</MarkAirline>
<!--MarkAirline — airline selling the flight-->
<MarkAirlineName>?</MarkAirlineName>
<!--MarkAirlineName - the full name of the airline in Cyrillic-->
<FlightNumber>?</FlightNumber>
<!--FlightNumber — flight number-->
<AircraftName>?</AircraftName>
<!--AircraftName — aircraft name-->
<AircraftType>?</AircraftType>
<!--AircraftType — aircraft type, code-->
<DepDateTime>?</DepDateTime>
<!--DepDateTime — date and time of departure, format YYYYY-MM-DDTHH:MM:SS-->
<ArrDateTime>?</ArrDateTime>
<!--ArrDateTime — date and time of arrival, format YYYYY-MM-DDTCH:MM:SS-->
<StopNum>?</StopNum>
<!--StopNum — number of stopovers-->
<StopPoints>
<!--StopPoints — information about technical stops, if any-->
<StopPoint>
<AirportCode>?</AirportCode>
<!--AirportCode — airport stopover code, three character iata code-->
<UTC>?</UTC>
<!--UTC — airport time zone shift-->
<ArrDateTime>?</ArrDateTime>
<!--ArrDateTime — date and time of arrival, format YYYYY-MM-DDTCH:MM:SS-->
<DepDateTime>?</DepDateTime>
<!--DepDateTime — date and time of departure, format YYYYY-MM-DDTHH:MM:SS-->
</StopPoint>
</StopPoints>
<BookingCodes>
<BookingCode ClassType="?">
<!--ClassType — flight class, for example: economy-->
<BookingCode>?</BookingCode>
<!--BookingCode — the booking class code, different airlines may write the same class
can be written in different letters, for example: L-->
</BookingCode>
</BookingCodes>
<FlightTime>?</FlightTime>
<!--FlightTime — flight time in minutes-->
<TimeZone Departure="?" Arrival="?"/>
<!--Departure departure airport time zone-->
<!--Arrival — arrival airport time zone-->
<ETicket>?</ETicket>
<!--ETicket — e-ticket attribute, values: true / false-->
<isCharter>?</isCharter>
<!--isCharter — attribute of a charter flight, values: true / false-->
<BaggageAllowances>
<!--BaggageAllowances — baggage information -->
<BaggageAllowance>
<PassengerType>?</PassengerType>
<!--PassengerType — type of passenger, corresponds to the type of fare in PricingInfo -->
<Value>?</Value>
<!--Value — number of-->
<Measurement>?</Measurement>
<!--Measurement — a measure, can take the values: kg - kilogram, pc - baggage space, lb - pound-->
</BaggageAllowance>
</BaggageAllowances>
</Segment>
</Segments>
<PricingInfo Refundable="?">
<!--Refundable — refundable/non-refundable, true/false. If empty, not known-->
<PassengerFare Type="?" Quantity="?">
<!--Type — fare type-->
<!--Quantity —number of passengers of that type-->
<BaseFare Currency="?" Amount="?"/>
<!--BaseFare — base price, in base currency. Currency - currency code, Amount - price value-->
<EquiveFare Currency="?" Amount="?"/>
<!--EquiveFare — base value in the equivalent currency (currency of sale).
Currency - currency code, Amount - price value-->
<TotalFare Currency="?" Amount="?"/>
<!--TotalFare — total value, in the equivalent currency.
Currency - currency code, Amount - price value-->
<Taxes>
<Tax CurCode="?" TaxCode="?" Amount="?"/>
<!--CurCode — currency code, TaxCode - tax code, Amount - amount of tax-->
</Taxes>
<Tariffs>
<Tariff Code="?" SegNum="?"/>
<!--Code - fare code, SegNum - number of segment to which the fare is applied-->
</Tariffs>
<FareCalc>?</FareCalc>
<!-FareCalc - price calculation line-->
<LastTicketDateTime>?</LastTicketDateTime>
<!--LastTicketDateTime - the date and time of the time limit on the ticketing in the format YYYYY-MM-DDTHH:MM:SS. If the "Apply time zone - For time limit calculations in agent API" setting is enabled, the time limit date and time will be transferred to the user's time zone. If the setting is disabled, the date and time will be in the Moscow time zone by default.
</PassengerFare>
</PricingInfo>
<Commission Currency="?"> </Commission
<Charges Currency="?">?</Charges>.
<!-Charges - charges, Currency - currency code-->
<TotalPrice Currency="?">?</TotalPrice
<!--TotalPrice - total price, Currency - currency code-->
</Flight>
<Agency Name="?">
<!-Name - agency name-->
<Telephone Type="?">
<!--Type - type of number, mandatory, possible values:
M - Mobile, H - Home, B - Work, A - Agency-->
<!--Optional:-->
<PhoneNumber>?
<!--PhoneNumber - phone number-->
<!--Optional:-->
<CountryAccessCode>?
<!-CountryAccessCode - country code-->
<!--Optional:-->
<AreaCityCode>?
<!--AreaCityCode - region/city code-->
</Telephone>
<Address City="?" State="?" StreetAddress="?" PostalCode="?" CountryCode="?"/>
<!-City - city-->
<!-State - state-->
<!--StreetAddress - address in the city (street, house, building, office, etc)-->
<!--PostalCode - postal index-->
<!-CountryCode - country code (RU, UA etc)-->
</Agency>
<ItinReceipts Encoding="?" Format="?">
<!--ItinReceipts - itinerary receipt, Encoding - encoding, Format - format-->
<FareStored xsi:nil="true"/>
<PaymentTransactions>
<Transaction>
<Id>?</Id>
<!--Id - transaction number in Websky-->
<Status>?</Status>
<!--Status - transaction status-->
<GatewayName>?</GatewayName>
<!-GatewayName - name of the payment gateway-->
<MoneyPaid Currency="?">?</MoneyPaid>
<!--MoneyPaid - payment amount-->
<!-Currency - currency-->
<PaymentDateTime>?</PaymentDateTime>
<!-PaymentDateTime - payment date and time-->
<CreateDateTime>?</CreateDateTime>
<!--CreateDateTime - date and time of payment transaction creation-->
<Description/>
</Transaction>
</PaymentTransactions>
<PaymentStatus>?</PaymentStatus>
<!-PaymentStatus - payment status:
not_paid - not paid
partly_paid - paid, partly
fully_paid - paid in full-->
<Travellers>
<!--Zero or more repetitions:-->
<Traveller Type="?" IsContact="?" LinkedTo="?" Num="?" TravellerId="?">
<!--Type - passenger type, mandatory, possible values: ADT - adults,
CNN - children, UNN - unaccompanied children, INF - infants, INS - infants with seat-->
<!--IsContact - if true - this passenger is a contact person, if false - he is not,
there can only be 1 contact person, if there are adults among the passengers, only one of them
can be contact person, default is false-->
<!--Num - passenger number, starts with 1-->
<!--LinkedTo - the number of the adult to which the infant/toddler is linked (linking a child to an adult is optional)-->
<!--TravellerId - actualized passenger number which is returned in response to the booking request. Further references to passengers are given based on this parameter-->
<Meal>?</Meal>
<!--Meal - food type code, possible values:
NONE - none
AVML - Asian vegetarian meals
BLML - Meals with a Moderate Diet
CHML - Baby Food
CHPC - Cold breakfast for kids
CHCC - Hot Breakfast for Kids
CHHC - Kids Lunch, Ham & Cheese
PBJS - Kids Lunch, peanut butter
CHMC - Children's lunch macaroni and cheese
DBML - Diabetic Nutrition
FPML - Fruit
GFML - Gluten Free Nutrition
HFML - Fiber Rich Meals
HNML - Hindu Food
BBML - Food for Infants
KSML - Kosher cooking
SMKB - Kosher Breakfast
SMKL - Kosher Lunch
SMKD - Kosher Lunch
LPML - Low Protein Meals
LCML - Low Calorie Meals
LFML - Low Cholesterol Diet
PRML - Low Purine Diet
LSML - Light Malt Malt Nutrition
MOML - Muesli
NLML - Dairy Free Foods
ORML - Oriental Food
RVML - Raw Vegetables
SFML - Seafood
SPML - Specialty Foods
VLML - Vegetarian, Milk & Egg
VGML - Strictly Vegetarian
VJML - Jainese Vegetarian
VOML - Oriental Vegetarian Meals-->
<PersonalInfo DateOfBirth="?" Nationality="?" Gender="?">
<!-DateOfBirth - date of birth in DD.MM.YYYY format (for example 12/31/2000)-->
<!--Nationality - citizenship, two-letter country code (RU, UA, US and etc.)-->
<!--Gender - gender of passenger, possible values: M - Male, F - Female -->
<FirstName>?</FirstName>
<!--FirstName — passenger's name-->
<LastName>?</LastName>
<!--LastName -- passenger's last name-->
<!--Optional:-->
<MiddleName>?</MiddleName>
<!--MiddleName - passenger's middle name-->
</PersonalInfo>
<LoyaltyCard OpCode="?" Number="?"/>
<!--OpCode - airline code-->
<!--Number - card number-->
<ContactInfo>
<!--Optional:-->
<EmailID>?</EmailID>
<!--EmailID -- contact email-->
<!--Optional:-->
<!--DocType — document type, possible values:
P - Passport
A - Passport of a foreigner
C - Internal passport
F - Passport replacement document
M - Military ID card
N - Naturalization certificate (US specific document)
T - Re-entry document, refugee passport
V - Border crossing document-->
<!--DocNum - number of document-->
<!--CountryCode - two-letter country code of the passport (RU, UA, US etc)-->
<!--DocElapsedTime - expiration date in DD.MM.YYYY (for example 31.12.2000)-->
<Ticket TicketNum="?">
<!-- TicketNum - number of an issued ticket -->
<VisaInfo Num="?" IssueCountry="?" IssuePlace="?" BirthCountry="?" BirthCity="?" IssueDate="?"/>
<!--Num - Visa number-->
<!--IssueDate - date (DD.MM.YYYY) of issue of visa-->
<!--IssueCountry - country where the visa was issued-->
<!--IssuePlace - location where visa is issued-->
<!--BirthCountry - country of birth (IATA country code)-->
<!--BirthCity - city of birth-->
<ArrAddress City="?" State="?" StreetAddress="?" PostalCode="?" CountryCode="?"/>
<!-City - city-->
<!--State - state or region of entry-->
<!--StreetAddress - address: street, house number, apartment number, etc.-->
<!-PostalCode - postal code-->
<!-CountryCode - country code-->
<PreferedPlace SmokingAllowed="?" Location="?" RowNumber="?" PlaceNumber="?" SegNumber="?"/>
<!--If row number and seat number are specified, the SmokingAllowed and Location parameters are ignored-->
<!--SmokingAllowed - boolean value, true - smoking seat, false - non-smoking seat-->
<!--Location - location in row, possible values:
W - near the window (Window)
M - somewhere in the middle of the row (Middle)
NPW - near the aisle (NearPassengerWay)
NS - no preference (NotSpecified)-->
<!--RowNumber - row number-->
<!-PlaceNumber - seat number-->
<!--SegNumber - segment number-->
<DocStringFormats>
<!--Zero or more repetitions:-->
<DocStringFormat>?</DocStringFormat>
<!--DocStringFormat - Passport string format, possible values:
DOCS - DOCS format string, FOID - FOID format string-->
</DocStringFormats>
</Traveller>
</Travellers>
<AutoCancelDate> </AutoCancelDate>
<!--AutoCancelDate - date and time of autocancellation time limit in format YYYYY-MM-DDHH:MM:SS determined by agency settings-->
<TimeLimits>
<TicketingTimeLimit>?</TicketingTimeLimit>
<!--TicketingTimeLimit - TicketingTimeLimit in the format YYYY-MM-DDTHH:MM:SS-->
<PriceTimeLimit>?</PriceTimeLimit>
<!--PriceTimeLimit - Price time limit from GDS in format YYYYY-MM-DDTHH:MM:SS-->
<AdvancedPurchaseTimeLimit>?</AdvancedPurchaseTimeLimit>
<!--AdvancedPurchaseTimeLimit - The time limit of the price from the fare rules in the format YYYYY-MM-DDTHH:MM:SS-->
<AgencyTimeLimit>?</AgencyTimeLimit>
<!-AgencyTimeLimit - The time limit of the settings in the format YYYYY-MM-DDTCH:MM:SS-->
</TimeLimits>
</Ticketing>
<Requisites/>
<RequestType xsi:nil="true"/>
<UserID xsi:nil="true"/>
<Error Code="?">Error message</Error>
</Response>
</ResponseBin>
</ns1:TicketingResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</syntaxhighlight>
</div>
</div>
== General format of the request / response of the voiding==
This request is launched after the ticket is issued, if it is necessary to cancel it.
WSDL: http://CLIENT_DOMAIN/nemoflights/wsdl.php?for=VoidTicket
<div class="toccolours mw-collapsible mw-collapsed" style="width:1000px">
==== Request ====
<div class="mw-collapsible-content">
<syntaxhighlight lang="xml" line enclose="div" style="font-size:9pt;background: #F9F9F9; border: 1px dashed #2F6FAB; padding: 10px 5px; margin: 10px 0;">
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ver="http://CLIENT_DOMAIN/nemoflights/?version%3D1.0%26for%3DVoidTicket">
<soapenv:Header/>
<soapenv:Body>
<ver:VoidTicket>
<RequestBin>
<Request>
<VoidTicket>
<BookID>?</BookID>
<!--BookID — booking ID in the Websky system, integer-->
</VoidTicket>
</Request>
<Source>
<ClientId>?</ClientId>
<!--ClientId - client ID in the Websky system. You can view/add it in
"System Settings" → "Integration" → "Nemo 1.0 (SOAP API)".
<APIKey>?</APIKey>
<! --APIKey - the secret access key to API Websky. You can see / add it in the section
"System Settings → Integration → Nemo 1.0 (SOAP API).-->
<Language>?</Language>
<!--Language - for example: RU-->
<Currency>?</Currency>
<!-- Currency - for example: RUB, EUR-->
</Source>
</RequestBin>
</ver:VoidTicket>
</soapenv:Body>
</soapenv:Envelope>
</syntaxhighlight>
</div>
</div>
<div class="toccolours mw-collapsible mw-collapsed" style="width:1000px">
==== Response====
<div class="mw-collapsible-content">
<syntaxhighlight lang="xml" line enclose="div" style="font-size:9pt;background: #F9F9F9; border: 1px dashed #2F6FAB; padding: 10px 5px; margin: 10px 0;">
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://CLIENT_DOMAIN/nemoflights/?version%3D1.0%26for%3DVoidTicket" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:VoidTicketResponse>
<ResponseBin>
<Response>
<VoidTicket BookID="?">
<!--BookID — booking ID in the Websky system, integer-->
<Result Success="?"/>
<!--Success — the result of canceling the ticketing, true or false-->
</VoidTicket>
<Requisites/>
<RequestType xsi:nil="true"/>
<UserID xsi:nil="true"/>
<Error Code="?">Error message</Error>
</Response>
</ResponseBin>
</ns1:VoidTicketResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</syntaxhighlight>
</div>
</div>
== See also ==
* [[Air Tickets Agency API]]
* [[Booking]]
* [[Additional Air Tickets API requests]]
== Information ==
The agency ticketing API allows you to determine the validating carrier and the commission value from the airline for the booking, and to run the ticketing procedure.
As a rule for ticketing it is enough to have a "Paid" status. If the option '''For successful bookings do processing: automatically after changing the status to ''Paid" ''' from the '''For technical support → Outdated settings → Booking settings''' section is activated, the ticket will be automatically issued after the payment. However, this is a prerequisite only for users, it is possible to get a ticket that does not require payment, for this you need to have API user rights. For example, API account must be created for the agency manager.
Additionally the '''Allowed IP addresses''' setting is implemented in the section '''System settings → Integration → Nemo 1.0 (SOAP API)''' , defining a range of IP addresses for additional protection of accounts under which a ticket is issued without paying or fixing the payment. IP-addresses have the following acceptable format: <syntaxhighlight lang="text" enclose="none" style="font-size: 1em; padding: 0 3px; background: #F0F0F0; border: 1px dashed #2F6FAB;">125.125.25.5/8</syntaxhighlight>, that is possible to specify with the subnet mask.
'''Attention!''' When the Websky system does not have the booking locator data in the airline system, the ticketing operation is not possible. That's why in response to Ticketing request you may get an error message like "The requested operation is not allowed for this object".
If GDS doesn't have data about a booking locator in the airline's system, an empty value will be returned in the response to the BookFlight request in the Segments.Segment.SupplierCode parameter. In this case you need to send an [[Additional_requests_API_airline tickets#.D0.97.D0.B0.D0.BF.D1.80.D0.BE.D1.81_.D0.BD.D0.B0_.D0.BE.D0.B1.D0.BD.D0.BE.D0.B2.D0.BB.D0. B5.D0.BD.D0.B8.D0.B5_.D0.B7.D0.B0.D0.BA.D0.B0.D0.B7.D0.B0 | UpdateBook]] request several times until GDS side receives information about booking locator in the airline system. Websky system will then receive this value from GDS. The ticketing request can only be sent after a non-zero value is received in the Segments.Segment.SupplierCode parameter in the response from the Websky Agent API.
In Nemo Connect, additional settings have been added to the agent service (the interface to the booking server) for ticketing. The new version of the API allows you to:
* report the VC (validating carrier) for a given combination
* inform the commission for the given combination;
* report the endorsements for the given combination;
* accept ticketing requests;
* check the availability of the booking in the GDS;
* synchronize the booking;
* perform ticketing;
* transmit additional information in the remarks;
* perform voiding for tickets.
== General format of ticketing request/response ==
This request is launched after the payment for the order, it can be launched either manually - by a user who has rights for it - or automatically. It is possible to make a ticketing for unpaid order via Websky only from certain IP addresses, the list of which is configured in the settings section described above. When the ticketing request is triggered, the order update process is also launched, during which the price and other parameters of the order are checked, as well as its relevance is checked. Orders with an expired time limit cannot be ticketed.
WSDL: http://CLIENT_DOMAIN/nemoflights/wsdl.php?for=Ticketing
<div class="toccolours mw-collapsible mw-collapsed" style="width:1000px">
==== Request ====
<div class="mw-collapsible-content">
<syntaxhighlight lang="xml" line enclose="div" style="font-size:9pt;background: #F9F9F9; border: 1px dashed #2F6FAB; padding: 10px 5px; margin: 10px 0;">
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ver="http://CLIENT_DOMAIN/nemoflights/?version%3D1.0%26for%3DTicketing">
<soapenv:Header/>
<soapenv:Body>
<ver:Ticketing>
<RequestBin>
<Request>
<Ticketing>
<BookID>?</BookID>
<!--BookID — Order ID in the Websky system-->
<ValCompany>?</ValCompany>
<!--ValCompany —validating carrier (the one that issues a ticket)-->
<Comission Amount="?" Percent="?" CurrencyCode="?"/>
<!--Comission Amount - commissions, indicated either in currency or in percentage, for currency, the
currency code is obligatory. If it is indicated both in currency and in percent, the commission at the supplier is established in currency-->
<!--Amount - commission in currency-->
<!--Percent - commission in percent-->
<!--CurrencyCode - commission currency code-->
<PassengerFops>
<!--Zero or more repetitions:-->
<PassengerFop>
<PassengerId>?</PassengerId>
<!--PassengerId — sequence number of the passenger on the flight-->
<Fops>
<!--Zero or more repetitions:-->
<Fop>
<Type>?</Type>
<!--Type - form of payment: CC (credit card) or CA (cash)-->
<Money Currency="?">?</Money>
<!--Money - payment amount-->
<!--Currency - currency code-->
<VendorCode>?</VendorCode>
<!--VendorCode — card type code: (for example, VI — Visa,
MC — MasterCard,
AX — American Express
DC — DCL,
CA — EURO,
IK — EURO,
JB — JCB,
JC — JCB,
BA — Visa)-->
<Number>?</Number>
<!--Number — card number-->
<ExpireDate>?</ExpireDate>
<!--ExpireDate — he expiration date of the card, for example 12.2020-->
<ManualApprovalCode>?</ManualApprovalCode>
<!--ManualApprovalCode - Preauthorization code for the transaction for which the funds have been blocked for ticketing. This is NOT a CVV code. It is optional. If not specified, it will be automatically obtained by the Websky system through GDS/-->
</Fop>
</Fops>
</PassengerFop>
</PassengerFops>
<DataItems>
<!--Zero or more repetitions:-->
<DataItem>
<Type>Remark</Type>
<!--Type — type of content in this block, for example: Meal, Remark-->
<Remark>
<Type>?</Type>
<!--Type — remark type, for example: General, Historical-->
<Text>?</Text>
<!--Text — remark content-->
</Remark>
</DataItem>
</DataItems>
</Ticketing>
</Request>
<Source>
<ClientId>?</ClientId>
<!--ClientId - client ID in the Websky system. You can see/add it in
"System Settings" → "Integration" → "Nemo 1.0 (SOAP API)".-->
<APIKey>?</APIKey>
<! --APIKey - the secret access key to Websky API. You can see / add it in the section
"System Settings → Integration → Nemo 1.0 (SOAP API).-->
<Language>?</Language>
<!--Language - for example: RU-->
<Currency>?</Currency>
<!-- Currency - for example: RUB, EUR-->
</Source>
</RequestBin>
</ver:Ticketing>
</soapenv:Body>
</soapenv:Envelope>
</syntaxhighlight>
</div>
</div>
<div class="toccolours mw-collapsible mw-collapsed" style="width:1000px">
==== Response ====
<div class="mw-collapsible-content">
<syntaxhighlight lang="xml" line enclose="div" style="font-size:9pt;background: #F9F9F9; border: 1px dashed #2F6FAB; padding: 10px 5px; margin: 10px 0;">
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://CLIENT_DOMAIN/nemoflights/?version%3D1.0%26for%3DTicketing" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:TicketingResponse>
<ResponseBin>
<Response>
<Ticketing ID="?" Status="?" Code="?">
<!--ID - ID of the booking in Websky system, integer, mandatory-->
<!--Status - booking status indicator, possible values:
booked - booked,
canceled - booking is canceled,
ticket - ticketed
UNDEFINED - status not defined-->
<!--Code - booking code in the supplier's system-->
<QueryPlace xsi:nil="true"/>
<!--QueryPlace — booking position in the queue, Number - booking number in the queue-->
<Flight FlightId="?">
<!--FlightId — Flight ID in the Websky system-->
<WebService>?</WebService>
<!--WebService — flight supplier-->
<ValCompany>?</ValCompany>
<!--ValCompany — code of the airline which is a validating carrier, IATA-->
<URL>?</URL>
<!--URL — link to booking of a particular flight-->
<Segments>
<Segment SegNum="?" SegGroupNum="?">
<!--SegNum — segment number in the flight-->
<!--SegGroupNum – leg number in the flight-->
<SupplierCode>?</SupplierCode>
<!--SupplierCode – order number in the airline's system-->
<DepAirp CodeType="IATA">?</DepAirp>
<!--DepAirp — Departure airport, for example: MOW - any airport in Moscow
or SVO - Sheremetyevo-->
<DepTerminal>?</DepTerminal>
<!--DepTerminal — terminal of the point of departure, if empty,
there is only 1 terminal at the airport-->
<ArrAirp CodeType="IATA">?</ArrAirp>
<!--ArrAirp — arrival airport-->
<ArrTerminal>?</ArrTerminal>
<!--ArrTerminal — terminal of the point of arrival, if empty,
there is only 1 terminal at the airport-->
<OpAirline>?</OpAirline>
<!--OpAirline — airline carrier, for example: SU — Aeroflot-->
<MarkAirline>?</MarkAirline>
<!--MarkAirline — airline selling the flight-->
<MarkAirlineName>?</MarkAirlineName>
<!--MarkAirlineName - the full name of the airline in Cyrillic-->
<FlightNumber>?</FlightNumber>
<!--FlightNumber — flight number-->
<AircraftName>?</AircraftName>
<!--AircraftName — aircraft name-->
<AircraftType>?</AircraftType>
<!--AircraftType — aircraft type, code-->
<DepDateTime>?</DepDateTime>
<!--DepDateTime — date and time of departure, format YYYYY-MM-DDTHH:MM:SS-->
<ArrDateTime>?</ArrDateTime>
<!--ArrDateTime — date and time of arrival, format YYYYY-MM-DDTCH:MM:SS-->
<StopNum>?</StopNum>
<!--StopNum — number of stopovers-->
<StopPoints>
<!--StopPoints — information about technical stops, if any-->
<StopPoint>
<AirportCode>?</AirportCode>
<!--AirportCode — airport stopover code, three character iata code-->
<UTC>?</UTC>
<!--UTC — airport time zone shift-->
<ArrDateTime>?</ArrDateTime>
<!--ArrDateTime — date and time of arrival, format YYYYY-MM-DDTCH:MM:SS-->
<DepDateTime>?</DepDateTime>
<!--DepDateTime — date and time of departure, format YYYYY-MM-DDTHH:MM:SS-->
</StopPoint>
</StopPoints>
<BookingCodes>
<BookingCode ClassType="?">
<!--ClassType — flight class, for example: economy-->
<BookingCode>?</BookingCode>
<!--BookingCode — the booking class code, different airlines may write the same class
can be written in different letters, for example: L-->
</BookingCode>
</BookingCodes>
<FlightTime>?</FlightTime>
<!--FlightTime — flight time in minutes-->
<TimeZone Departure="?" Arrival="?"/>
<!--Departure departure airport time zone-->
<!--Arrival — arrival airport time zone-->
<ETicket>?</ETicket>
<!--ETicket — e-ticket attribute, values: true / false-->
<isCharter>?</isCharter>
<!--isCharter — attribute of a charter flight, values: true / false-->
<BaggageAllowances>
<!--BaggageAllowances — baggage information -->
<BaggageAllowance>
<PassengerType>?</PassengerType>
<!--PassengerType — type of passenger, corresponds to the type of fare in PricingInfo -->
<Value>?</Value>
<!--Value — number of-->
<Measurement>?</Measurement>
<!--Measurement — a measure, can take the values: kg - kilogram, pc - baggage space, lb - pound-->
</BaggageAllowance>
</BaggageAllowances>
</Segment>
</Segments>
<PricingInfo Refundable="?">
<!--Refundable — refundable/non-refundable, true/false. If empty, not known-->
<PassengerFare Type="?" Quantity="?">
<!--Type — fare type-->
<!--Quantity —number of passengers of that type-->
<BaseFare Currency="?" Amount="?"/>
<!--BaseFare — base price, in base currency. Currency - currency code, Amount - price value-->
<EquiveFare Currency="?" Amount="?"/>
<!--EquiveFare — base value in the equivalent currency (currency of sale).
Currency - currency code, Amount - price value-->
<TotalFare Currency="?" Amount="?"/>
<!--TotalFare — total value, in the equivalent currency.
Currency - currency code, Amount - price value-->
<Taxes>
<Tax CurCode="?" TaxCode="?" Amount="?"/>
<!--CurCode — currency code, TaxCode - tax code, Amount - amount of tax-->
</Taxes>
<Tariffs>
<Tariff Code="?" SegNum="?"/>
<!--Code - fare code, SegNum - number of segment to which the fare is applied-->
</Tariffs>
<FareCalc>?</FareCalc>
<!-FareCalc - price calculation line-->
<LastTicketDateTime>?</LastTicketDateTime>
<!--LastTicketDateTime - the date and time of the time limit on the ticketing in the format YYYYY-MM-DDTHH:MM:SS. If the "Apply time zone - For time limit calculations in agent API" setting is enabled, the time limit date and time will be transferred to the user's time zone. If the setting is disabled, the date and time will be in the Moscow time zone by default.
</PassengerFare>
</PricingInfo>
<Commission Currency="?"> </Commission
<Charges Currency="?">?</Charges>.
<!-Charges - charges, Currency - currency code-->
<TotalPrice Currency="?">?</TotalPrice
<!--TotalPrice - total price, Currency - currency code-->
</Flight>
<Agency Name="?">
<!-Name - agency name-->
<Telephone Type="?">
<!--Type - type of number, mandatory, possible values:
M - Mobile, H - Home, B - Work, A - Agency-->
<!--Optional:-->
<PhoneNumber>?
<!--PhoneNumber - phone number-->
<!--Optional:-->
<CountryAccessCode>?
<!-CountryAccessCode - country code-->
<!--Optional:-->
<AreaCityCode>?
<!--AreaCityCode - region/city code-->
</Telephone>
<Address City="?" State="?" StreetAddress="?" PostalCode="?" CountryCode="?"/>
<!-City - city-->
<!-State - state-->
<!--StreetAddress - address in the city (street, house, building, office, etc)-->
<!--PostalCode - postal index-->
<!-CountryCode - country code (RU, UA etc)-->
</Agency>
<ItinReceipts Encoding="?" Format="?">
<!--ItinReceipts - itinerary receipt, Encoding - encoding, Format - format-->
<FareStored xsi:nil="true"/>
<PaymentTransactions>
<Transaction>
<Id>?</Id>
<!--Id - transaction number in Websky-->
<Status>?</Status>
<!--Status - transaction status-->
<GatewayName>?</GatewayName>
<!-GatewayName - name of the payment gateway-->
<MoneyPaid Currency="?">?</MoneyPaid>
<!--MoneyPaid - payment amount-->
<!-Currency - currency-->
<PaymentDateTime>?</PaymentDateTime>
<!-PaymentDateTime - payment date and time-->
<CreateDateTime>?</CreateDateTime>
<!--CreateDateTime - date and time of payment transaction creation-->
<Description/>
</Transaction>
</PaymentTransactions>
<PaymentStatus>?</PaymentStatus>
<!-PaymentStatus - payment status:
not_paid - not paid
partly_paid - paid, partly
fully_paid - paid in full-->
<Travellers>
<!--Zero or more repetitions:-->
<Traveller Type="?" IsContact="?" LinkedTo="?" Num="?" TravellerId="?">
<!--Type - passenger type, mandatory, possible values: ADT - adults,
CNN - children, UNN - unaccompanied children, INF - infants, INS - infants with seat-->
<!--IsContact - if true - this passenger is a contact person, if false - he is not,
there can only be 1 contact person, if there are adults among the passengers, only one of them
can be contact person, default is false-->
<!--Num - passenger number, starts with 1-->
<!--LinkedTo - the number of the adult to which the infant/toddler is linked (linking a child to an adult is optional)-->
<!--TravellerId - actualized passenger number which is returned in response to the booking request. Further references to passengers are given based on this parameter-->
<Meal>?</Meal>
<!--Meal - food type code, possible values:
NONE - none
AVML - Asian vegetarian meals
BLML - Meals with a Moderate Diet
CHML - Baby Food
CHPC - Cold breakfast for kids
CHCC - Hot Breakfast for Kids
CHHC - Kids Lunch, Ham & Cheese
PBJS - Kids Lunch, peanut butter
CHMC - Children's lunch macaroni and cheese
DBML - Diabetic Nutrition
FPML - Fruit
GFML - Gluten Free Nutrition
HFML - Fiber Rich Meals
HNML - Hindu Food
BBML - Food for Infants
KSML - Kosher cooking
SMKB - Kosher Breakfast
SMKL - Kosher Lunch
SMKD - Kosher Lunch
LPML - Low Protein Meals
LCML - Low Calorie Meals
LFML - Low Cholesterol Diet
PRML - Low Purine Diet
LSML - Light Malt Malt Nutrition
MOML - Muesli
NLML - Dairy Free Foods
ORML - Oriental Food
RVML - Raw Vegetables
SFML - Seafood
SPML - Specialty Foods
VLML - Vegetarian, Milk & Egg
VGML - Strictly Vegetarian
VJML - Jainese Vegetarian
VOML - Oriental Vegetarian Meals-->
<PersonalInfo DateOfBirth="?" Nationality="?" Gender="?">
<!-DateOfBirth - date of birth in DD.MM.YYYY format (for example 12/31/2000)-->
<!--Nationality - citizenship, two-letter country code (RU, UA, US and etc.)-->
<!--Gender - gender of passenger, possible values: M - Male, F - Female -->
<FirstName>?</FirstName>
<!--FirstName — passenger's name-->
<LastName>?</LastName>
<!--LastName -- passenger's last name-->
<!--Optional:-->
<MiddleName>?</MiddleName>
<!--MiddleName - passenger's middle name-->
</PersonalInfo>
<LoyaltyCard OpCode="?" Number="?"/>
<!--OpCode - airline code-->
<!--Number - card number-->
<ContactInfo>
<!--Optional:-->
<EmailID>?</EmailID>
<!--EmailID -- contact email-->
<!--Optional:-->
<!--DocType — document type, possible values:
P - Passport
A - Passport of a foreigner
C - Internal passport
F - Passport replacement document
M - Military ID card
N - Naturalization certificate (US specific document)
T - Re-entry document, refugee passport
V - Border crossing document-->
<!--DocNum - number of document-->
<!--CountryCode - two-letter country code of the passport (RU, UA, US etc)-->
<!--DocElapsedTime - expiration date in DD.MM.YYYY (for example 31.12.2000)-->
<Ticket TicketNum="?">
<!-- TicketNum - number of an issued ticket -->
<VisaInfo Num="?" IssueCountry="?" IssuePlace="?" BirthCountry="?" BirthCity="?" IssueDate="?"/>
<!--Num - Visa number-->
<!--IssueDate - date (DD.MM.YYYY) of issue of visa-->
<!--IssueCountry - country where the visa was issued-->
<!--IssuePlace - location where visa is issued-->
<!--BirthCountry - country of birth (IATA country code)-->
<!--BirthCity - city of birth-->
<ArrAddress City="?" State="?" StreetAddress="?" PostalCode="?" CountryCode="?"/>
<!-City - city-->
<!--State - state or region of entry-->
<!--StreetAddress - address: street, house number, apartment number, etc.-->
<!-PostalCode - postal code-->
<!-CountryCode - country code-->
<PreferedPlace SmokingAllowed="?" Location="?" RowNumber="?" PlaceNumber="?" SegNumber="?"/>
<!--If row number and seat number are specified, the SmokingAllowed and Location parameters are ignored-->
<!--SmokingAllowed - boolean value, true - smoking seat, false - non-smoking seat-->
<!--Location - location in row, possible values:
W - near the window (Window)
M - somewhere in the middle of the row (Middle)
NPW - near the aisle (NearPassengerWay)
NS - no preference (NotSpecified)-->
<!--RowNumber - row number-->
<!-PlaceNumber - seat number-->
<!--SegNumber - segment number-->
<DocStringFormats>
<!--Zero or more repetitions:-->
<DocStringFormat>?</DocStringFormat>
<!--DocStringFormat - Passport string format, possible values:
DOCS - DOCS format string, FOID - FOID format string-->
</DocStringFormats>
</Traveller>
</Travellers>
<AutoCancelDate> </AutoCancelDate>
<!--AutoCancelDate - date and time of autocancellation time limit in format YYYYY-MM-DDHH:MM:SS determined by agency settings-->
<TimeLimits>
<TicketingTimeLimit>?</TicketingTimeLimit>
<!--TicketingTimeLimit - TicketingTimeLimit in the format YYYY-MM-DDTHH:MM:SS-->
<PriceTimeLimit>?</PriceTimeLimit>
<!--PriceTimeLimit - Price time limit from GDS in format YYYYY-MM-DDTHH:MM:SS-->
<AdvancedPurchaseTimeLimit>?</AdvancedPurchaseTimeLimit>
<!--AdvancedPurchaseTimeLimit - The time limit of the price from the fare rules in the format YYYYY-MM-DDTHH:MM:SS-->
<AgencyTimeLimit>?</AgencyTimeLimit>
<!-AgencyTimeLimit - The time limit of the settings in the format YYYYY-MM-DDTCH:MM:SS-->
</TimeLimits>
</Ticketing>
<Requisites/>
<RequestType xsi:nil="true"/>
<UserID xsi:nil="true"/>
<Error Code="?">Error message</Error>
</Response>
</ResponseBin>
</ns1:TicketingResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</syntaxhighlight>
</div>
</div>
== General format of the request / response of the voiding==
This request is launched after the ticket is issued, if it is necessary to cancel it.
WSDL: http://CLIENT_DOMAIN/nemoflights/wsdl.php?for=VoidTicket
<div class="toccolours mw-collapsible mw-collapsed" style="width:1000px">
==== Request ====
<div class="mw-collapsible-content">
<syntaxhighlight lang="xml" line enclose="div" style="font-size:9pt;background: #F9F9F9; border: 1px dashed #2F6FAB; padding: 10px 5px; margin: 10px 0;">
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ver="http://CLIENT_DOMAIN/nemoflights/?version%3D1.0%26for%3DVoidTicket">
<soapenv:Header/>
<soapenv:Body>
<ver:VoidTicket>
<RequestBin>
<Request>
<VoidTicket>
<BookID>?</BookID>
<!--BookID — booking ID in the Websky system, integer-->
</VoidTicket>
</Request>
<Source>
<ClientId>?</ClientId>
<!--ClientId - client ID in the Websky system. You can view/add it in
"System Settings" → "Integration" → "Nemo 1.0 (SOAP API)".
<APIKey>?</APIKey>
<! --APIKey - the secret access key to API Websky. You can see / add it in the section
"System Settings → Integration → Nemo 1.0 (SOAP API).-->
<Language>?</Language>
<!--Language - for example: RU-->
<Currency>?</Currency>
<!-- Currency - for example: RUB, EUR-->
</Source>
</RequestBin>
</ver:VoidTicket>
</soapenv:Body>
</soapenv:Envelope>
</syntaxhighlight>
</div>
</div>
<div class="toccolours mw-collapsible mw-collapsed" style="width:1000px">
==== Response====
<div class="mw-collapsible-content">
<syntaxhighlight lang="xml" line enclose="div" style="font-size:9pt;background: #F9F9F9; border: 1px dashed #2F6FAB; padding: 10px 5px; margin: 10px 0;">
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://CLIENT_DOMAIN/nemoflights/?version%3D1.0%26for%3DVoidTicket" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:VoidTicketResponse>
<ResponseBin>
<Response>
<VoidTicket BookID="?">
<!--BookID — booking ID in the Websky system, integer-->
<Result Success="?"/>
<!--Success — the result of canceling the ticketing, true or false-->
</VoidTicket>
<Requisites/>
<RequestType xsi:nil="true"/>
<UserID xsi:nil="true"/>
<Error Code="?">Error message</Error>
</Response>
</ResponseBin>
</ns1:VoidTicketResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</syntaxhighlight>
</div>
</div>
== See also ==
* [[Air Tickets Agency API]]
* [[Booking]]
* [[Additional Air Tickets API requests]]