{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/feed-fm/json-schema/feed-fm-station-list-response-schema.json",
  "title": "StationListResponse",
  "description": "The paged station list returned by `GET /station` and\n`GET /placement/{placement_id}/station`.\n",
  "x-generated": "2026-12-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/feed-fm-v3-openapi.yml#/components/schemas/StationListResponse",
  "type": "object",
  "required": [
    "success",
    "stations",
    "total",
    "page",
    "per_page"
  ],
  "properties": {
    "success": {
      "type": "boolean",
      "description": "Always `true` on this payload."
    },
    "stations": {
      "type": "array",
      "description": "The stations on this page.\n",
      "items": {
        "$ref": "#/$defs/Station"
      }
    },
    "total": {
      "type": "integer",
      "description": "Total number of stations matching the query, across all pages.\n"
    },
    "page": {
      "type": "integer",
      "description": "The zero-based page index that was returned, echoing the `page`\nquery parameter (default 0).\n"
    },
    "per_page": {
      "type": "integer",
      "description": "The page size that was applied, echoing the `per_page` query\nparameter (default 20).\n"
    }
  },
  "$defs": {
    "Station": {
      "type": "object",
      "description": "A full station. The optional properties are each emitted only under the\nconditions described below, so their absence carries meaning.\n",
      "required": [
        "id",
        "name",
        "on_demand",
        "pre_gain",
        "options",
        "uuid",
        "crossfade_seconds",
        "single_play",
        "last_updated"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The station id. Numeric, but always serialized as a string. This\nvalue changes with the 'placement id', and so should not be\npersisted - use the `uuid` property instead.\n"
        },
        "name": {
          "type": "string",
          "description": "The station's display name."
        },
        "on_demand": {
          "type": "integer",
          "enum": [
            0,
            1
          ],
          "description": "Whether the station is an on-demand station: `1` for yes, `0` for\nno.\n"
        },
        "pre_gain": {
          "type": [
            "number",
            "null"
          ],
          "description": "Station-level gain adjustment in dB, to be applied before playback.\n`null` when the station has no adjustment configured.\n"
        },
        "options": {
          "$ref": "#/$defs/StationOptions"
        },
        "uuid": {
          "type": "string",
          "description": "The station's stable external identifier. Unlike `id`, it does not\nchange over time.\n"
        },
        "crossfade_seconds": {
          "type": [
            "number",
            "null"
          ],
          "description": "The station's own crossfade duration in seconds. `null` when unset.\nThis may differ from the customer-configured\n`options.crossfade_seconds`; the two can disagree.\n"
        },
        "single_play": {
          "type": "boolean",
          "description": "`true` when the station is a single-play station — one track, not a\ncontinuous stream.\n"
        },
        "last_updated": {
          "type": "string",
          "format": "date-time",
          "description": "When the station's contents last changed. Clients use this to decide\nwhether a cached offline copy is stale.\n"
        },
        "last_play_start": {
          "type": "string",
          "format": "date-time",
          "description": "When this client last started a play on this station. Emitted only\nwhen such a play exists, so it is absent for new clients and for\nstations the client has never played.\n"
        },
        "expire_date": {
          "type": "string",
          "format": "date-time",
          "description": "When a downloaded offline copy of this station should be considered\nexpired — three weeks from the moment of the response. Emitted\n**only** for entries in `offline_stations` on the session response;\nit never appears on streaming stations, nor on the station-list\nroutes even when those are listing offline stations.\n"
        },
        "country_inclusion_mode": {
          "type": "string",
          "description": "How the `countries` list should be read: `include` means the station\nis available only in those countries, `exclude` means it is\navailable everywhere but those.\n"
        },
        "countries": {
          "type": "array",
          "description": "Two-letter ISO 3166-1 alpha-2 country codes the\n`country_inclusion_mode` applies to. Emitted only when\n`country_inclusion_mode` is exactly `include` or `exclude`, and\nnever `null` in that case — when the property is present it always\ncarries the list. Absent for any other mode.\n",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "StationOptions": {
      "type": "object",
      "description": "Free-form, customer-configured options attached to a station. Contents\nvary per customer; unknown keys should be passed through rather than\nrejected.\n",
      "additionalProperties": true,
      "properties": {
        "crossfade_seconds": {
          "type": "number",
          "description": "Crossfade duration for the station, in seconds.\n"
        }
      }
    }
  }
}