---
updatedAt: 2025-09-18T22:00:07.000Z
agentTools:
  projectIndex: https://dev.kevel.com/llms.txt
---

# List Flight Categories

# Why retrieve a list of flight categories?

When you are working with flights, and potentially want to make changes and updates to an existing flight in a campaign, it can be useful to first retrieve a list of the different flight categories so you can then determine what changes you would like to make.

# API Syntax

When using the `List Flight Categories` API, it is important to understand the syntax required to make the request. Because the Kevel API is a RESTful API, there is a specific request format that must be followed to ensure the endpoint can process the request. The format is:

`GET https://api.kevel.co/v1/flight/{FlightID}/categories`

Where:

* `GET` - the type of API request being made.
* `https://api.kevel.co` - the URL for the request.
* `v1` - the API version.
* `flight`- the API endpoint being called.
* `FlightID`- The ID associated with the flight.
* `categories`- The different categories associated with the flight.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "management-api-2",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.kevel.co"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "X-Adzerk-ApiKey",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/flight/{FlightID}/categories": {
      "get": {
        "summary": "List Flight Categories",
        "description": "",
        "operationId": "flight-categories-list",
        "parameters": [
          {
            "name": "FlightID",
            "in": "path",
            "description": "The ID of the Flight",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"page\":1,\n  \"items\":[\n    {\n      \"Id\":123,\n      \"Name\":\"Sports\"\n    }\n    {\n      \"Id\":234,\n      \"Name\":\"Current Events\"\n    }\n  ]\n}"
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl -X GET -H \"X-Adzerk-ApiKey:$ADZERK_API_KEY\" \"https://api.kevel.co/v1/flight/123456/categories\""
            },
            {
              "language": "javascript",
              "code": "const Adzerk = require('@adzerk/management-sdk');\nconst apiKey = process.env.ADZERK_API_KEY;\n\nasync function listFlightCategories() {\n  let specifications = await Adzerk.fetchSpecifications();\n  let client = await Adzerk.buildClient({apiKey, specifications});\n\n  let flightCategories = await client.run(\"flightCategory\", \"listForFlight\", {flightId: 12345});\n  console.log(flightCategories);\n\n  let names = flightCategories.items.map(a => a.name)\n  console.log(names);\n}\n\nlistFlightCategories();"
            },
            {
              "language": "ruby",
              "code": "require \"adzerk\"\n\ndef list_flight_categories()\n    client = Adzerk::Client.new(ENV[\"ADZERK_API_KEY\"])\n    flight_id = 12345\n    pp client.categories.list(flight_id)\nend\nlist_flight_categories()"
            }
          ],
          "samples-languages": [
            "curl",
            "javascript",
            "ruby"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "X-Adzerk-Sdk-Version",
        "value": "Readme.io:ManagementAPI2"
      }
    ],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```