Don't see what you need? Submit a request

Segments endpoint

Jaivin Anzalota -

This endpoint returns a segments collection.

Request

GET /segments

Parameters

Name Required Description
ids Yes Up to 300, comma-delimited segment keys. Extraneous keys are ignored.
include No Comma-delimited list of related resources to include. By default, this endpoint does not return any related resources.
  • aircraft
  • entertainment
  • fresh_food
  • layout
  • power
  • seat
  • wifi

Response

Resource Attributes

segment

Name Value set Description
id e.g. BOS-DEN-DL-123-20990224-ECON Segment key

See Flight Amenities for available data elements:


Examples

#1 Fetching seat and wifi data

Request

curl \
  -H "Auth: YOUR_API_KEY" \
  -H "Accept: application/vnd.api.v3+json" \
  -G \
  -d ids=DSM-ORD-AA-3558-20160907-FIRST \
  -d include=seat,wifi \
  YOUR_HOST/segments

Response

{
  "data": [
    {
      "id": "DSM-ORD-AA-3558-20160907-FIRST",
      "links": {
        "seat": 20,
        "wifi": 2
      }
    }
  ],
  "linked": {
    "seats": [
      {
        "id": 20,
        "display_text": "Recliner seat (37\")",
        "quality": "better",
        "legroom": "more",
        "pitch": "37",
        "width": "n/a",
        "flatness": "not flat",
        "type": "recliner seat",
        "updated_at": "2016-07-01T06:09:52Z"
      }
    ],
    "wifis": [
      {
        "id": 2,
        "display_text": "Basic Wi-Fi (fee)",
        "quality": "standard",
        "performance": "basic",
        "cost": "paid",
        "exists": "yes",
        "chance": "full",
        "coverage": "full",
        "connectivity_type": "wifi",
        "type": "wifi",
        "updated_at": "2016-05-31T10:03:55Z"
      }
    ]
  }
}
Have more questions? Submit a request