Skip to content

Response data

There are few major sections that will include all the responses in the API.

MetaData

Each response has metadata section, and it will describe overall status of each response. The Metadata parameters are as given below.

"meta": {
    "success": true,
    "statusCode": 1,
    "statusMessage": "SUCCESS",
    "actionType": "Flight search",
    "conversationId": "fe22cb8d-67e9-4c29-92af-e44dffdcb9a9"
}
Tags Attribute Description
meta meta
(Object)
Meta data Tag
success
(String)
Response status will be return.
Ex: "true" OR "false"
statusCode
(String)
Response statusCode will be return.
Ex: -3, -2, -1, 0, 1, 2, 3
statusMessage
(String)
Response statusMessage will be return.
Ex:
NOT FOUND
UNAUTHORIZED
ERROR
WARNING
SUCCESS
FETCH LATER
NOT YET AVAILABLE

actionType
(String)
This attribute will indicate that client request type such as Flight search , Prov book and Book etc... . This is for information purpose.
conversationId
(String)
conversationId a unique identifier of current conversation .

Warnings

The Warnings section also will be available in each response and it will describe warnings related to particular response.

"warnings": [
    {
      "code": "validation_required",
      "documentationUrl": "api-doc/docs/troubleshoot/api-error-codes/index.html",
      "message": "Field 'origin' can't be blank",
      "value": "Departure Time changed for EK7 2022-09-03 DXB-LHR"
    }
  ]

Errors

The Errors section also will be available in each response and it will describe errors related to particular response.

 "errors": [
    {
      "code": "validation_required",
      "documentationUrl": "api-doc/docs/troubleshoot/api-error-codes/index.html",
      "message": "Field 'departureAirportCode' can't be blank",
      "value": "Field 'departureAirportCode' can't be blank",
      "source": {
        "field": "origin",
        "pointer": "/flightSegments/0/departureAirportCode"
      },
      "title": "Required field",
      "type": "validation_error"
    }
  ]

Common data

The common data section also will be available in each response. It will consist of common data in any particular response.

"commonData": {
    "searchKey": "AIR03020094",
    "productCode": "A"    
  }

Response content

The Response content is fill with response data in result . As a example Flight search will give a content as given below. Note that this is part of response.

 "data": [
    {
      "offerId": "AIR03020094-12",
      "detail": {
        "ancillaryDetailsAvailable": false,
        "fareRuleMandatory": false,
        "lcc": true,
        "apis": false,
        "ndc": false,
        "onHoldSupported": false,
        "moreFaresAvailable": false,
        "additionalProperties": [
          {
            "key": "key1",
            "value": "value1",
            "description": "description"
          }
        ]
      },
      "journey": [
        {
          "flight": {
            "flightKey": "EK-Iflt5a00d23d92732",
            "stopQuantity" : 0,

            ----------
            ----------
            ---------            
            etc...

Additional properties

The additional properties section will be available in each main section in the response. That will keep for future usage. If additional data need to be send with response in future then this section can be used without changing JSON schema.

    "additionalProperties": [
      {
        "key": "timeStamp",
        "value": "YYYY-MM-DD HH:MM:SST",
        "description": "description"
      },
      {
        "key": "serverKey",
        "value": "Server01",
        "description": "description"
      }
    ]

Headers

The each and every response below attributes are available in header section. So that will describe at HTTP headers section.

"headers": [
{
"sessionId": "9654e567-b446-46f4-a321-04269a546b83"
},
{
"conversationId": "80747f2c-5bae-445d-b2e1-17b30e35d746"
},
{
"requestId": "4984e077-093f-45fd-b069-bcd66b4e5586"
}
]