{
  "openapi": "3.1.0",
  "info": {
    "title": "NuaSense API",
    "version": "1.0.0",
    "description": "East African farm and market data. Your own weather stations and soil probes with the agronomy computed from them (spray windows, disease risk, irrigation need, a forecast for the station), and the market layer for Kenya, Tanzania, Uganda and Rwanda (county prices, satellite demand, news signals, food security).\n\nAuthentication: an API key from https://platform.nuasense.com (API Keys), sent as `Authorization: Bearer nua_live_…`. Call `GET /catalog` first: it lists the datasets this key reaches.\n\nSend `X-NuaSense-Client` with what you are (for example `skill/0.1.0; agent=claude-code`). It changes nothing in price or limits.\n\nProse docs for agents: https://api.nuasense.com/index.md",
    "contact": {
      "name": "NuaSense",
      "url": "https://nuasense.com",
      "email": "info@nuasense.com"
    },
    "termsOfService": "https://nuasense.com/terms/"
  },
  "externalDocs": {
    "description": "Docs for agents and developers",
    "url": "https://api.nuasense.com/index.md"
  },
  "servers": [
    {
      "url": "https://api.nuasense.com"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "catalog",
      "description": "What this key reaches"
    },
    {
      "name": "farm",
      "description": "Your own stations, probes and fields, and what is computed from them"
    },
    {
      "name": "market",
      "description": "East African market, satellite and food-security layers"
    },
    {
      "name": "analysis-prices",
      "description": "Ready-made analyses: Prices — what things cost, where, and when"
    },
    {
      "name": "analysis-demand",
      "description": "Ready-made analyses: Demand — where the season and the buying are"
    },
    {
      "name": "analysis-analysis",
      "description": "Ready-made analyses: Analysis — measured answers, no forecast"
    },
    {
      "name": "analysis-news",
      "description": "Ready-made analyses: News & signals"
    }
  ],
  "paths": {
    "/api/nuasense/v1/catalog": {
      "get": {
        "operationId": "getCatalog",
        "tags": [
          "catalog"
        ],
        "summary": "List the datasets this key reaches",
        "description": "Call this first. It answers which datasets, fields and filters the key can use; build only against what it lists.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/farm/weather": {
      "get": {
        "operationId": "farmWeatherRaw",
        "tags": [
          "farm"
        ],
        "summary": "Weather station readings",
        "description": "Raw ~10-minute uplinks from the gateway weather station. Firmware-calibrated; the MQTT bridge is pass-through. Cadence: ~10 min. Narrowed to your own gateways and to devices approved for API exposure. Scope: farm:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "gateway_id",
            "in": "query",
            "required": false,
            "description": "Filter on gateway_id. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "farm.weather.raw"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "gateway_id": {
                            "type": "string",
                            "description": "the row's gateway_id"
                          },
                          "temperature": {
                            "type": "number",
                            "description": "unit °C; air temperature"
                          },
                          "humidity": {
                            "type": "number",
                            "description": "unit %"
                          },
                          "pressure": {
                            "type": "number",
                            "description": "unit hPa"
                          },
                          "light": {
                            "type": "number",
                            "description": "unit lux"
                          },
                          "light_max": {
                            "type": "number",
                            "description": "unit lux"
                          },
                          "rainfall": {
                            "type": "number",
                            "description": "unit mm"
                          },
                          "wind_speed": {
                            "type": "number",
                            "description": "unit m/s"
                          },
                          "wind_gusts": {
                            "type": "number",
                            "description": "unit m/s"
                          },
                          "wind_direction": {
                            "type": "number",
                            "description": "unit °"
                          },
                          "gps_lat": {
                            "type": "number",
                            "description": "unit °; only when gps_fix=true"
                          },
                          "gps_lon": {
                            "type": "number",
                            "description": "unit °; only when gps_fix=true"
                          },
                          "gps_alt": {
                            "type": "number",
                            "description": "unit m; only when gps_fix=true"
                          },
                          "battery_voltage": {
                            "type": "number",
                            "description": "unit V"
                          },
                          "battery_percent": {
                            "type": "number",
                            "description": "unit %"
                          },
                          "lora_rx_count": {
                            "description": "link telemetry"
                          },
                          "fw_version": {
                            "description": "link telemetry"
                          },
                          "rain_clicks": {
                            "type": "number",
                            "description": "unit count; fw19 raw — ×0.2691 = rainfall mm"
                          },
                          "wind_clicks": {
                            "type": "number",
                            "description": "unit count; fw19 raw"
                          },
                          "wind_hz_avg": {
                            "type": "number",
                            "description": "unit Hz; fw19 raw — ×0.667 = wind_speed m/s"
                          },
                          "wind_hz_peak": {
                            "type": "number",
                            "description": "unit Hz; fw19 raw — peak, feeds wind_gusts"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/farm/soil": {
      "get": {
        "operationId": "farmSoilRaw",
        "tags": [
          "farm"
        ],
        "summary": "Soil node readings",
        "description": "Raw ~10-minute uplinks from soil probes. Nodes uplink independently of the gateway; gateway_id is a logical farm key only. Cadence: ~10 min. Narrowed to your own gateways and to devices approved for API exposure. Scope: farm:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "gateway_id",
            "in": "query",
            "required": false,
            "description": "Filter on gateway_id. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dev_eui",
            "in": "query",
            "required": false,
            "description": "Filter on dev_eui. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node_id",
            "in": "query",
            "required": false,
            "description": "Filter on node_id. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "application",
            "in": "query",
            "required": false,
            "description": "Filter on application. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "farm.soil.raw"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "gateway_id": {
                            "type": "string",
                            "description": "the row's gateway_id"
                          },
                          "dev_eui": {
                            "type": "string",
                            "description": "the row's dev_eui"
                          },
                          "node_id": {
                            "type": "string",
                            "description": "the row's node_id"
                          },
                          "application": {
                            "type": "string",
                            "description": "the row's application"
                          },
                          "soil_moisture_1": {
                            "type": "number",
                            "description": "unit %; depth channel 1"
                          },
                          "soil_moisture_2": {
                            "type": "number",
                            "description": "unit %; depth channel 2"
                          },
                          "temperature_1": {
                            "type": "number",
                            "description": "unit °C; depth channel 1"
                          },
                          "temperature_2": {
                            "type": "number",
                            "description": "unit °C; depth channel 2"
                          },
                          "cw_humidity": {
                            "type": "number",
                            "description": "unit %; Comwintop probe — volumetric water content; same value as soil_moisture_1 on cw nodes"
                          },
                          "cw_temperature": {
                            "type": "number",
                            "description": "unit °C; Comwintop probe — soil temperature; fills temperature_1 when no DS18B20 probe is fitted"
                          },
                          "cw_ec": {
                            "type": "number",
                            "description": "unit µS/cm; Comwintop probe — bulk soil electrical conductivity, depth channel 1"
                          },
                          "cw_ec_2": {
                            "type": "number",
                            "description": "unit µS/cm; Comwintop probe — bulk soil electrical conductivity, depth channel 2 (four-depth nodes)"
                          },
                          "cw_ec_3": {
                            "type": "number",
                            "description": "unit µS/cm; Comwintop probe — bulk soil electrical conductivity, depth channel 3 (four-depth nodes)"
                          },
                          "cw_ec_4": {
                            "type": "number",
                            "description": "unit µS/cm; Comwintop probe — bulk soil electrical conductivity, depth channel 4 (four-depth nodes)"
                          },
                          "battery_mv": {
                            "type": "number",
                            "description": "unit mV"
                          },
                          "battery_pct": {
                            "type": "number",
                            "description": "unit %"
                          },
                          "rssi": {
                            "type": "number",
                            "description": "unit dBm"
                          },
                          "snr": {
                            "type": "number",
                            "description": "unit dB"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/farm/weather/hourly": {
      "get": {
        "operationId": "farmWeatherHourly",
        "tags": [
          "farm"
        ],
        "summary": "Weather — hourly roll-up",
        "description": "Pre-aggregated hourly means, rolled up server-side. Cadence: hourly. Narrowed to your own gateways and to devices approved for API exposure. Scope: farm:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "gateway_id",
            "in": "query",
            "required": false,
            "description": "Filter on gateway_id. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "farm.weather.hourly"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "gateway_id": {
                            "type": "string",
                            "description": "the row's gateway_id"
                          },
                          "temperature": {
                            "type": "number",
                            "description": "unit °C"
                          },
                          "humidity": {
                            "type": "number",
                            "description": "unit %"
                          },
                          "pressure": {
                            "type": "number",
                            "description": "unit hPa"
                          },
                          "rainfall": {
                            "type": "number",
                            "description": "unit mm"
                          },
                          "wind_speed": {
                            "type": "number",
                            "description": "unit m/s"
                          },
                          "wind_gusts": {
                            "type": "number",
                            "description": "unit m/s"
                          },
                          "light": {
                            "type": "number",
                            "description": "unit lux"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/farm/soil/hourly": {
      "get": {
        "operationId": "farmSoilHourly",
        "tags": [
          "farm"
        ],
        "summary": "Soil — hourly roll-up",
        "description": "Pre-aggregated hourly means, rolled up server-side. Cadence: hourly. Narrowed to your own gateways and to devices approved for API exposure. Scope: farm:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "gateway_id",
            "in": "query",
            "required": false,
            "description": "Filter on gateway_id. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dev_eui",
            "in": "query",
            "required": false,
            "description": "Filter on dev_eui. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "farm.soil.hourly"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "gateway_id": {
                            "type": "string",
                            "description": "the row's gateway_id"
                          },
                          "dev_eui": {
                            "type": "string",
                            "description": "the row's dev_eui"
                          },
                          "soil_moisture_1": {
                            "type": "number",
                            "description": "unit %"
                          },
                          "soil_moisture_2": {
                            "type": "number",
                            "description": "unit %"
                          },
                          "temperature_1": {
                            "type": "number",
                            "description": "unit °C"
                          },
                          "temperature_2": {
                            "type": "number",
                            "description": "unit °C"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/farm/weather/daily": {
      "get": {
        "operationId": "farmWeatherDaily",
        "tags": [
          "farm"
        ],
        "summary": "Weather — daily roll-up",
        "description": "Pre-aggregated daily means, rolled up server-side. Cadence: daily. Narrowed to your own gateways and to devices approved for API exposure. Scope: farm:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "gateway_id",
            "in": "query",
            "required": false,
            "description": "Filter on gateway_id. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "farm.weather.daily"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "gateway_id": {
                            "type": "string",
                            "description": "the row's gateway_id"
                          },
                          "temperature": {
                            "type": "number",
                            "description": "unit °C"
                          },
                          "humidity": {
                            "type": "number",
                            "description": "unit %"
                          },
                          "pressure": {
                            "type": "number",
                            "description": "unit hPa"
                          },
                          "light": {
                            "type": "number",
                            "description": "unit lux"
                          },
                          "battery_voltage": {
                            "type": "number",
                            "description": "unit V"
                          },
                          "battery_percent": {
                            "type": "number",
                            "description": "unit %"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/farm/soil/daily": {
      "get": {
        "operationId": "farmSoilDaily",
        "tags": [
          "farm"
        ],
        "summary": "Soil — daily roll-up",
        "description": "Pre-aggregated daily means, rolled up server-side. Cadence: daily. Narrowed to your own gateways and to devices approved for API exposure. Scope: farm:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "gateway_id",
            "in": "query",
            "required": false,
            "description": "Filter on gateway_id. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dev_eui",
            "in": "query",
            "required": false,
            "description": "Filter on dev_eui. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node_id",
            "in": "query",
            "required": false,
            "description": "Filter on node_id. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "application",
            "in": "query",
            "required": false,
            "description": "Filter on application. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "farm.soil.daily"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "gateway_id": {
                            "type": "string",
                            "description": "the row's gateway_id"
                          },
                          "dev_eui": {
                            "type": "string",
                            "description": "the row's dev_eui"
                          },
                          "node_id": {
                            "type": "string",
                            "description": "the row's node_id"
                          },
                          "application": {
                            "type": "string",
                            "description": "the row's application"
                          },
                          "moisture_raw": {
                            "type": "number",
                            "description": "unit %"
                          },
                          "temperature": {
                            "type": "number",
                            "description": "unit °C"
                          },
                          "battery": {
                            "type": "number",
                            "description": "unit mV"
                          },
                          "rssi": {
                            "type": "number",
                            "description": "unit dBm"
                          },
                          "snr": {
                            "type": "number",
                            "description": "unit dB"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/farm/disease-risk": {
      "get": {
        "operationId": "farmDiseaseRisk",
        "tags": [
          "farm"
        ],
        "summary": "Disease + pest risk (v2)",
        "description": "Risk Models v2 output per gateway and threat: risk percent, level, accumulated DSV, conducive hours and the data completeness behind the score. A gateway can carry several crops; research-pilot threats are keyed <crop>_<threat> (tomato_tuta, kale_dbm, …) and carry an evidence grade in metadata_json. alertable=false marks a watch-only score. Cadence: hourly. Narrowed to your own gateways and to devices approved for API exposure. Scope: farm:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "gateway_id",
            "in": "query",
            "required": false,
            "description": "Filter on gateway_id. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "description": "Filter on kind. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "threat",
            "in": "query",
            "required": false,
            "description": "Filter on threat. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "farm.disease_risk"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "gateway_id": {
                            "type": "string",
                            "description": "the row's gateway_id"
                          },
                          "kind": {
                            "type": "string",
                            "description": "the row's kind"
                          },
                          "threat": {
                            "type": "string",
                            "description": "the row's threat"
                          },
                          "risk_percent": {
                            "type": "number",
                            "description": "unit %"
                          },
                          "risk_level": {
                            "description": "low/moderate/high"
                          },
                          "threat_score": {},
                          "dsv_accumulated": {
                            "description": "disease severity values"
                          },
                          "conducive_hours": {
                            "type": "number",
                            "description": "unit h"
                          },
                          "data_completeness_pct": {
                            "type": "number",
                            "description": "unit %; how much input data backed this score"
                          },
                          "prioritized": {
                            "type": "number",
                            "description": "unit 0/1"
                          },
                          "alertable": {
                            "type": "number",
                            "description": "unit 0/1; false = watch only: computed and shown, never sent as an alert (pilot crop not switched on, evidence grade C / B-watch, greenhouse plot, insect clock without a field record)"
                          },
                          "metadata_json": {
                            "description": "model detail (crop, evidence grade, source, gates)"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/farm/spirulina": {
      "get": {
        "operationId": "farmSpirulinaRaw",
        "tags": [
          "farm"
        ],
        "summary": "Spirulina pond readings",
        "description": "Pond telemetry for the spirulina vertical (Nasaru Naturals). Only visible to a key whose farm_access carries the pond gateway. Cadence: ~10 min. Narrowed to your own gateways and to devices approved for API exposure. Scope: farm:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "gateway_id",
            "in": "query",
            "required": false,
            "description": "Filter on gateway_id. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node_id",
            "in": "query",
            "required": false,
            "description": "Filter on node_id. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "farm.spirulina.raw"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "gateway_id": {
                            "type": "string",
                            "description": "the row's gateway_id"
                          },
                          "node_id": {
                            "type": "string",
                            "description": "the row's node_id"
                          },
                          "water_temp": {
                            "type": "number",
                            "description": "unit °C"
                          },
                          "par": {
                            "type": "number",
                            "description": "unit µmol/m²/s; photosynthetically active radiation"
                          },
                          "turbidity": {
                            "type": "number",
                            "description": "unit NTU"
                          },
                          "turbidity_v": {
                            "type": "number",
                            "description": "unit V; raw sensor voltage"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/farm/derived": {
      "get": {
        "operationId": "farmDerivedHourly",
        "tags": [
          "farm"
        ],
        "summary": "Derived weather variables",
        "description": "Hourly physics-derived variables computed from the station's own readings (Risk Models v2). Every field carries a calibration tier — measured, physics, validated, literature or proxy. Cadence: hourly. Narrowed to your own gateways and to devices approved for API exposure. Scope: farm:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "gateway_id",
            "in": "query",
            "required": false,
            "description": "Filter on gateway_id. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "farm.derived.hourly"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "gateway_id": {
                            "type": "string",
                            "description": "the row's gateway_id"
                          },
                          "temperature": {
                            "type": "number",
                            "description": "unit °C"
                          },
                          "humidity": {
                            "type": "number",
                            "description": "unit %"
                          },
                          "pressure": {
                            "type": "number",
                            "description": "unit hPa"
                          },
                          "rainfall": {
                            "type": "number",
                            "description": "unit mm"
                          },
                          "solar_radiation": {
                            "type": "number",
                            "description": "unit W/m²"
                          },
                          "wind_speed": {
                            "type": "number",
                            "description": "unit m/s"
                          },
                          "dew_point": {
                            "type": "number",
                            "description": "unit °C"
                          },
                          "dew_point_depression": {
                            "type": "number",
                            "description": "unit °C"
                          },
                          "vpd": {
                            "type": "number",
                            "description": "unit kPa"
                          },
                          "pressure_trend_6h": {
                            "type": "number",
                            "description": "unit hPa/6h"
                          },
                          "et0_hour": {
                            "type": "number",
                            "description": "unit mm/h; FAO-56 hourly"
                          },
                          "delta_t": {
                            "type": "number",
                            "description": "unit °C; dry- minus wet-bulb"
                          },
                          "spray_quality_index": {
                            "type": "number",
                            "description": "unit 0-100"
                          },
                          "spray_quality_label": {
                            "description": "ideal…unsuitable"
                          },
                          "spray_limiting_factor": {
                            "description": "wind/delta_t/inversion/rain"
                          },
                          "inversion_risk": {
                            "description": "low/moderate/high"
                          },
                          "lwd_hour": {
                            "type": "number",
                            "description": "unit 0/1"
                          },
                          "lwd_reason": {},
                          "lwd_consecutive_hours": {
                            "type": "number",
                            "description": "unit h"
                          },
                          "dd_potato_hour": {
                            "type": "number",
                            "description": "unit °C·h; degree-day contribution for potato"
                          },
                          "dd_aphid_hour": {
                            "type": "number",
                            "description": "unit °C·h; degree-day contribution for aphid"
                          },
                          "dd_whitefly_hour": {
                            "type": "number",
                            "description": "unit °C·h; degree-day contribution for whitefly"
                          },
                          "dd_ptm_hour": {
                            "type": "number",
                            "description": "unit °C·h; degree-day contribution for ptm"
                          },
                          "dd_faw_hour": {
                            "type": "number",
                            "description": "unit °C·h; degree-day contribution for faw"
                          },
                          "dd_armyworm_hour": {
                            "type": "number",
                            "description": "unit °C·h; degree-day contribution for armyworm"
                          },
                          "dd_dbm_hour": {
                            "type": "number",
                            "description": "unit °C·h; degree-day contribution for dbm"
                          },
                          "dd_tuta_hour": {
                            "type": "number",
                            "description": "unit °C·h; degree-day contribution for tuta"
                          },
                          "dd_thrips_hour": {
                            "type": "number",
                            "description": "unit °C·h; degree-day contribution for thrips"
                          },
                          "dd_cbb_hour": {
                            "type": "number",
                            "description": "unit °C·h; degree-day contribution for cbb"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/farm/forecast": {
      "get": {
        "operationId": "farmForecastHourly",
        "tags": [
          "farm"
        ],
        "summary": "Weather forecast",
        "description": "Seven-day hourly forecast for the station's location, refreshed every six hours; the newest run wins and issued_at records when it was fetched. Cadence: 6 h. Narrowed to your own gateways and to devices approved for API exposure. Scope: farm:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "gateway_id",
            "in": "query",
            "required": false,
            "description": "Filter on gateway_id. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Filter on source. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "farm.forecast.hourly"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "gateway_id": {
                            "type": "string",
                            "description": "the row's gateway_id"
                          },
                          "source": {
                            "type": "string",
                            "description": "the row's source"
                          },
                          "temperature": {
                            "type": "number",
                            "description": "unit °C"
                          },
                          "humidity": {
                            "type": "number",
                            "description": "unit %"
                          },
                          "dew_point": {
                            "type": "number",
                            "description": "unit °C"
                          },
                          "precipitation_mm": {
                            "type": "number",
                            "description": "unit mm"
                          },
                          "precipitation_probability": {
                            "type": "number",
                            "description": "unit %"
                          },
                          "cloud_cover": {
                            "type": "number",
                            "description": "unit %"
                          },
                          "wind_speed": {
                            "type": "number",
                            "description": "unit m/s"
                          },
                          "wind_gusts": {
                            "type": "number",
                            "description": "unit m/s"
                          },
                          "wind_direction": {
                            "type": "number",
                            "description": "unit °"
                          },
                          "shortwave_radiation": {
                            "type": "number",
                            "description": "unit W/m²; historical only — not provided by the current source"
                          },
                          "et0_mm": {
                            "type": "number",
                            "description": "unit mm; historical only — not provided by the current source"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/farm/water-balance": {
      "get": {
        "operationId": "farmWaterBalance",
        "tags": [
          "farm"
        ],
        "summary": "Root-zone water balance",
        "description": "One point per station per daily cycle, combining the soil's available water capacity, derived evapotranspiration and forecast rain. Cadence: daily. Narrowed to your own gateways and to devices approved for API exposure. Scope: farm:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "gateway_id",
            "in": "query",
            "required": false,
            "description": "Filter on gateway_id. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "farm.water_balance"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "gateway_id": {
                            "type": "string",
                            "description": "the row's gateway_id"
                          },
                          "depletion_mm": {
                            "type": "number",
                            "description": "unit mm; root-zone depletion"
                          },
                          "taw_mm": {
                            "type": "number",
                            "description": "unit mm; total available water"
                          },
                          "raw_mm": {
                            "type": "number",
                            "description": "unit mm; readily available water"
                          },
                          "et0_mm": {
                            "type": "number",
                            "description": "unit mm"
                          },
                          "rain_mm": {
                            "type": "number",
                            "description": "unit mm"
                          },
                          "deficit_ratio": {
                            "type": "number",
                            "description": "unit 0-1"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/farm/field-indices": {
      "get": {
        "operationId": "farmFieldIndices",
        "tags": [
          "farm"
        ],
        "summary": "Satellite vegetation + SAR indices",
        "description": "Optical and radar vegetation indices, averaged inside the field polygon. Weekly, using a 15-day temporal median to survive cloud. Cadence: weekly. Narrowed to your own gateways and to devices approved for API exposure. Scope: farm:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "gateway_id",
            "in": "query",
            "required": false,
            "description": "Filter on gateway_id. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "field_id",
            "in": "query",
            "required": false,
            "description": "Filter on field_id. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "aoi_name",
            "in": "query",
            "required": false,
            "description": "Filter on aoi_name. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Filter on source. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "farm.field_indices"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "gateway_id": {
                            "type": "string",
                            "description": "the row's gateway_id"
                          },
                          "field_id": {
                            "type": "string",
                            "description": "the row's field_id"
                          },
                          "aoi_name": {
                            "type": "string",
                            "description": "the row's aoi_name"
                          },
                          "source": {
                            "type": "string",
                            "description": "the row's source"
                          },
                          "ndvi": {
                            "description": "optical"
                          },
                          "evi": {
                            "description": "optical"
                          },
                          "savi": {
                            "description": "optical"
                          },
                          "ndwi": {
                            "description": "optical"
                          },
                          "ndre": {
                            "description": "optical"
                          },
                          "gndvi": {
                            "description": "optical"
                          },
                          "sar_vv_db": {
                            "type": "number",
                            "description": "unit dB; radar backscatter"
                          },
                          "sar_vh_db": {
                            "type": "number",
                            "description": "unit dB; radar backscatter"
                          },
                          "sar_rvi": {
                            "description": "radar vegetation index"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/farm/climate": {
      "get": {
        "operationId": "farmClimateArchive",
        "tags": [
          "farm"
        ],
        "summary": "Long-horizon climate archive",
        "description": "Daily climate reanalysis from 1990 and daily rainfall from 1981, backfilled for each station's location. Cadence: daily top-up; reanalysis ends ~7 days before today. Narrowed to your own gateways and to devices approved for API exposure. Scope: farm:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "gateway_id",
            "in": "query",
            "required": false,
            "description": "Filter on gateway_id. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Filter on source. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "farm.climate.archive"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "gateway_id": {
                            "type": "string",
                            "description": "the row's gateway_id"
                          },
                          "source": {
                            "type": "string",
                            "description": "the row's source"
                          },
                          "temp_max": {
                            "type": "number",
                            "description": "unit °C"
                          },
                          "temp_min": {
                            "type": "number",
                            "description": "unit °C"
                          },
                          "temp_mean": {
                            "type": "number",
                            "description": "unit °C"
                          },
                          "precip": {
                            "type": "number",
                            "description": "unit mm"
                          },
                          "wind_max": {
                            "type": "number",
                            "description": "unit m/s"
                          },
                          "radiation": {
                            "type": "number",
                            "description": "unit MJ/m²/day"
                          },
                          "et0": {
                            "type": "number",
                            "description": "unit mm/day"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/farm/soil-baseline": {
      "get": {
        "operationId": "farmSoilBaseline",
        "tags": [
          "farm"
        ],
        "summary": "Soil baseline",
        "description": "Soil profile for a station's location, read once when it first reports its position: texture and the USDA class derived from it, depth to bedrock, stone content, bulk density, elevation and slope. Modelled at 30 m from continental soil mapping. Deliberately excludes pH, organic carbon and N/P/K — those move with liming, tillage and fertiliser, so a modelled value cannot support the decision it would be used for. Current fertility comes only from a soil test. Cadence: once per location. Narrowed to your own gateways and to devices approved for API exposure. Scope: farm:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "farm.soil_baseline"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "gateway_id": {},
                          "lat": {
                            "type": "number",
                            "description": "unit °"
                          },
                          "lon": {
                            "type": "number",
                            "description": "unit °"
                          },
                          "alt": {
                            "type": "number",
                            "description": "unit m"
                          },
                          "properties": {
                            "description": "physical soil layers per depth: texture, bedrock, stones, density, terrain"
                          },
                          "water_properties": {
                            "description": "water-retention profile per depth, Vol-%"
                          },
                          "fetched_at": {},
                          "water_fetched_at": {}
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/farm/fields": {
      "get": {
        "operationId": "farmFields",
        "tags": [
          "farm"
        ],
        "summary": "Field polygons",
        "description": "User-drawn field boundaries (GeoJSON) consumed by the satellite pipeline. Cadence: on edit. Narrowed to your own gateways and to devices approved for API exposure. Scope: farm:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "farm.fields"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "id": {},
                          "gateway_id": {},
                          "field_name": {},
                          "crop_label": {},
                          "geometry": {
                            "description": "GeoJSON jsonb"
                          },
                          "area_ha": {
                            "type": "number",
                            "description": "unit ha"
                          },
                          "created_at": {},
                          "updated_at": {}
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/farm/sensor-settings": {
      "get": {
        "operationId": "farmSensorSettings",
        "tags": [
          "farm"
        ],
        "summary": "Sensor settings",
        "description": "Per-sensor display name, crop assignment and GDD accumulator. Cadence: on edit. Narrowed to your own gateways and to devices approved for API exposure. Scope: farm:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "farm.sensor_settings"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "gateway_id": {},
                          "dev_eui": {},
                          "node_id": {},
                          "name": {},
                          "crop_label": {},
                          "crop_type_id": {},
                          "planting_date": {},
                          "emergence_date": {},
                          "tuber_initiation_date": {},
                          "row_closure_date": {},
                          "haulm_kill_date": {},
                          "last_spray_date": {},
                          "gdd_base7_to_date": {
                            "type": "number",
                            "description": "unit °C·d"
                          },
                          "gdd_last_accumulated_at": {},
                          "location_lat": {
                            "type": "number",
                            "description": "unit °"
                          },
                          "location_lon": {
                            "type": "number",
                            "description": "unit °"
                          },
                          "updated_at": {}
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/farm/alerts": {
      "get": {
        "operationId": "farmAlertEvents",
        "tags": [
          "farm"
        ],
        "summary": "Alert history",
        "description": "Append-only audit of every threshold evaluation that produced a notification: value, direction, channel, delivery status. Cadence: 10 min engine cycle. Narrowed to your own gateways and to devices approved for API exposure. Scope: farm:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "farm.alert_events"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "id": {},
                          "gateway_id": {},
                          "dev_eui": {},
                          "metric": {},
                          "value": {},
                          "direction": {},
                          "triggered_at": {},
                          "aez_zone_id": {},
                          "crop_type_id": {},
                          "threshold_rule_id": {},
                          "notification_type": {},
                          "channel": {},
                          "status": {},
                          "message_text": {},
                          "created_at": {}
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/farm/advisories": {
      "get": {
        "operationId": "farmAdvisoryAlerts",
        "tags": [
          "farm"
        ],
        "summary": "Advisory history",
        "description": "Irrigation / spray-window / frost / NDVI-anomaly advisories, including dry-run rows with suppressed_reason set. Cadence: daily. Narrowed to your own gateways and to devices approved for API exposure. Scope: farm:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "farm.advisory_alerts"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "id": {},
                          "gateway_id": {},
                          "advisory_type": {},
                          "severity": {},
                          "valid_from": {},
                          "valid_until": {},
                          "message_text": {},
                          "payload": {
                            "description": "model detail jsonb"
                          },
                          "notification_sent": {},
                          "notification_sent_at": {},
                          "channel": {},
                          "suppressed_reason": {
                            "description": "set when the advisory was generated but not sent"
                          },
                          "created_at": {}
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/market/input-prices": {
      "get": {
        "operationId": "marketInputPrices",
        "tags": [
          "market"
        ],
        "summary": "Crop-protection + input retail prices",
        "description": "Retail shelf prices and stock availability for crop-protection products, seeds and foliar feeds, read daily from East African agro-dealer catalogues — Kenya and Uganda today. Priced per pack and, where the pack is a bulk substance, per litre or kilo. Every price is in the currency of the row's country (KES, UGX), which the `country` tag names. Availability is the point as much as price: a product that vanishes from every dealer in a week is a supply signal the price series never shows. Cadence: daily. Global reference data — the same rows for every caller. Scope: market:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Filter on source. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Filter on country. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "description": "Filter on category. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product",
            "in": "query",
            "required": false,
            "description": "Filter on product. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "formulation",
            "in": "query",
            "required": false,
            "description": "Filter on formulation. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pack_unit",
            "in": "query",
            "required": false,
            "description": "Filter on pack_unit. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "brand",
            "in": "query",
            "required": false,
            "description": "Filter on brand. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "market.input_prices"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "source": {
                            "type": "string",
                            "description": "the row's source"
                          },
                          "country": {
                            "type": "string",
                            "description": "the row's country"
                          },
                          "category": {
                            "type": "string",
                            "description": "the row's category"
                          },
                          "product": {
                            "type": "string",
                            "description": "the row's product"
                          },
                          "formulation": {
                            "type": "string",
                            "description": "the row's formulation"
                          },
                          "pack_unit": {
                            "type": "string",
                            "description": "the row's pack_unit"
                          },
                          "brand": {
                            "type": "string",
                            "description": "the row's brand"
                          },
                          "price": {
                            "type": "number",
                            "description": "unit local currency; robust median across a dealer's offers for this product, in the currency of the row's country — read this one"
                          },
                          "price_kes": {
                            "type": "number",
                            "description": "unit KES; the older name for the same median, written ONLY where the row really is in KES. Kenyan rows have it; Ugandan rows do not. Kept because consumers already read it"
                          },
                          "price_min": {
                            "type": "number",
                            "description": "unit local currency"
                          },
                          "price_max": {
                            "type": "number",
                            "description": "unit local currency"
                          },
                          "price_per_unit": {
                            "type": "number",
                            "description": "unit per kg or per l, in the row's currency; only where the pack is a bulk substance — never for seed, where it is arithmetically valid and meaningless"
                          },
                          "pack_size": {
                            "type": "number",
                            "description": "unit kg or l"
                          },
                          "concentration_pct": {
                            "description": "active-ingredient loading read off the formulation code"
                          },
                          "n_offers": {
                            "description": "listings behind the median"
                          },
                          "discount_pct": {
                            "type": "number",
                            "description": "unit %; comparable WITHIN a dealer only — some discount permanently"
                          },
                          "in_stock_rate": {
                            "description": "share of this product's listings currently purchasable, 0-1"
                          },
                          "on_backorder_rate": {
                            "description": "0-1"
                          },
                          "units_left": {
                            "description": "rare — well under 1% of listings publish a unit count"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/market/prices": {
      "get": {
        "operationId": "marketCommodityPrices",
        "tags": [
          "market"
        ],
        "summary": "Commodity + fertilizer prices",
        "description": "Official recorded prices, online marketplace asking prices, a monthly humanitarian series, and coffee and tea auction results — merged into one vocabulary and told apart by the source tag. Kenya, Tanzania, Uganda and Rwanda. PRICES ARE IN THE CURRENCY OF THE ROW'S COUNTRY, never converted: filter on `country` (Kenyan rows predate the tag and carry none) and read `currency`. Cadence: daily / weekly / monthly by source. Global reference data — the same rows for every caller. Scope: market:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Filter on source. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commodity",
            "in": "query",
            "required": false,
            "description": "Filter on commodity. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "variety",
            "in": "query",
            "required": false,
            "description": "Filter on variety. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "market",
            "in": "query",
            "required": false,
            "description": "Filter on market. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "county",
            "in": "query",
            "required": false,
            "description": "Filter on county. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Filter on country. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "description": "Filter on currency. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "factory",
            "in": "query",
            "required": false,
            "description": "Filter on factory. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unit",
            "in": "query",
            "required": false,
            "description": "Filter on unit. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "price_type",
            "in": "query",
            "required": false,
            "description": "Filter on price_type. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "market.commodity_prices"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "source": {
                            "type": "string",
                            "description": "the row's source"
                          },
                          "commodity": {
                            "type": "string",
                            "description": "the row's commodity"
                          },
                          "variety": {
                            "type": "string",
                            "description": "the row's variety"
                          },
                          "market": {
                            "type": "string",
                            "description": "the row's market"
                          },
                          "county": {
                            "type": "string",
                            "description": "the row's county"
                          },
                          "country": {
                            "type": "string",
                            "description": "the row's country"
                          },
                          "currency": {
                            "type": "string",
                            "description": "the row's currency"
                          },
                          "factory": {
                            "type": "string",
                            "description": "the row's factory"
                          },
                          "unit": {
                            "type": "string",
                            "description": "the row's unit"
                          },
                          "price_type": {
                            "type": "string",
                            "description": "the row's price_type"
                          },
                          "wholesale": {
                            "type": "number",
                            "description": "unit currency of the row's country, per unit; recorded market prices"
                          },
                          "retail": {
                            "type": "number",
                            "description": "unit currency of the row's country, per unit; recorded market prices"
                          },
                          "wholesale_min": {
                            "type": "number",
                            "description": "unit currency of the row's country, per unit; Tanzania's official bulletins quote a min-max band per market rather than one number; `wholesale` is the midpoint and these two are the band as published"
                          },
                          "wholesale_max": {
                            "type": "number",
                            "description": "unit currency of the row's country, per unit"
                          },
                          "supply_volume": {
                            "description": "official series only"
                          },
                          "min_price_usd": {
                            "type": "number",
                            "description": "unit USD/kg; coffee auction"
                          },
                          "avg_price_usd": {
                            "type": "number",
                            "description": "unit USD/kg; coffee and tea auctions"
                          },
                          "max_price_usd": {
                            "type": "number",
                            "description": "unit USD/kg; coffee auction"
                          },
                          "min_price_kes": {
                            "type": "number",
                            "description": "unit KES/kg; coffee auction"
                          },
                          "avg_price_kes": {
                            "type": "number",
                            "description": "unit KES/kg; coffee and tea auctions"
                          },
                          "max_price_kes": {
                            "type": "number",
                            "description": "unit KES/kg; coffee auction"
                          },
                          "value_usd": {
                            "type": "number",
                            "description": "unit USD"
                          },
                          "value_kes": {
                            "type": "number",
                            "description": "unit KES"
                          },
                          "usd_kes_rate": {
                            "description": "FX as of the sale date — makes KES auditable"
                          },
                          "bags_offered": {
                            "description": "coffee auction"
                          },
                          "weight_offered_kg": {
                            "type": "number",
                            "description": "unit kg; coffee auction"
                          },
                          "kg_sold": {
                            "type": "number",
                            "description": "unit kg; tea"
                          },
                          "kg_offered": {
                            "type": "number",
                            "description": "unit kg; tea auction"
                          },
                          "pct_unsold": {
                            "type": "number",
                            "description": "unit %; tea auction"
                          },
                          "sale_no": {}
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/market/news": {
      "get": {
        "operationId": "marketSignals",
        "tags": [
          "market"
        ],
        "summary": "Agriculture news signals",
        "description": "Typed, source-traceable signals extracted daily from East African agriculture news, keyed to the same county + commodity vocabulary as the price data. Every signal carries a source URL and a verbatim quote. Cadence: daily 10:00 UTC. Global reference data — the same rows for every caller. Scope: market:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Filter on source. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commodity",
            "in": "query",
            "required": false,
            "description": "Filter on commodity. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "variety",
            "in": "query",
            "required": false,
            "description": "Filter on variety. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "county",
            "in": "query",
            "required": false,
            "description": "Filter on county. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Filter on country. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "signal_type",
            "in": "query",
            "required": false,
            "description": "Filter on signal_type. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "description": "Filter on direction. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trust",
            "in": "query",
            "required": false,
            "description": "Filter on trust. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "horizon",
            "in": "query",
            "required": false,
            "description": "Filter on horizon. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "market.signals"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "source": {
                            "type": "string",
                            "description": "the row's source"
                          },
                          "commodity": {
                            "type": "string",
                            "description": "the row's commodity"
                          },
                          "variety": {
                            "type": "string",
                            "description": "the row's variety"
                          },
                          "county": {
                            "type": "string",
                            "description": "the row's county"
                          },
                          "country": {
                            "type": "string",
                            "description": "the row's country"
                          },
                          "signal_type": {
                            "type": "string",
                            "description": "the row's signal_type"
                          },
                          "direction": {
                            "type": "string",
                            "description": "the row's direction"
                          },
                          "trust": {
                            "type": "string",
                            "description": "the row's trust"
                          },
                          "horizon": {
                            "type": "string",
                            "description": "the row's horizon"
                          },
                          "confidence": {
                            "type": "number",
                            "description": "unit 0-1"
                          },
                          "cluster_size": {
                            "description": "articles merged into this signal"
                          },
                          "value_kes": {
                            "type": "number",
                            "description": "unit KES"
                          },
                          "db_reference_value": {},
                          "reason": {},
                          "supporting_quote": {
                            "description": "verbatim"
                          },
                          "source_url": {},
                          "source_domain": {},
                          "source_name": {},
                          "article_title": {},
                          "db_alignment": {},
                          "model": {},
                          "extractor_version": {},
                          "unit": {},
                          "magnitude": {}
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/market/benchmarks": {
      "get": {
        "operationId": "marketWorldbank",
        "tags": [
          "market"
        ],
        "summary": "Global commodity benchmarks",
        "description": "Monthly world commodity benchmark prices in nominal US dollars, back to 1960. Global by nature, deliberately kept out of the county-level series. Cadence: monthly. Global reference data — the same rows for every caller. Scope: market:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Filter on source. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "description": "Filter on scope. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commodity",
            "in": "query",
            "required": false,
            "description": "Filter on commodity. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unit",
            "in": "query",
            "required": false,
            "description": "Filter on unit. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "description": "Filter on kind. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "market.worldbank"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "source": {
                            "type": "string",
                            "description": "the row's source"
                          },
                          "scope": {
                            "type": "string",
                            "description": "the row's scope"
                          },
                          "commodity": {
                            "type": "string",
                            "description": "the row's commodity"
                          },
                          "unit": {
                            "type": "string",
                            "description": "the row's unit"
                          },
                          "kind": {
                            "type": "string",
                            "description": "the row's kind"
                          },
                          "price": {
                            "type": "number",
                            "description": "unit USD/mt or index"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/market/demand-indices": {
      "get": {
        "operationId": "marketDemandIndices",
        "tags": [
          "market"
        ],
        "summary": "Satellite demand indices",
        "description": "Cropland vegetation indices per administrative unit against that unit's own seasonal normal — the input to the fertilizer demand signal. Kenya plus TZ/UG/RW. Cadence: 10-daily / weekly. Global reference data — the same rows for every caller. Scope: market:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Filter on country. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "county",
            "in": "query",
            "required": false,
            "description": "Filter on county. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "index",
            "in": "query",
            "required": false,
            "description": "Filter on index. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "level",
            "in": "query",
            "required": false,
            "description": "Filter on level. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Filter on source. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "market.demand_indices"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "country": {
                            "type": "string",
                            "description": "the row's country"
                          },
                          "county": {
                            "type": "string",
                            "description": "the row's county"
                          },
                          "index": {
                            "type": "string",
                            "description": "the row's index"
                          },
                          "level": {
                            "type": "string",
                            "description": "the row's level"
                          },
                          "source": {
                            "type": "string",
                            "description": "the row's source"
                          },
                          "value": {
                            "description": "index value; see the index tag for which"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/market/cropland-extent": {
      "get": {
        "operationId": "marketCroplandExtent",
        "tags": [
          "market"
        ],
        "summary": "County cropland extent",
        "description": "How much of each county is cropped, in percent and in square kilometres, plus the full land-cover breakdown behind it. `class` selects the reading: `cropland_anchored` is the one to use — the satellite distribution scaled so the national total matches the official arable area — while `cropland_low` and `cropland_high` are the two source layers unadjusted and bracket it. The remaining classes (tree, shrub, grass, built, bare, water, wetland) are the land-cover census. A county figure is an estimate with a published method, not a land survey: the scaling assumes the satellite layer's bias is even across counties, and it is strongest in the humid west. Quote the bracket where the decision is close. Cadence: annual. Global reference data — the same rows for every caller. Scope: market:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Filter on country. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "county",
            "in": "query",
            "required": false,
            "description": "Filter on county. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "class",
            "in": "query",
            "required": false,
            "description": "Filter on class. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "level",
            "in": "query",
            "required": false,
            "description": "Filter on level. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Filter on source. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "market.cropland_extent"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "country": {
                            "type": "string",
                            "description": "the row's country"
                          },
                          "county": {
                            "type": "string",
                            "description": "the row's county"
                          },
                          "class": {
                            "type": "string",
                            "description": "the row's class"
                          },
                          "level": {
                            "type": "string",
                            "description": "the row's level"
                          },
                          "source": {
                            "type": "string",
                            "description": "the row's source"
                          },
                          "value": {
                            "type": "number",
                            "description": "unit fraction; share of the county in this class, 0-1"
                          },
                          "area_km2": {
                            "type": "number",
                            "description": "unit km2; area in this class; present on the census and anchored rows"
                          },
                          "n_px_100m": {
                            "description": "100 m pixels counted, on the land-cover census rows"
                          },
                          "share_raw": {
                            "type": "number",
                            "description": "unit fraction; the reading before any adjustment, where one was made"
                          },
                          "se": {
                            "type": "number",
                            "description": "unit fraction; standard error, on rows that carry one"
                          },
                          "n_points": {
                            "description": "sample points behind the row, where it is sample-based"
                          },
                          "reliable": {
                            "description": "false when the row's own error makes it not worth quoting"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/market/crop-mix": {
      "get": {
        "operationId": "marketCropMix",
        "tags": [
          "market"
        ],
        "summary": "County crop mix",
        "description": "Which annual crops are grown where, as each crop's share of a county's cropped land, with a standard error and a `reliable` flag per crop. Shares are corrected for the classifier's own confusion matrix rather than counted raw. PRELIMINARY: the current run carries wide error bars on a first sample and is published so it can be checked against what buyers see on the ground; it is rebuilt monthly and the errors narrow as the sample and the labels grow. Read `reliable` before quoting a crop, and prefer the ranking over the decimals. Perennials (tea, coffee, sugarcane, banana) are NOT in this layer — the cropland definition behind it excludes them, and they get their own product. Cadence: monthly. Global reference data — the same rows for every caller. Scope: market:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Filter on country. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "county",
            "in": "query",
            "required": false,
            "description": "Filter on county. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "crop",
            "in": "query",
            "required": false,
            "description": "Filter on crop. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "level",
            "in": "query",
            "required": false,
            "description": "Filter on level. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Filter on source. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "market.crop_mix"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "country": {
                            "type": "string",
                            "description": "the row's country"
                          },
                          "county": {
                            "type": "string",
                            "description": "the row's county"
                          },
                          "crop": {
                            "type": "string",
                            "description": "the row's crop"
                          },
                          "level": {
                            "type": "string",
                            "description": "the row's level"
                          },
                          "source": {
                            "type": "string",
                            "description": "the row's source"
                          },
                          "value": {
                            "type": "number",
                            "description": "unit fraction; corrected share of the county's cropped land under this crop, 0-1"
                          },
                          "share_raw": {
                            "type": "number",
                            "description": "unit fraction; uncorrected count of classified sample points"
                          },
                          "se": {
                            "type": "number",
                            "description": "unit fraction; standard error of the corrected share"
                          },
                          "n_points": {
                            "description": "sample points behind the estimate"
                          },
                          "reliable": {
                            "description": "false when the standard error exceeds half the share"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/market/realtime-prices": {
      "get": {
        "operationId": "marketRealtimePrices",
        "tags": [
          "market"
        ],
        "summary": "Real-time market prices",
        "description": "A faster-moving East African price feed at market granularity — a second reading alongside the official series. `price_est` is the publisher's gap-filled monthly estimate, complete for every market up to the publication month; `price` is the raw survey observation, which arrives one to two months later and is sparse. `_fao` commodity slugs are the FAO-harmonised series kept apart from the local definition. Cadence: monthly. Global reference data — the same rows for every caller. Scope: market:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Filter on source. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Filter on country. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "adm1",
            "in": "query",
            "required": false,
            "description": "Filter on adm1. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "market",
            "in": "query",
            "required": false,
            "description": "Filter on market. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commodity",
            "in": "query",
            "required": false,
            "description": "Filter on commodity. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "description": "Filter on currency. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "market.realtime_prices"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "source": {
                            "type": "string",
                            "description": "the row's source"
                          },
                          "country": {
                            "type": "string",
                            "description": "the row's country"
                          },
                          "adm1": {
                            "type": "string",
                            "description": "the row's adm1"
                          },
                          "market": {
                            "type": "string",
                            "description": "the row's market"
                          },
                          "commodity": {
                            "type": "string",
                            "description": "the row's commodity"
                          },
                          "currency": {
                            "type": "string",
                            "description": "the row's currency"
                          },
                          "price": {
                            "type": "number",
                            "description": "unit local currency; observed survey price; sparse, 1-2 months late"
                          },
                          "price_est": {
                            "type": "number",
                            "description": "unit local currency; Publisher's gap-filled monthly estimate; complete"
                          },
                          "trust": {
                            "description": "confidence score of the estimate, 0-1"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/market/food-security": {
      "get": {
        "operationId": "marketFoodSecurity",
        "tags": [
          "market"
        ],
        "summary": "Food-security phase classification",
        "description": "Standardised acute food-insecurity classification by administrative area — phases 1 to 5, as absolute numbers and percentages. Covers all of sub-Saharan Africa; `country` uses ISO3 codes (ken, tza, uga, rwa). Cadence: per analysis round. Global reference data — the same rows for every caller. Needs one of these filters: country, admin area; without one the call answers 400. Scope: market:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Filter on source. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Filter on country. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "adm1",
            "in": "query",
            "required": false,
            "description": "Filter on adm1. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "area",
            "in": "query",
            "required": false,
            "description": "Filter on area. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "level",
            "in": "query",
            "required": false,
            "description": "Filter on level. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phase",
            "in": "query",
            "required": false,
            "description": "Filter on phase. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "validity",
            "in": "query",
            "required": false,
            "description": "Filter on validity. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "market.food_security"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "source": {
                            "type": "string",
                            "description": "the row's source"
                          },
                          "country": {
                            "type": "string",
                            "description": "the row's country"
                          },
                          "adm1": {
                            "type": "string",
                            "description": "the row's adm1"
                          },
                          "area": {
                            "type": "string",
                            "description": "the row's area"
                          },
                          "level": {
                            "type": "string",
                            "description": "the row's level"
                          },
                          "phase": {
                            "type": "string",
                            "description": "the row's phase"
                          },
                          "validity": {
                            "type": "string",
                            "description": "the row's validity"
                          },
                          "total_population": {
                            "type": "number",
                            "description": "unit people"
                          },
                          "analysed_num": {
                            "type": "number",
                            "description": "unit people"
                          },
                          "number": {
                            "type": "number",
                            "description": "unit people"
                          },
                          "percentage": {
                            "type": "number",
                            "description": "unit %"
                          },
                          "p1_num": {
                            "type": "number",
                            "description": "unit people"
                          },
                          "p1_pct": {
                            "type": "number",
                            "description": "unit %"
                          },
                          "p2_num": {
                            "type": "number",
                            "description": "unit people"
                          },
                          "p2_pct": {
                            "type": "number",
                            "description": "unit %"
                          },
                          "p3_num": {
                            "type": "number",
                            "description": "unit people"
                          },
                          "p3_pct": {
                            "type": "number",
                            "description": "unit %"
                          },
                          "p4_num": {
                            "type": "number",
                            "description": "unit people"
                          },
                          "p4_pct": {
                            "type": "number",
                            "description": "unit %"
                          },
                          "p5_num": {
                            "type": "number",
                            "description": "unit people"
                          },
                          "p5_pct": {
                            "type": "number",
                            "description": "unit %"
                          },
                          "p3plus_num": {
                            "type": "number",
                            "description": "unit people; phase 3 and above — the crisis headline"
                          },
                          "p3plus_pct": {
                            "type": "number",
                            "description": "unit %"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/market/fews-outlook": {
      "get": {
        "operationId": "marketFewsOutlook",
        "tags": [
          "market"
        ],
        "summary": "Food-security outlook (FEWS NET)",
        "description": "FEWS NET's own IPC-compatible phase (1 minimal, 2 stressed, 3 crisis, 4 emergency, 5 famine) for each livelihood zone or admin area, with its projections: `scenario` cs = current situation, ml1 = the next four months, ml2 = the four after that. Each point is timed at the report month; `proj_start_ts`/`proj_end_ts` give the period the phase describes, so earlier projections stay readable next to what followed. `assistance` separates the classification with and without planned humanitarian aid. Kenya, Uganda, Burundi, Ethiopia, Somalia, South Sudan and Sudan; `country` is ISO alpha-2 (ke, ug); for Kenya `adm1` is the county. Cadence: monthly (outlooks Feb, Jun, Oct; key message updates between). Global reference data — the same rows for every caller. Needs one of these filters: country, admin area; without one the call answers 400. Scope: market:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Filter on source. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Filter on country. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scenario",
            "in": "query",
            "required": false,
            "description": "Filter on scenario. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assistance",
            "in": "query",
            "required": false,
            "description": "Filter on assistance. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fnid",
            "in": "query",
            "required": false,
            "description": "Filter on fnid. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unit_type",
            "in": "query",
            "required": false,
            "description": "Filter on unit_type. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "adm1",
            "in": "query",
            "required": false,
            "description": "Filter on adm1. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "area",
            "in": "query",
            "required": false,
            "description": "Filter on area. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scale",
            "in": "query",
            "required": false,
            "description": "Filter on scale. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "market.fews_outlook"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "source": {
                            "type": "string",
                            "description": "the row's source"
                          },
                          "country": {
                            "type": "string",
                            "description": "the row's country"
                          },
                          "scenario": {
                            "type": "string",
                            "description": "the row's scenario"
                          },
                          "assistance": {
                            "type": "string",
                            "description": "the row's assistance"
                          },
                          "fnid": {
                            "type": "string",
                            "description": "the row's fnid"
                          },
                          "unit_type": {
                            "type": "string",
                            "description": "the row's unit_type"
                          },
                          "adm1": {
                            "type": "string",
                            "description": "the row's adm1"
                          },
                          "area": {
                            "type": "string",
                            "description": "the row's area"
                          },
                          "scale": {
                            "type": "string",
                            "description": "the row's scale"
                          },
                          "phase": {
                            "type": "number",
                            "description": "unit IPC phase 1-5"
                          },
                          "proj_start_ts": {
                            "type": "number",
                            "description": "unit unix s; first day of the period the phase describes"
                          },
                          "proj_end_ts": {
                            "type": "number",
                            "description": "unit unix s; last day of that period"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/market/fews-population": {
      "get": {
        "operationId": "marketFewsPopulation",
        "tags": [
          "market"
        ],
        "summary": "People in need of food assistance (FEWS NET)",
        "description": "FEWS NET's estimate of how many people are in IPC Phase 3 or worse, as the low-high range it publishes (`low`/`high`; `value` is the low end). `scenario` cs = this month, ml = projected, the month given by `proj_start_ts`, usually six months ahead; pn = the peak need over the period `proj_start_ts`-`proj_end_ts`. Each point is timed at the report month. National for most countries; `document` names the report family. `country` is ISO alpha-2. Cadence: monthly. Global reference data — the same rows for every caller. Scope: market:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Filter on source. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Filter on country. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scenario",
            "in": "query",
            "required": false,
            "description": "Filter on scenario. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phase",
            "in": "query",
            "required": false,
            "description": "Filter on phase. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fnid",
            "in": "query",
            "required": false,
            "description": "Filter on fnid. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "adm1",
            "in": "query",
            "required": false,
            "description": "Filter on adm1. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "area",
            "in": "query",
            "required": false,
            "description": "Filter on area. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document",
            "in": "query",
            "required": false,
            "description": "Filter on document. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "market.fews_population"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "source": {
                            "type": "string",
                            "description": "the row's source"
                          },
                          "country": {
                            "type": "string",
                            "description": "the row's country"
                          },
                          "scenario": {
                            "type": "string",
                            "description": "the row's scenario"
                          },
                          "phase": {
                            "type": "string",
                            "description": "the row's phase"
                          },
                          "fnid": {
                            "type": "string",
                            "description": "the row's fnid"
                          },
                          "adm1": {
                            "type": "string",
                            "description": "the row's adm1"
                          },
                          "area": {
                            "type": "string",
                            "description": "the row's area"
                          },
                          "document": {
                            "type": "string",
                            "description": "the row's document"
                          },
                          "value": {
                            "type": "number",
                            "description": "unit people; the low end of the published range"
                          },
                          "low": {
                            "type": "number",
                            "description": "unit people"
                          },
                          "high": {
                            "type": "number",
                            "description": "unit people"
                          },
                          "p3_low": {
                            "type": "number",
                            "description": "unit people"
                          },
                          "p3_high": {
                            "type": "number",
                            "description": "unit people"
                          },
                          "p4_low": {
                            "type": "number",
                            "description": "unit people"
                          },
                          "p4_high": {
                            "type": "number",
                            "description": "unit people"
                          },
                          "p5_low": {
                            "type": "number",
                            "description": "unit people"
                          },
                          "p5_high": {
                            "type": "number",
                            "description": "unit people"
                          },
                          "pct_min": {
                            "type": "number",
                            "description": "unit %; share of the population, low end"
                          },
                          "pct_max": {
                            "type": "number",
                            "description": "unit %; share of the population, high end"
                          },
                          "proj_start_ts": {
                            "type": "number",
                            "description": "unit unix s; first day of the period the estimate describes"
                          },
                          "proj_end_ts": {
                            "type": "number",
                            "description": "unit unix s; last day of that period"
                          },
                          "peak_start_ts": {
                            "type": "number",
                            "description": "unit unix s; start of the peak-need months"
                          },
                          "peak_end_ts": {
                            "type": "number",
                            "description": "unit unix s; end of the peak-need months"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/market/fews-prices": {
      "get": {
        "operationId": "marketFewsPrices",
        "tags": [
          "market"
        ],
        "summary": "Market prices hosted by FEWS NET",
        "description": "Monthly market prices FEWS NET collects or republishes for East Africa — notably NDMA's pastoral-county markets (livestock, staples) in Kenya, Rwanda's ministry markets, Ethiopia, Somalia and South Sudan. `price` is in `currency` per `unit` as published; `price_cu` is the same price per common unit (kg, litre) and `usd_cu` that in US dollars at FEWS NET's rate for the month. `publisher` names who collected the price; `country` is ISO alpha-2 and for Kenya `adm1` is the county. Tanzania and Uganda carry no prices here. Cadence: monthly. Global reference data — the same rows for every caller. Needs one of these filters: country, market, commodity; without one the call answers 400. Scope: market:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Filter on source. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "publisher",
            "in": "query",
            "required": false,
            "description": "Filter on publisher. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Filter on country. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "adm1",
            "in": "query",
            "required": false,
            "description": "Filter on adm1. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "market",
            "in": "query",
            "required": false,
            "description": "Filter on market. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commodity",
            "in": "query",
            "required": false,
            "description": "Filter on commodity. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cpc",
            "in": "query",
            "required": false,
            "description": "Filter on cpc. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "price_type",
            "in": "query",
            "required": false,
            "description": "Filter on price_type. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product_source",
            "in": "query",
            "required": false,
            "description": "Filter on product_source. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unit",
            "in": "query",
            "required": false,
            "description": "Filter on unit. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "description": "Filter on currency. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "market.fews_prices"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "source": {
                            "type": "string",
                            "description": "the row's source"
                          },
                          "publisher": {
                            "type": "string",
                            "description": "the row's publisher"
                          },
                          "country": {
                            "type": "string",
                            "description": "the row's country"
                          },
                          "adm1": {
                            "type": "string",
                            "description": "the row's adm1"
                          },
                          "market": {
                            "type": "string",
                            "description": "the row's market"
                          },
                          "commodity": {
                            "type": "string",
                            "description": "the row's commodity"
                          },
                          "cpc": {
                            "type": "string",
                            "description": "the row's cpc"
                          },
                          "price_type": {
                            "type": "string",
                            "description": "the row's price_type"
                          },
                          "product_source": {
                            "type": "string",
                            "description": "the row's product_source"
                          },
                          "unit": {
                            "type": "string",
                            "description": "the row's unit"
                          },
                          "currency": {
                            "type": "string",
                            "description": "the row's currency"
                          },
                          "price": {
                            "type": "number",
                            "description": "unit local currency per unit"
                          },
                          "price_cu": {
                            "type": "number",
                            "description": "unit local currency per common unit; per kg or litre"
                          },
                          "usd_cu": {
                            "type": "number",
                            "description": "unit USD per common unit; at FEWS NET's exchange rate for the period"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/market/fews-trade": {
      "get": {
        "operationId": "marketFewsTrade",
        "tags": [
          "market"
        ],
        "summary": "Cross-border trade flows (FEWS NET)",
        "description": "Monthly quantities of staple crops crossing East African borders, formal and informal, by border point, as monitored by FEWS NET and partners. The East African monitoring ends in September 2024; later rows are South African maize exports (SAGIS). `origin`/`destination`/`reporter` are ISO alpha-2; `quantity` is in `unit`, `quantity_kg` the same in kilograms. Cadence: monthly (East Africa: to 09/2024). Global reference data — the same rows for every caller. Needs one of these filters: country, border point, commodity; without one the call answers 400. Scope: market:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Filter on source. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "publisher",
            "in": "query",
            "required": false,
            "description": "Filter on publisher. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reporter",
            "in": "query",
            "required": false,
            "description": "Filter on reporter. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "origin",
            "in": "query",
            "required": false,
            "description": "Filter on origin. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "destination",
            "in": "query",
            "required": false,
            "description": "Filter on destination. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "border_point",
            "in": "query",
            "required": false,
            "description": "Filter on border_point. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commodity",
            "in": "query",
            "required": false,
            "description": "Filter on commodity. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cpc",
            "in": "query",
            "required": false,
            "description": "Filter on cpc. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flow",
            "in": "query",
            "required": false,
            "description": "Filter on flow. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trade_type",
            "in": "query",
            "required": false,
            "description": "Filter on trade_type. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unit",
            "in": "query",
            "required": false,
            "description": "Filter on unit. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "market.fews_trade"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "source": {
                            "type": "string",
                            "description": "the row's source"
                          },
                          "publisher": {
                            "type": "string",
                            "description": "the row's publisher"
                          },
                          "reporter": {
                            "type": "string",
                            "description": "the row's reporter"
                          },
                          "origin": {
                            "type": "string",
                            "description": "the row's origin"
                          },
                          "destination": {
                            "type": "string",
                            "description": "the row's destination"
                          },
                          "border_point": {
                            "type": "string",
                            "description": "the row's border_point"
                          },
                          "commodity": {
                            "type": "string",
                            "description": "the row's commodity"
                          },
                          "cpc": {
                            "type": "string",
                            "description": "the row's cpc"
                          },
                          "flow": {
                            "type": "string",
                            "description": "the row's flow"
                          },
                          "trade_type": {
                            "type": "string",
                            "description": "the row's trade_type"
                          },
                          "unit": {
                            "type": "string",
                            "description": "the row's unit"
                          },
                          "quantity": {
                            "type": "number",
                            "description": "unit unit as tagged"
                          },
                          "quantity_kg": {
                            "type": "number",
                            "description": "unit kg"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/market/rainfall-anomaly": {
      "get": {
        "operationId": "marketRainfallAnomaly",
        "tags": [
          "market"
        ],
        "summary": "Rainfall anomaly",
        "description": "Seasonal rainfall anomaly versus the long-term normal, by admin unit — the weather side of a demand call. Covers all of sub-Saharan Africa. The upstream snapshot has not updated since July 2024: its latest seasons are Oct–Dec 2023 and Mar–May 2024, and each row's time is the date we re-read it, not the season's. Cadence: per season/dekad. Global reference data — the same rows for every caller. Needs one of these filters: country, admin area; without one the call answers 400. Scope: market:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Filter on source. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Filter on country. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "adm1",
            "in": "query",
            "required": false,
            "description": "Filter on adm1. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "adm2",
            "in": "query",
            "required": false,
            "description": "Filter on adm2. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "adm_level",
            "in": "query",
            "required": false,
            "description": "Filter on adm_level. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "adm_pcode",
            "in": "query",
            "required": false,
            "description": "Filter on adm_pcode. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "season",
            "in": "query",
            "required": false,
            "description": "Filter on season. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "market.rainfall_anomaly"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "source": {
                            "type": "string",
                            "description": "the row's source"
                          },
                          "country": {
                            "type": "string",
                            "description": "the row's country"
                          },
                          "adm1": {
                            "type": "string",
                            "description": "the row's adm1"
                          },
                          "adm2": {
                            "type": "string",
                            "description": "the row's adm2"
                          },
                          "adm_level": {
                            "type": "string",
                            "description": "the row's adm_level"
                          },
                          "adm_pcode": {
                            "type": "string",
                            "description": "the row's adm_pcode"
                          },
                          "season": {
                            "type": "string",
                            "description": "the row's season"
                          },
                          "anomaly_mean": {
                            "type": "number",
                            "description": "unit mm; season-to-date accumulation vs the long-term average"
                          },
                          "anomaly_min": {
                            "type": "number",
                            "description": "unit mm"
                          },
                          "anomaly_max": {
                            "type": "number",
                            "description": "unit mm"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/market/rainfall-subnational": {
      "get": {
        "operationId": "marketRainfallSubnational",
        "tags": [
          "market"
        ],
        "summary": "Rainfall against normal, by admin unit",
        "description": "Rain over the last 10 days, 1 month and 3 months against the long-term average for the same days, for every county, region and district in Kenya, Tanzania, Uganda and Rwanda — one point per dekad, timed at the dekad's first day. `rfq`/`r1q`/`r3q` are the publisher's percentage of normal, 100 × (rain + 5) / (average + 5). `final` is 0 until the publisher replaces the preliminary figure. `shared_with` names the other unit where the publisher's older boundary makes one reading cover two of ours. Cadence: dekadal. Global reference data — the same rows for every caller. Needs one of these filters: country; without one the call answers 400. Scope: market:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Filter on source. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Filter on country. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unit",
            "in": "query",
            "required": false,
            "description": "Filter on unit. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pcode",
            "in": "query",
            "required": false,
            "description": "Filter on pcode. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "adm_level",
            "in": "query",
            "required": false,
            "description": "Filter on adm_level. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shared_with",
            "in": "query",
            "required": false,
            "description": "Filter on shared_with. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "market.rainfall_subnational"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "source": {
                            "type": "string",
                            "description": "the row's source"
                          },
                          "country": {
                            "type": "string",
                            "description": "the row's country"
                          },
                          "unit": {
                            "type": "string",
                            "description": "the row's unit"
                          },
                          "pcode": {
                            "type": "string",
                            "description": "the row's pcode"
                          },
                          "adm_level": {
                            "type": "string",
                            "description": "the row's adm_level"
                          },
                          "shared_with": {
                            "type": "string",
                            "description": "the row's shared_with"
                          },
                          "rfh": {
                            "type": "number",
                            "description": "unit mm; rain in the dekad"
                          },
                          "rfh_avg": {
                            "type": "number",
                            "description": "unit mm; long-term average for the dekad"
                          },
                          "rfq": {
                            "type": "number",
                            "description": "unit %; dekad rain as a percentage of normal"
                          },
                          "r1h": {
                            "type": "number",
                            "description": "unit mm; rain over the last month (three dekads)"
                          },
                          "r1h_avg": {
                            "type": "number",
                            "description": "unit mm; long-term average for that month"
                          },
                          "r1q": {
                            "type": "number",
                            "description": "unit %; month rain as a percentage of normal"
                          },
                          "r3h": {
                            "type": "number",
                            "description": "unit mm; rain over the last three months (nine dekads)"
                          },
                          "r3h_avg": {
                            "type": "number",
                            "description": "unit mm; long-term average for those three months"
                          },
                          "r3q": {
                            "type": "number",
                            "description": "unit %; three-month rain as a percentage of normal"
                          },
                          "n_pixels": {
                            "description": "satellite pixels averaged over the unit"
                          },
                          "final": {
                            "description": "1 = final, 0 = preliminary"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/market/agri-stress": {
      "get": {
        "operationId": "marketAgriStress",
        "tags": [
          "market"
        ],
        "summary": "Agricultural stress",
        "description": "Early-warning hotspot flags per region: warning levels for cropland and rangeland where the season is going badly. Cadence: dekadal. Global reference data — the same rows for every caller. Scope: market:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Filter on source. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Filter on country. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "description": "Filter on region. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "asap0_id",
            "in": "query",
            "required": false,
            "description": "Filter on asap0_id. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "market.agri_stress"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "source": {
                            "type": "string",
                            "description": "the row's source"
                          },
                          "country": {
                            "type": "string",
                            "description": "the row's country"
                          },
                          "region": {
                            "type": "string",
                            "description": "the row's region"
                          },
                          "asap0_id": {
                            "type": "string",
                            "description": "the row's asap0_id"
                          },
                          "g1_w_any": {
                            "description": "warning level — any land cover"
                          },
                          "g1_w_crop": {
                            "description": "warning level — cropland"
                          },
                          "g1_w_range": {
                            "description": "warning level — rangeland"
                          },
                          "hs_code": {
                            "description": "hotspot code"
                          },
                          "hs_name": {
                            "description": "hotspot name"
                          },
                          "comment": {}
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/market/production": {
      "get": {
        "operationId": "marketCropProduction",
        "tags": [
          "market"
        ],
        "summary": "Sub-national crop production",
        "description": "Area, production and yield by admin unit, crop and season — the ground truth behind a demand estimate. Covers all of sub-Saharan Africa. Cadence: per season, annual revisions. Global reference data — the same rows for every caller. Needs one of these filters: country, crop; without one the call answers 400. Scope: market:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Filter on source. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Filter on country. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "admin1",
            "in": "query",
            "required": false,
            "description": "Filter on admin1. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "admin2",
            "in": "query",
            "required": false,
            "description": "Filter on admin2. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fnid",
            "in": "query",
            "required": false,
            "description": "Filter on fnid. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product",
            "in": "query",
            "required": false,
            "description": "Filter on product. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "crop_system",
            "in": "query",
            "required": false,
            "description": "Filter on crop_system. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "season",
            "in": "query",
            "required": false,
            "description": "Filter on season. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "market.crop_production"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "source": {
                            "type": "string",
                            "description": "the row's source"
                          },
                          "country": {
                            "type": "string",
                            "description": "the row's country"
                          },
                          "admin1": {
                            "type": "string",
                            "description": "the row's admin1"
                          },
                          "admin2": {
                            "type": "string",
                            "description": "the row's admin2"
                          },
                          "fnid": {
                            "type": "string",
                            "description": "the row's fnid"
                          },
                          "product": {
                            "type": "string",
                            "description": "the row's product"
                          },
                          "crop_system": {
                            "type": "string",
                            "description": "the row's crop_system"
                          },
                          "season": {
                            "type": "string",
                            "description": "the row's season"
                          },
                          "area": {
                            "type": "number",
                            "description": "unit ha"
                          },
                          "production": {
                            "type": "number",
                            "description": "unit mt"
                          },
                          "yield": {
                            "type": "number",
                            "description": "unit mt/ha"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/market/fao-inputs": {
      "get": {
        "operationId": "marketFaoInputs",
        "tags": [
          "market"
        ],
        "summary": "FAO fertilizer + input statistics",
        "description": "National fertilizer use, imports and related agricultural input series — the multi-year backdrop to the monthly trade flows. Cadence: annual. Global reference data — the same rows for every caller. Needs one of these filters: country, item; without one the call answers 400. Scope: market:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Filter on source. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Filter on country. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dataset",
            "in": "query",
            "required": false,
            "description": "Filter on dataset. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "element",
            "in": "query",
            "required": false,
            "description": "Filter on element. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "item",
            "in": "query",
            "required": false,
            "description": "Filter on item. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unit",
            "in": "query",
            "required": false,
            "description": "Filter on unit. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "market.fao_inputs"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "source": {
                            "type": "string",
                            "description": "the row's source"
                          },
                          "country": {
                            "type": "string",
                            "description": "the row's country"
                          },
                          "dataset": {
                            "type": "string",
                            "description": "the row's dataset"
                          },
                          "element": {
                            "type": "string",
                            "description": "the row's element"
                          },
                          "item": {
                            "type": "string",
                            "description": "the row's item"
                          },
                          "unit": {
                            "type": "string",
                            "description": "the row's unit"
                          },
                          "value": {
                            "description": "see the unit tag"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/market/fao-crops": {
      "get": {
        "operationId": "marketFaoCrops",
        "tags": [
          "market"
        ],
        "summary": "FAO crop statistics",
        "description": "National crop area, production and yield series over the long run. Cadence: annual. Global reference data — the same rows for every caller. Needs one of these filters: country, item; without one the call answers 400. Scope: market:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Filter on source. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Filter on country. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dataset",
            "in": "query",
            "required": false,
            "description": "Filter on dataset. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "element",
            "in": "query",
            "required": false,
            "description": "Filter on element. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "item",
            "in": "query",
            "required": false,
            "description": "Filter on item. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unit",
            "in": "query",
            "required": false,
            "description": "Filter on unit. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "market.fao_crops"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "source": {
                            "type": "string",
                            "description": "the row's source"
                          },
                          "country": {
                            "type": "string",
                            "description": "the row's country"
                          },
                          "dataset": {
                            "type": "string",
                            "description": "the row's dataset"
                          },
                          "element": {
                            "type": "string",
                            "description": "the row's element"
                          },
                          "item": {
                            "type": "string",
                            "description": "the row's item"
                          },
                          "unit": {
                            "type": "string",
                            "description": "the row's unit"
                          },
                          "value": {
                            "description": "see the unit tag"
                          }
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/nuasense/v1/market/regulatory": {
      "get": {
        "operationId": "marketRegulatory",
        "tags": [
          "market"
        ],
        "summary": "Regulatory + legal signals",
        "description": "Typed, citable signals extracted weekly from the East African legal record — official notices, bills in progress, trade-standard notifications and import-rejection alerts — keyed to the same country + commodity vocabulary as the price and news layers. Every signal carries a document reference, a source URL and a verbatim quote. Cadence: weekly, Saturday. Global reference data — the same rows for every caller. Scope: market:read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/every"
          },
          {
            "$ref": "#/components/parameters/agg"
          },
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Filter on source. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jurisdiction",
            "in": "query",
            "required": false,
            "description": "Filter on jurisdiction. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Filter on country. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commodity",
            "in": "query",
            "required": false,
            "description": "Filter on commodity. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "regulation_type",
            "in": "query",
            "required": false,
            "description": "Filter on regulation_type. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "instrument_type",
            "in": "query",
            "required": false,
            "description": "Filter on instrument_type. Several values comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "string",
                      "example": "market.regulatory"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "filters": {
                      "type": "object"
                    },
                    "range": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string"
                        },
                        "end": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "UTC timestamp of the row"
                          },
                          "source": {
                            "type": "string",
                            "description": "the row's source"
                          },
                          "jurisdiction": {
                            "type": "string",
                            "description": "the row's jurisdiction"
                          },
                          "country": {
                            "type": "string",
                            "description": "the row's country"
                          },
                          "commodity": {
                            "type": "string",
                            "description": "the row's commodity"
                          },
                          "regulation_type": {
                            "type": "string",
                            "description": "the row's regulation_type"
                          },
                          "instrument_type": {
                            "type": "string",
                            "description": "the row's instrument_type"
                          },
                          "confidence": {
                            "type": "number",
                            "description": "unit 0-1"
                          },
                          "value": {
                            "description": "the number a measure names — a rate, levy or limit"
                          },
                          "effective_ts": {
                            "type": "number",
                            "description": "unit unix s; when the measure takes effect"
                          },
                          "comment_deadline_ts": {
                            "type": "number",
                            "description": "unit unix s; last day to respond to a consultation"
                          },
                          "status": {
                            "description": "stage of the instrument; a field so a stage change overwrites in place"
                          },
                          "title": {},
                          "summary": {},
                          "obligation": {
                            "description": "what someone must actually do"
                          },
                          "instrument": {
                            "description": "the document this comes from"
                          },
                          "supporting_quote": {
                            "description": "verbatim"
                          },
                          "source_url": {},
                          "doc_ref": {
                            "description": "official document reference"
                          },
                          "source_stage": {},
                          "effective_date": {
                            "description": "human-readable form of effective_ts"
                          },
                          "comment_deadline": {
                            "description": "human-readable form of comment_deadline_ts"
                          },
                          "value_unit": {},
                          "model": {},
                          "extractor_version": {}
                        }
                      }
                    },
                    "metering": {
                      "type": "object",
                      "description": "What the call cost: unit is row on market and location data, call on your own farm data.",
                      "properties": {
                        "tier": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "units_charged": {
                          "type": "number"
                        },
                        "max_rows_per_call": {
                          "type": "integer"
                        },
                        "history_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/meta": {
      "get": {
        "operationId": "analysisMeta",
        "tags": [
          "analysis-prices"
        ],
        "summary": "What can this API do, and what are the valid names?",
        "description": "What can this API do, and what are the valid names?",
        "parameters": [
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/units": {
      "get": {
        "operationId": "analysisUnits",
        "tags": [
          "analysis-demand"
        ],
        "summary": "Which counties, regions and districts can I ask about?",
        "description": "Which counties, regions and districts can I ask about? Example: ?country=tz",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "country",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/fertilizer/price": {
      "get": {
        "operationId": "analysisFertilizerPrice",
        "tags": [
          "analysis-prices"
        ],
        "summary": "What does DAP cost right now, and where?",
        "description": "What does DAP cost right now, and where? Example: ?variety=dap&county=nakuru",
        "parameters": [
          {
            "name": "variety",
            "in": "query",
            "required": false,
            "description": "variety",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "county",
            "in": "query",
            "required": false,
            "description": "county",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "field",
            "in": "query",
            "required": false,
            "description": "field",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "window_days",
            "in": "query",
            "required": false,
            "description": "window days",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/fertilizer/rank": {
      "get": {
        "operationId": "analysisFertilizerRank",
        "tags": [
          "analysis-prices"
        ],
        "summary": "Which counties are dearest and which cheapest?",
        "description": "Which counties are dearest and which cheapest? Example: ?variety=dap&order=desc",
        "parameters": [
          {
            "name": "variety",
            "in": "query",
            "required": false,
            "description": "variety",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "field",
            "in": "query",
            "required": false,
            "description": "field",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "order",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "window_days",
            "in": "query",
            "required": false,
            "description": "window days",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/fertilizer/markets": {
      "get": {
        "operationId": "analysisFertilizerMarkets",
        "tags": [
          "analysis-prices"
        ],
        "summary": "What does it cost in each individual market inside a county?",
        "description": "What does it cost in each individual market inside a county? Example: ?variety=dap&county=kakamega",
        "parameters": [
          {
            "name": "variety",
            "in": "query",
            "required": false,
            "description": "variety",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "county",
            "in": "query",
            "required": false,
            "description": "county",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "field",
            "in": "query",
            "required": false,
            "description": "field",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "source",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "window_days",
            "in": "query",
            "required": false,
            "description": "window days",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/fertilizer/trend": {
      "get": {
        "operationId": "analysisFertilizerTrend",
        "tags": [
          "analysis-prices"
        ],
        "summary": "Is the price rising or falling, and by how much?",
        "description": "Is the price rising or falling, and by how much? Example: ?variety=dap",
        "parameters": [
          {
            "name": "variety",
            "in": "query",
            "required": false,
            "description": "variety",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "county",
            "in": "query",
            "required": false,
            "description": "county",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "field",
            "in": "query",
            "required": false,
            "description": "field",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "window_days",
            "in": "query",
            "required": false,
            "description": "window days",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/fertilizer/seasonality": {
      "get": {
        "operationId": "analysisFertilizerSeasonality",
        "tags": [
          "analysis-prices"
        ],
        "summary": "Which month of the year is cheapest to buy?",
        "description": "Which month of the year is cheapest to buy? Example: ?variety=dap",
        "parameters": [
          {
            "name": "variety",
            "in": "query",
            "required": false,
            "description": "variety",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "county",
            "in": "query",
            "required": false,
            "description": "county",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "field",
            "in": "query",
            "required": false,
            "description": "field",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/fertilizer/backtest": {
      "get": {
        "operationId": "analysisFertilizerBacktest",
        "tags": [
          "analysis-prices"
        ],
        "summary": "Would that seasonal rule actually have made money?",
        "description": "Would that seasonal rule actually have made money? Example: ?variety=dap",
        "parameters": [
          {
            "name": "variety",
            "in": "query",
            "required": false,
            "description": "variety",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "county",
            "in": "query",
            "required": false,
            "description": "county",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "field",
            "in": "query",
            "required": false,
            "description": "field",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/fertilizer/margin": {
      "get": {
        "operationId": "analysisFertilizerMargin",
        "tags": [
          "analysis-prices"
        ],
        "summary": "Where is the retail-minus-wholesale markup fattest?",
        "description": "Where is the retail-minus-wholesale markup fattest? Example: ?variety=dap",
        "parameters": [
          {
            "name": "variety",
            "in": "query",
            "required": false,
            "description": "variety",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "window_days",
            "in": "query",
            "required": false,
            "description": "window days",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/fertilizer/source-compare": {
      "get": {
        "operationId": "analysisFertilizerSourceCompare",
        "tags": [
          "analysis-prices"
        ],
        "summary": "Do the official prices and the online asking prices agree?",
        "description": "Do the official prices and the online asking prices agree? Example: ?variety=dap",
        "parameters": [
          {
            "name": "variety",
            "in": "query",
            "required": false,
            "description": "variety",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "county",
            "in": "query",
            "required": false,
            "description": "county",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "window_days",
            "in": "query",
            "required": false,
            "description": "window days",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/fertilizer/global-benchmark": {
      "get": {
        "operationId": "analysisFertilizerGlobalBenchmark",
        "tags": [
          "analysis-prices"
        ],
        "summary": "How does the local price compare to the world market?",
        "description": "How does the local price compare to the world market? Example: ?variety=dap",
        "parameters": [
          {
            "name": "variety",
            "in": "query",
            "required": false,
            "description": "variety",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/fertilizer/affordability": {
      "get": {
        "operationId": "analysisFertilizerAffordability",
        "tags": [
          "analysis-prices"
        ],
        "summary": "Can farmers here actually afford fertilizer this season?",
        "description": "Can farmers here actually afford fertilizer this season? Example: ?variety=dap",
        "parameters": [
          {
            "name": "variety",
            "in": "query",
            "required": false,
            "description": "variety",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "window_days",
            "in": "query",
            "required": false,
            "description": "window days",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/fertilizer/demand-board": {
      "get": {
        "operationId": "analysisFertilizerDemandBoard",
        "tags": [
          "analysis-demand"
        ],
        "summary": "Which counties are building demand right now?",
        "description": "Which counties are building demand right now? Example: ?country=ke",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "country",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "limit",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/fertilizer/demand-signal": {
      "get": {
        "operationId": "analysisFertilizerDemandSignal",
        "tags": [
          "analysis-demand"
        ],
        "summary": "Is demand rising in this one county, and how strongly?",
        "description": "Is demand rising in this one county, and how strongly? Example: ?county=nakuru",
        "parameters": [
          {
            "name": "county",
            "in": "query",
            "required": false,
            "description": "county",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "country",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/fertilizer/county-brief": {
      "get": {
        "operationId": "analysisFertilizerCountyBrief",
        "tags": [
          "analysis-demand"
        ],
        "summary": "Give me everything about one county in a single call.",
        "description": "Give me everything about one county in a single call. Example: ?county=nakuru&country=ke&variety=dap",
        "parameters": [
          {
            "name": "county",
            "in": "query",
            "required": false,
            "description": "county",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "country",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "variety",
            "in": "query",
            "required": false,
            "description": "variety",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/fertilizer/crop-economy": {
      "get": {
        "operationId": "analysisFertilizerCropEconomy",
        "tags": [
          "analysis-demand"
        ],
        "summary": "What is the farmer in this county actually earning?",
        "description": "What is the farmer in this county actually earning? Example: ?county=nakuru",
        "parameters": [
          {
            "name": "county",
            "in": "query",
            "required": false,
            "description": "county",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/fertilizer/market-size": {
      "get": {
        "operationId": "analysisFertilizerMarketSize",
        "tags": [
          "analysis-demand"
        ],
        "summary": "How big is the fertilizer market in this country?",
        "description": "How big is the fertilizer market in this country? Example: ?country=ke",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "country",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/analytics/spread": {
      "get": {
        "operationId": "analysisAnalyticsSpread",
        "tags": [
          "analysis-analysis"
        ],
        "summary": "Where can I buy cheap and sell dear — and does it cover the lorry?",
        "description": "Where can I buy cheap and sell dear — and does it cover the lorry? Example: ?commodity=maize_dry&transport_cost_kes_per_kg=8",
        "parameters": [
          {
            "name": "commodity",
            "in": "query",
            "required": false,
            "description": "commodity",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "window_days",
            "in": "query",
            "required": false,
            "description": "window days",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "transport_cost_kes_per_kg",
            "in": "query",
            "required": false,
            "description": "transport cost kes per kg",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "limit",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/analytics/price-lag": {
      "get": {
        "operationId": "analysisAnalyticsPriceLag",
        "tags": [
          "analysis-analysis"
        ],
        "summary": "When Nairobi moves, how long until my market follows?",
        "description": "When Nairobi moves, how long until my market follows? Example: ?commodity=maize_dry&reference=nairobi",
        "parameters": [
          {
            "name": "commodity",
            "in": "query",
            "required": false,
            "description": "commodity",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reference",
            "in": "query",
            "required": false,
            "description": "reference",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "window_days",
            "in": "query",
            "required": false,
            "description": "window days",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "max_lag_days",
            "in": "query",
            "required": false,
            "description": "max lag days",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/analytics/inflation": {
      "get": {
        "operationId": "analysisAnalyticsInflation",
        "tags": [
          "analysis-analysis"
        ],
        "summary": "Which counties are getting expensive fastest?",
        "description": "Which counties are getting expensive fastest? Example: ?commodity=maize_dry",
        "parameters": [
          {
            "name": "commodity",
            "in": "query",
            "required": false,
            "description": "commodity",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "window_days",
            "in": "query",
            "required": false,
            "description": "window days",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/analytics/yield-risk": {
      "get": {
        "operationId": "analysisAnalyticsYieldRisk",
        "tags": [
          "analysis-analysis"
        ],
        "summary": "How reliable is this county's harvest, and which years failed?",
        "description": "How reliable is this county's harvest, and which years failed? Example: ?county=uasin_gishu&product=maize",
        "parameters": [
          {
            "name": "county",
            "in": "query",
            "required": false,
            "description": "county",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product",
            "in": "query",
            "required": false,
            "description": "product",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "season",
            "in": "query",
            "required": false,
            "description": "season",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/analytics/season": {
      "get": {
        "operationId": "analysisAnalyticsSeason",
        "tags": [
          "analysis-analysis"
        ],
        "summary": "Has the season started here — early or late, and is the rain that starts one coming?",
        "description": "Has the season started here — early or late, and is the rain that starts one coming? Example: ?county=nakuru",
        "parameters": [
          {
            "name": "county",
            "in": "query",
            "required": false,
            "description": "county",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "country",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "index",
            "in": "query",
            "required": false,
            "description": "index",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/crop-protection": {
      "get": {
        "operationId": "analysisCropProtection",
        "tags": [
          "analysis-analysis"
        ],
        "summary": "What is registered against this pest on my crop, and how long before harvest?",
        "description": "What is registered against this pest on my crop, and how long before harvest? Example: ?crop=tomato&pest=tuta absoluta",
        "parameters": [
          {
            "name": "crop",
            "in": "query",
            "required": false,
            "description": "crop",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pest",
            "in": "query",
            "required": false,
            "description": "pest",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "country",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/fertilizer/recommendation": {
      "get": {
        "operationId": "analysisFertilizerRecommendation",
        "tags": [
          "analysis-analysis"
        ],
        "summary": "How much fertilizer for my crop, and what does it cost me today?",
        "description": "How much fertilizer for my crop, and what does it cost me today? Example: ?county=nakuru&crop=maize&altitude_m=1850",
        "parameters": [
          {
            "name": "county",
            "in": "query",
            "required": false,
            "description": "county",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "crop",
            "in": "query",
            "required": false,
            "description": "crop",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "altitude_m",
            "in": "query",
            "required": false,
            "description": "altitude m",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "level",
            "in": "query",
            "required": false,
            "description": "level",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/export-residue": {
      "get": {
        "operationId": "analysisExportResidue",
        "tags": [
          "analysis-analysis"
        ],
        "summary": "Can I use this on my crop and still export to the EU?",
        "description": "Can I use this on my crop and still export to the EU? Example: ?crop=french_bean&active=lambda-cyhalothrin",
        "parameters": [
          {
            "name": "crop",
            "in": "query",
            "required": false,
            "description": "crop",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "description": "active",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "limit",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/varieties": {
      "get": {
        "operationId": "analysisVarieties",
        "tags": [
          "analysis-analysis"
        ],
        "summary": "Which varieties are released for my altitude, and how long do they take?",
        "description": "Which varieties are released for my altitude, and how long do they take? Example: ?crop=maize&altitude_m=1800&max_maturity_months=5",
        "parameters": [
          {
            "name": "crop",
            "in": "query",
            "required": false,
            "description": "crop",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "altitude_m",
            "in": "query",
            "required": false,
            "description": "altitude m",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "max_maturity_months",
            "in": "query",
            "required": false,
            "description": "max maturity months",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "seed_company",
            "in": "query",
            "required": false,
            "description": "seed company",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "limit",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/analytics/coffee-grades": {
      "get": {
        "operationId": "analysisAnalyticsCoffeeGrades",
        "tags": [
          "analysis-analysis"
        ],
        "summary": "What does coffee grade AA earn over the market?",
        "description": "What does coffee grade AA earn over the market? Example: ?sales=20",
        "parameters": [
          {
            "name": "sales",
            "in": "query",
            "required": false,
            "description": "sales",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/analytics/tea-league": {
      "get": {
        "operationId": "analysisAnalyticsTeaLeague",
        "tags": [
          "analysis-analysis"
        ],
        "summary": "Which tea factory beats its neighbours?",
        "description": "Which tea factory beats its neighbours? Example: ?grade=all",
        "parameters": [
          {
            "name": "grade",
            "in": "query",
            "required": false,
            "description": "grade",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sales",
            "in": "query",
            "required": false,
            "description": "sales",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "min_sales",
            "in": "query",
            "required": false,
            "description": "min sales",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/county-summary": {
      "get": {
        "operationId": "analysisCountySummary",
        "tags": [
          "analysis-demand"
        ],
        "summary": "How is one county, region or district doing right now?",
        "description": "How is one county, region or district doing right now? Example: ?county=nakuru&country=ke",
        "parameters": [
          {
            "name": "county",
            "in": "query",
            "required": false,
            "description": "county",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "country",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/partner/v1/market/news": {
      "get": {
        "operationId": "analysisNews",
        "tags": [
          "analysis-news"
        ],
        "summary": "What is happening in the market right now?",
        "description": "What is happening in the market right now? Example: ?commodity=fertilizer&days=14",
        "parameters": [
          {
            "name": "commodity",
            "in": "query",
            "required": false,
            "description": "commodity",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "county",
            "in": "query",
            "required": false,
            "description": "county",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "country",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "signal_type",
            "in": "query",
            "required": false,
            "description": "signal type",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trust",
            "in": "query",
            "required": false,
            "description": "trust",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "days",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Client"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API key from https://platform.nuasense.com/manage/keys"
      }
    },
    "parameters": {
      "Client": {
        "name": "X-NuaSense-Client",
        "in": "header",
        "required": false,
        "description": "What is calling, for example skill/0.1.0; agent=claude-code. Changes nothing in price or limits.",
        "schema": {
          "type": "string"
        }
      },
      "start": {
        "name": "start",
        "in": "query",
        "required": false,
        "description": "RFC3339 time, or a duration relative to now such as -7d or -24h. Default -24h; slow datasets carry their own default. Without credit, market and location data cannot start more than 30 days back (402).",
        "schema": {
          "type": "string"
        },
        "example": "-7d"
      },
      "end": {
        "name": "end",
        "in": "query",
        "required": false,
        "description": "RFC3339 time or a relative duration. Default now.",
        "schema": {
          "type": "string"
        }
      },
      "every": {
        "name": "every",
        "in": "query",
        "required": false,
        "description": "Downsample window, for example 1h or 1d. Use together with agg.",
        "schema": {
          "type": "string"
        },
        "example": "1h"
      },
      "agg": {
        "name": "agg",
        "in": "query",
        "required": false,
        "description": "Aggregation for every.",
        "schema": {
          "type": "string",
          "enum": [
            "mean",
            "min",
            "max",
            "sum",
            "last",
            "first",
            "count"
          ]
        }
      },
      "fields": {
        "name": "fields",
        "in": "query",
        "required": false,
        "description": "Comma-separated subset of the dataset's fields. It can only narrow what is published; a field the key cannot reach answers 400.",
        "schema": {
          "type": "string"
        }
      },
      "limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "description": "Rows in total. Default 500. Ceiling per call: 100 without credit, 1,000 with credit, 5,000 for your own farm data.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 5000
        },
        "example": 50
      },
      "order": {
        "name": "order",
        "in": "query",
        "required": false,
        "description": "asc for oldest first. Newest first is the default.",
        "schema": {
          "type": "string",
          "enum": [
            "asc",
            "desc"
          ]
        }
      }
    },
    "responses": {
      "E400": {
        "description": "A field the key cannot reach, a bad time or aggregation value, or a continent-wide dataset called without a filter. The body names the problem.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E401": {
        "description": "Missing, malformed, revoked or expired key.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E402": {
        "description": "Market or location history beyond the free 30 days, or prepaid credit spent. Tell the human what needs credit; do not retry.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E403": {
        "description": "The key lacks the scope, or names a station it does not own.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E404": {
        "description": "The dataset exists but is not published to this key.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E429": {
        "description": "Per-minute, daily or monthly budget reached. Wait for Retry-After or ask with a smaller limit.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "dataset": {
            "type": "string"
          }
        }
      }
    }
  }
}
