Schemas
S7 Agent API makes WSDLs for all of versions available for download.
When you are developing S7 Agent API applications that send requests and receive responses, you might find it helpful to validate the contents of your messages against the relevant schema.
The following table describes the HTTP headers that you typically set in a S7 Agent API request:
# | Name | Mandatory | Key in headers | Description |
---|
1 | Version of API | Optional | X-API-Version | Depends on version of API that you want to execute If you didn't pass Version of API in request a default one will be executed
|
2 | Basic authorization string | Required | Authorization | Credentials that you received from our S7 technical support. Check out Quick Start for how to get it |
3 | Operation name |
(the "SOAPAction" key in headers) — check Operation table for a value below | Required | SOAPAction | Depends on operation that you want to execute |
4 | Type of content |
(the "" key in headers) — always | Sets the content type of the request. Always "text/xml" |
Note |
S7 Agent API doesn't support compressed request and/or response in GZIP formatS7 agent API required encrypted HTTP requests via HTTPS only. Check out Quick Start for how to get SSL certificate.
For validating your requests that they conform to API's schemas use WSDLs. Links provided in Environment table.
Version of API
The following example shows headers of a typical SearchFlights operation of 0.52 version API on Test environment:
Code Block |
---|
|
POST /agent-api/gaia HTTP/1.1
Host: qa-gaia.s7.ru
Content-Type: text/xml
SOAPAction: "http://api.s7.ru/SearchFlightsJourney"
X-API-Version: 0.52
Authorization: Basic ********************* |
Versions
You can use any released
You can use other versions if your requests conform that syntax. Check references for detailed explanation of input&output parameters and possible errors for every version of API.
If you didn't pass Version of API in request
it will be execute the default. a default one will be executed. You always able to check executed API version in response headers.
But we recommend that you always specify version in all you request to avoid unexpected responses form another versions of API.
Operation names
Applications must send the "SOAPAction" key in headers of request to the S7 Agent API for determination of operation.
# | Operation | SOAPAction value (actual for v0. |
---|
35agentPaymentAgentPaymentbaggageChargescancelBooking | "http://api.s7.ru/ |
BaggageChargesbookchangeBook | "http://api.s7.ru/ |
BookcancelBookingCancelBookingchangeBookflightInfo | "http://api.s7.ru/ |
ChangeBookdemandTicketsorderCreate | "http://api.s7.ru/ |
DemandTicketsfindRulesorderChange | "http://api.s7.ru/ |
FindRulesOrderChange" |
8 | read | "http://api.s7.ru/Read" |
9 | reprice | "http://api.s7.ru/Reprice" |
10 | retrieveTicket | "http://api.s7.ru/RetrieveTicket" |
11 |
searchFlightsretrieve TST | "http://api.s7.ru/ |
SearchFlightsRetrieveTST" |
12 | searchFlightsFlex | "http://api.s7.ru/SearchFlightsFlex" |
13 | searchFlightsBySlice | "http://api.s7.ru/SearchFlightsBySlice" |
14 | searchFlightsJourney | "http://api.s7.ru/SearchFlightsJourney" |
15 | seatMap | "http://api.s7.ru/SeatMap" |
131417 | voidTicket | "http://api.s7.ru/VoidTicket" |
Response
Identifying requested version of API
Successful results
Unsuccessful results18 | schedule | "http://api.s7.ru/agent/ndc/get-schedule" |
19 | postsale | "http://api.s7.ru/agent/ndc/add-postsell-ancillaries" |
Common questions
Table of contents:
Environment
Excerpt |
---|
Test | Production | # | Version | Endpoint | Endpoint |
---|
1 | 0.21 | WSDL |  | WSDL |  |
---|
2 | 0.35 | WSDL |  |
— default version for environment
— not installed on environment
Note |
---|
If you are ready to a new versions which are not installed on production environment — notify our technical support by JIRA |
Note |
Follow steps to quickly get an access to API