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
|
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 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 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:
A technical error typically includes the following basic elements:
For more information about possible errors, check Errors pages divided by operation in Reference section.