Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This is a high-level overview of a typical response from S7 Agent API.

Table of contents:

Table of Contents

Headers

The following table describes the HTTP headers that you received in a S7 Agent API response:


#NameKey in headersDescription
1Version of APIX-API-Version

Executed version of API

(warning) If you didn't pass Version of API in request you can find here an executed default version for current environment

2Basic authorization stringAuthorizationUsed credentials in request
3Executed operation nameSOAPActionExecuted operation
4Type of contentContent-TypeThe content type of the response. Always "text/xml"
5Conversation IDX-API-Conversation

The identificatior of transaction.

(warning)

(warning) Pass it to our technical support by JIRA if you faced problems with responses

The following example shows headers of a typical SearchFlights operation of 0.35 version API on Test environment:

Code Block
linenumberstrue
Content-Type: text/xml
SOAPAction: "http://api.s7.ru/SearchFlights"
X-API-Version: 0.
35
52
Authorization: Basic oV5zbWlyCx92X3M3dfS6dGFpbDpxLTE2OXFs
X-API-Conversation: ceec2d2d-8081-4d48-9df9-a712f6236220


Table of contents:

Table of Contents

Successful results

Successful responses typically includes the following structure (actual for 0.35 version):

Code Block
languagexml
linenumberstrue
<?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):

Code Block
languagexml
linenumberstrue
<?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 — Level of errorApplication 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  divided by operation (also available in Reference section).

Common questions

Excerpt Include
Common | FAQ
Common | FAQ
nopaneltrue