Extended request fields

This feature can be enabled in the API request by including:

Copy
Copied
"control": {
  "features": [
    "extended_req_fields"
  ]
}

This feature allows clients to extend their request with additional fields that were previously available only on either the top or the itinerary level.

These fields have been equalized across both levels of the request to provide clients a more granular control over the individual fields' values in bulk requests, and are now available for application either globally to all itineraries or individually per itinerary.

Note that whichever field is applied to the itinerary level will always override the corresponding top-level field's value.

The fields will get returned in the response as they were set when the include_rq control option is on (just like pcc, pos and psgrs have been returning until now).

New fields on the top level (previously available on the itinerary level only):

  • pos
  • src
  • psgrs

New fields on the itinerary level (previously available on the top level only):

  • pcc
  • travel_agency_id
  • office_id
  • acct_code
  • currency

Example request utilizing all fields:

Copy
Copied
{
  "control": {
    "features": [
      "extended_req_fields"
    ]
  },
  "pcc": "9DB7",
  "currency": "USD",
  "acct_code": "abc123",
  "travel_agency_id": "456789",
  "office_id": "PLD",
  "pos": "SOF",
  "src": "1A",
  "psgrs": [
    "ADT",
    "CHN"
  ],
  "data": {
    "itineraries": [
      {
        "segments": [
          {
            // ... this itinerary utilizes all fields set at the top-level
          }
        ]
      },
      {
        "psgrs": [
          "CHN"
        ],
        "segments": [
          {
            // ... this itinerary utilizes all but overrides the `psgrs` field
          }
        ]
      },
      {
        "pcc": "AD2",
        "segments": [
          {
            // ... this itinerary utilizes all but overrides the `pcc` field
          }
        ]
      },
      {
        "currency": "BGN",
        "segments": [
          {
            ...
          }
        ]
      },
      {
        "acct_code": "123abc",
        "segments": [
          {
            ...
          }
        ]
      },
      {
        "pos": "BUC",
        "segments": [
          {
            ...
          }
        ]
      },
      {
        "travel_agency_id": "123456",
        "segments": [
          {
            ...
          }
        ]
      },
      {
        "src": "1S",
        "segments": [
          {
            ...
          }
        ]
      }
    ]
  }
}