Headers
The following table describes the HTTP headers that you received in a S7 Agent API response:
# | Name | Key in headers | Description |
---|---|---|---|
1 | Version of API | X-API-Version | Executed version of API If you didn't pass Version of API in request you can find here an executed default version for current environment |
2 | Basic authorization string | Authorization | Used credentials in request |
3 | Executed operation name | SOAPAction | Executed operation |
4 | Type of content | Content-Type | The content type of the response. Always "text/xml" |
5 | Conversation ID | X-API-Conversation | The identificatior of transaction.
|
The following example shows headers of a typical SearchFlights operation of 0.35 version API on Test environment:
Content-Type: text/xml SOAPAction: "http://api.s7.ru/SearchFlights" X-API-Version: 0.35 Authorization: Basic oV5zbWlyCx92X3M3dfS6dGFpbDpxLTE2OXFs X-API-Conversation: ceec2d2d-8081-4d48-9df9-a712f6236220
Successful results
Successful responses typically includes the following structure (actual for 0.35 version):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns2:Envelope xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns3="http://www.iata.org/IATA/EDIST"> <ns2:Body> <ns3:ItinReshopRS Version=""> <ns3:Document> <ns3:Name>1.0</ns3:Name> </ns3:Document> <ns3:Success/> <ns3:Response> ... </ns3:Response> </ns3:ItinReshopRS> </ns2:Body> </ns2:Envelope>
For more information about received data in successful response, check RQ pages divided by operation in Reference section.
Unsuccessful results
Unsuccessful responses typically includes the following structure (actual for 0.35 version):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns2:Envelope xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns3="http://www.iata.org/IATA/EDIST"> <ns2:Body> <ns3:ItinReshopRS Version=""> <ns3:Document> <ns3:Name>1.0</ns3:Name> </ns3:Document> <ns3:Errors> <ns3:Error Type="101" Status="Incomplete" Owner="S7 NDC API">Adult passenger Traveler-ADT-1 must be over 12 years of age at the time of the first departure</ns3:Error> <ns3:Error Type="MSG">System validation error. Please, check your request</ns3:Error> </ns3:Errors> </ns3:ItinReshopRS> </ns2:Body> </ns2:Envelope>
For an unsuccessful responses, API returns Errors sections in the body of the HTTP message:
- Error with technical info — Type <> "MSG", can be multiple
- Error with message for user — Type = "MSG", always single for a response
A technical error typically includes the following basic elements:
- Type — Error code
- Status — Status of operation
- Owner — Application which execution resulted with an error (S7 Agent API or other external system)
- Value — Error description
For more information about possible errors, check Errors pages divided by operation in Reference section.
Common questions
Question Answer How to access the product environment? If you are newbie, just follow the steps, which provides the simplest way to quickly get an access to API Or you already adopted your systems to our test environment? Notify our technical support by Kaiten for final testing under the supervision of our technologists and proceed to signing of the contract of EDS How to access the test environment? Which endpoints should be used? Explore the ways of submitting requests: How does the standard ticketing scenario looks? Simple operation flow: searchFlightsJourney (AirShoppingRQ) → book (OrderCreateRQ) → reprice (ItinReshopRQ) → demandTickets (AirDocIssueRQ) Discover more scenarios from simplest flows to best practices Is it possible to use social categories of passengers: pensioners, youth, sailors, students, etc.? What types of passengers are available in the API? No, only 3 types of passengers are available: adult (ADT) — passengers 12 years old and older child (CHD) — passengers between 2 (inclusive) and 12 years old (exclusive) 2-year-old passenger is a child 12-year-old passenger is an adult infant in a lap (INF) — passengers under 2 years How can I get information about flights commissions and manage agency fees? For any financial questions you have to contact S7's sales department or your account manager via at vm@s7.ru Is the Multi-City method implemented in API? Yes, check searchFlights operation overview to find out. Samples will be available soon! Is the refund method implemented in API? No, the refunds are not implemented Can I get an S7 route map? There is no such request in API Are all S7 fares branded? Yes, all fares are split into 3 fare families, from the cheapest to the most equipped fare: Economy Basic Economy Standard Economy Plus Business Standard Business Plus Can I get a terminal text view of the current PNR data? Or just build a template from an XML response? No, only XML display is available for input and output Does the service support queues? All requests to API are synchronous, queues are not used I recieve "Unknown operation" in response, while requests executed in SoapUI Check using of correct HTTP header of your requests: X-API-Version — e.g. 0.52 or other SOAPAction — e.g. "http://api.s7.ru/Reprice" or other Content-Type: text/xml Also you can find out how to handle with unsuccessful result and common access errors When I try the link https://qa-gaia.s7.ru/agent-api/wsdl/0.52?wsdl I get an error: "400 Bad Request. No required SSL certificate was sent." You didn't use a right SSL certificate to download API's WSDL. Check you used certificate for the test environment (not for production): If it seems ok to you, contact to S7 API support with attached request body and headers In case you never heard about access credentials to API, just follow the steps, which provides the simplest way to quickly get an access to API Also you can find out how to handle with unsuccessful result and common access errors I always recieve an error: "Can not perform operation without valid RequestorID" Probably, you used incorrect Agent credentials in Party tag. Contact to S7 API support with used credentials Also you can find out how to handle with unsuccessful result and common access errors1 2 3 Test Production # Version Endpoint Endpoint 1 0.52 WSDL 2 up to refund&deleteTST&schedule&split&postsale refund&deleteTST&schedule 3 up to 4 5 6 7 8 9 10 11 12 13 14 15