For clean Markdown of any page, append .md to the page URL. For a complete documentation index, see https://api-doc-new.gideononline.com/gideon-api-1-0/disease-distribution/llms.txt. For full documentation content, see https://api-doc-new.gideononline.com/gideon-api-1-0/disease-distribution/llms-full.txt.

# /diseases/{disease_code}/distribution/map/legends

GET https://api.gideononline.com/diseases/%7Bdisease_code%7D/distribution/map/legends

Returns **legend rows** for coloring **global distribution maps** of this disease: each row is one display band with a human-readable **`legend`** label and numeric bounds **`min_value`** / **`max_value`**, plus **`exclusive_min`** and **`exclusive_max`** (whether each endpoint is treated as inside the band).

Use this together with **`GET /diseases/{disease_code}/distribution/map/labels`** (numeric cut points paired with short names) and **`GET /diseases/{disease_code}/distribution/map/values`** (per-country metric values).

There are **no** query parameters.

#### **Path parameters**

| Name | Description |
| --- | --- |
| `disease_code` | GIDEON disease id (numeric string in the path). |

#### **Success response**

`{ "data": [ … ] }` — each element has **`legend`**, **`min_value`**, **`max_value`**, **`exclusive_min`**, **`exclusive_max`**.

The **count of rows** and the **numeric cutoffs** depend on the disease: many diseases return a **standard three-band** scale (not endemic / sporadic / endemic). When expanded map settings exist for the disease, the API returns **additional graduated bands** (same field shape, more rows). One disease id uses a **fixed alternate** multi-band legend for a specialized resistance map; clients should render whatever array is returned.

The endpoint always returns **200** with a non-empty **`data`** array for valid numeric ids; unknown ids are not validated separately and may still receive a generic legend set.


Reference: https://api-doc-new.gideononline.com/gideon-api-1-0/disease-distribution/diseases-disease-code-distribution-map-legends

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /diseases/%7Bdisease_code%7D/distribution/map/legends:
    get:
      operationId: diseases-disease-code-distribution-map-legends
      summary: /diseases/{disease_code}/distribution/map/legends
      description: >
        Returns **legend rows** for coloring **global distribution maps** of
        this disease: each row is one display band with a human-readable
        **`legend`** label and numeric bounds **`min_value`** / **`max_value`**,
        plus **`exclusive_min`** and **`exclusive_max`** (whether each endpoint
        is treated as inside the band).


        Use this together with **`GET
        /diseases/{disease_code}/distribution/map/labels`** (numeric cut points
        paired with short names) and **`GET
        /diseases/{disease_code}/distribution/map/values`** (per-country metric
        values).


        There are **no** query parameters.


        #### **Path parameters**


        | Name | Description |

        | --- | --- |

        | `disease_code` | GIDEON disease id (numeric string in the path). |


        #### **Success response**


        `{ "data": [ … ] }` — each element has **`legend`**, **`min_value`**,
        **`max_value`**, **`exclusive_min`**, **`exclusive_max`**.


        The **count of rows** and the **numeric cutoffs** depend on the disease:
        many diseases return a **standard three-band** scale (not endemic /
        sporadic / endemic). When expanded map settings exist for the disease,
        the API returns **additional graduated bands** (same field shape, more
        rows). One disease id uses a **fixed alternate** multi-band legend for a
        specialized resistance map; clients should render whatever array is
        returned.


        The endpoint always returns **200** with a non-empty **`data`** array
        for valid numeric ids; unknown ids are not validated separately and may
        still receive a generic legend set.
      tags:
        - subpackage_diseaseDistribution
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Disease -
                  Distribution_/diseases/{disease_code}/distribution/map/legends_Response_200
servers:
  - url: https://api.gideononline.com
  - url: https://api-test.gideononline.com
components:
  schemas:
    Diseases7BdiseaseCode7DDistributionMapLegendsGetResponsesContentApplicationJsonSchemaDataItems:
      type: object
      properties:
        legend:
          type: string
        max_value:
          type: integer
        min_value:
          type: integer
        exclusive_max:
          type: boolean
        exclusive_min:
          type: boolean
      required:
        - legend
        - max_value
        - min_value
        - exclusive_max
        - exclusive_min
      title: >-
        Diseases7BdiseaseCode7DDistributionMapLegendsGetResponsesContentApplicationJsonSchemaDataItems
    Disease - Distribution_/diseases/{disease_code}/distribution/map/legends_Response_200:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: >-
              #/components/schemas/Diseases7BdiseaseCode7DDistributionMapLegendsGetResponsesContentApplicationJsonSchemaDataItems
      required:
        - data
      title: >-
        Disease -
        Distribution_/diseases/{disease_code}/distribution/map/legends_Response_200
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

```

## SDK Code Examples

```python Disease - Distribution_/diseases/{disease_code}/distribution/map/legends_example
import requests

url = "https://api.gideononline.com/diseases/%7Bdisease_code%7D/distribution/map/legends"

headers = {"Authorization": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Disease - Distribution_/diseases/{disease_code}/distribution/map/legends_example
const url = 'https://api.gideononline.com/diseases/%7Bdisease_code%7D/distribution/map/legends';
const options = {method: 'GET', headers: {Authorization: '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Disease - Distribution_/diseases/{disease_code}/distribution/map/legends_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.gideononline.com/diseases/%7Bdisease_code%7D/distribution/map/legends"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Disease - Distribution_/diseases/{disease_code}/distribution/map/legends_example
require 'uri'
require 'net/http'

url = URI("https://api.gideononline.com/diseases/%7Bdisease_code%7D/distribution/map/legends")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Disease - Distribution_/diseases/{disease_code}/distribution/map/legends_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.gideononline.com/diseases/%7Bdisease_code%7D/distribution/map/legends")
  .header("Authorization", "<apiKey>")
  .asString();
```

```php Disease - Distribution_/diseases/{disease_code}/distribution/map/legends_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.gideononline.com/diseases/%7Bdisease_code%7D/distribution/map/legends', [
  'headers' => [
    'Authorization' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Disease - Distribution_/diseases/{disease_code}/distribution/map/legends_example
using RestSharp;

var client = new RestClient("https://api.gideononline.com/diseases/%7Bdisease_code%7D/distribution/map/legends");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Disease - Distribution_/diseases/{disease_code}/distribution/map/legends_example
import Foundation

let headers = ["Authorization": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.gideononline.com/diseases/%7Bdisease_code%7D/distribution/map/legends")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```