> This page is for version 0.0.63.
> For other versions, use one of these documentation indexes:
> - 0.0.79 (default): https://docs.refer.health.gov.sg/0-0-79/llms.txt
> - 0.0.78: https://docs.refer.health.gov.sg/0-0-78/llms.txt
> - 0.0.77: https://docs.refer.health.gov.sg/0-0-77/llms.txt
> - 0.0.76: https://docs.refer.health.gov.sg/0-0-76/llms.txt
> - 0.0.75: https://docs.refer.health.gov.sg/0-0-75/llms.txt
> - 0.0.74: https://docs.refer.health.gov.sg/0-0-74/llms.txt
> - 0.0.73: https://docs.refer.health.gov.sg/0-0-73/llms.txt
> - 0.0.72: https://docs.refer.health.gov.sg/0-0-72/llms.txt
> - 0.0.71: https://docs.refer.health.gov.sg/0-0-71/llms.txt
> - 0.0.70: https://docs.refer.health.gov.sg/0-0-70/llms.txt
> - 0.0.69: https://docs.refer.health.gov.sg/0-0-69/llms.txt
> - 0.0.68: https://docs.refer.health.gov.sg/0-0-68/llms.txt
> - 0.0.67: https://docs.refer.health.gov.sg/0-0-67/llms.txt
> - 0.0.66: https://docs.refer.health.gov.sg/0-0-66/llms.txt
> - 0.0.65: https://docs.refer.health.gov.sg/0-0-65/llms.txt
> - 0.0.64: https://docs.refer.health.gov.sg/0-0-64/llms.txt
> - 0.0.63: https://docs.refer.health.gov.sg/0-0-63/llms.txt
> - 0.0.62: https://docs.refer.health.gov.sg/0-0-62/llms.txt
> - 0.0.61: https://docs.refer.health.gov.sg/0-0-61/llms.txt
> - 0.0.60: https://docs.refer.health.gov.sg/0-0-60/llms.txt
> - 0.0.59: https://docs.refer.health.gov.sg/0-0-59/llms.txt
> - 0.0.58: https://docs.refer.health.gov.sg/0-0-58/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.refer.health.gov.sg/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.refer.health.gov.sg/_mcp/server.

# List referrers with whitelisting status

GET https://dummy-url-see-smartcms-spec/api/v1/referrers

Reference: https://docs.refer.health.gov.sg/0-0-65/api-reference/referrers/api-holding-controller-get-referrers

## Authentication

- `Authorization` header (required) — API key to authenticate for external integrations. Use the format: "ApiKey insert-token-here"

## Servers

- `https://dummy-url-see-smartcms-spec` (SmartCMS, default)
- `https://refer.health.gov.sg` (Production)
- `https://refer-staging.health.gov.sg` (Staging)

## Request

### Query parameters

- `idType` (enum, required) — Filter by referrer ID type.
  - Allowed values: `mcr`, `nric`, `email`, `brightUserId`, `dcr`
- `whitelisted` (boolean, optional) — Filter by whitelisting status. true = whitelisted only, false = unwhitelisted only, omit = all.
- `idType` (enum, required) — Type of ID specified in referrerId.
  - Allowed values: `mcr`, `nric`, `email`, `brightUserId`, `dcr`
- `whitelisted` (boolean, optional) — Filter by whitelisting status. true = whitelisted only, false = unwhitelisted only, omit = all.

## Response

### 200

- `referrers` (list of ReferrerStatusDto, required)

## Errors

### 401 Unauthorized Error

Invalid authorization header.

- `statusCode` (double, optional)
- `message` (string, optional)
- `error` (string, optional)

## Types

### ReferrerStatusDto

- `id` (string, required) — Referrer ID (e.g. MCR number).
- `idType` (enum, required) — Type of ID specified in referrerId.
  - Allowed values: `mcr`, `nric`, `email`, `brightUserId`, `dcr`
- `institutionId` (string, required) — Institution HCI code.
- `singhealthWhitelistedAt` (double, required, nullable) — Timestamp when SingHealth whitelisted, or null.
- `latestDoctorEmail` (string, required, nullable) — Latest doctor email from referrals, or null.

## Examples

**Response**

```json
{
  "referrers": [
    {
      "id": "string",
      "idType": "mcr",
      "institutionId": "string",
      "singhealthWhitelistedAt": 1.1,
      "latestDoctorEmail": "string"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://dummy-url-see-smartcms-spec/api/v1/referrers"

querystring = {"idType":"mcr"}

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

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

print(response.json())
```

```javascript
const url = 'https://dummy-url-see-smartcms-spec/api/v1/referrers?idType=mcr';
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
package main

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

func main() {

	url := "https://dummy-url-see-smartcms-spec/api/v1/referrers?idType=mcr"

	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
require 'uri'
require 'net/http'

url = URI("https://dummy-url-see-smartcms-spec/api/v1/referrers?idType=mcr")

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
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://dummy-url-see-smartcms-spec/api/v1/referrers?idType=mcr")
  .header("Authorization", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://dummy-url-see-smartcms-spec/api/v1/referrers?idType=mcr', [
  'headers' => [
    'Authorization' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://dummy-url-see-smartcms-spec/api/v1/referrers?idType=mcr");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://dummy-url-see-smartcms-spec/api/v1/referrers?idType=mcr")! 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()
```