{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/stackdata-io/json-schema/stackdata-io-series-request-schema.json",
  "title": "POST /v1/series request",
  "description": "One series per request. The caller names every dimension; nothing is guessed or relaxed. Build the request from GET /v1/datasets/{id}/structure.",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stackdata-io-openapi.json#/components/schemas/SeriesRequest",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "dataset",
    "countries",
    "period",
    "select"
  ],
  "properties": {
    "dataset": {
      "type": "string",
      "description": "A dataset id from the catalog, as returned by search (/v1/search, or the search_datasets MCP tool), e.g. \"ilo-sdmx:DF_X\"."
    },
    "countries": {
      "type": "array",
      "minItems": 1,
      "maxItems": 25,
      "items": {
        "type": "string"
      },
      "description": "ISO 3166-1 alpha-3 codes (e.g. \"JPN\") or an aggregate code listed in the dataset's /structure. 1 to 25 entries."
    },
    "period": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "start",
        "end"
      ],
      "description": "Inclusive ISO period range. \"latest\" is not accepted: name the periods you want. Annual 2020, quarterly 2020-Q1, monthly 2020-01.",
      "properties": {
        "start": {
          "type": "string",
          "pattern": "^\\d{4}(-Q[1-4]|-(0[1-9]|1[0-2]))?$",
          "description": "First period, ISO form: YYYY, YYYY-Qn or YYYY-MM. Must match a frequency the dataset serves."
        },
        "end": {
          "type": "string",
          "pattern": "^\\d{4}(-Q[1-4]|-(0[1-9]|1[0-2]))?$",
          "description": "Last period, same form and frequency as start."
        }
      }
    },
    "select": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "A member code for every dimension of the dataset (other than geography and time) as listed in /structure, including frequency. Every dimension must be named; a missing or unknown dimension or code is a 400, never defaulted."
    }
  }
}