> This page is for version 0.0.61.
> 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.

# Retrieves a paginated list of referrals

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

Reference: https://docs.refer.health.gov.sg/0-0-65/api-reference/referrals/list

## 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

- `offset` (double, optional, default: 0) — Offset for pagination
- `pageSize` (double, optional, default: 10) — Number of items per page
- `status` (list of enum, optional)
  - Allowed values: `draft`, `pending`, `confirmed`, `rejected`, `cancelled`
- `role` (enum, optional) — To filter by the institution's role in the referral. e.g. For outbound referrals, use "sender'
  - Allowed values: `sender`, `receiver`
- `referrerId` (string, optional) — To filter by the referrer ID
- `referrerIdType` (enum, optional) — Type of ID specified in referrerId. Use together with `referrerId` to filter based on referrer.
  - Allowed values: `mcr`, `nric`, `email`, `brightUserId`, `dcr`
- `patientUin` (string, optional) — To filter by the patient UIN
- `hciCode` (string, optional) — To identify the requesting institution
- `institutionId` (string, optional) — To filter by the requesting institution

## Response

### 200

- `data` (list of ReferralDto, required)
- `metadata` (PaginationMetadata, required)

## Errors

### 401 Unauthorized Error

Invalid authorization header.

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

## Types

### ReferralDto

- `id` (string, required)
- `sender` (InstitutionCoreDto, required)
- `senderSystem` (enum, required)
  - Allowed values: `HAS`, `PartnersBuddy`, `Refer`, `EmailAck`, `Bright`, `FYI`, `AAC`, `GPConnect`, `CLINICASSIST`, `LINKDOCTORS`, `GALENHEALTH`, `GPCONNECT`, `VANDACMS`, `MANADR`, `PLATO`, `RAFFLESMG`, `RUBICON`, `SGIMED`, `UNITEDCREST`, `IAPPS`, `UNOTECH`, `ZANDEN`, `SCGINTERNAL`
- `offering` (OfferingDto, required)
- `patient` (GetReferralPatientDto, required)
- `referringDoctor` (ReferringDoctorDto, required)
- `isSubsidised` (boolean, required)
- `isUrgent` (boolean, required)
- `createdAt` (string, required) — Created at (ISO datetime)
- `updatedAt` (string, required) — Updated at (ISO datetime)
- `formResponses` (list of FormResponse, required)
- `attachments` (list of AttachmentDto, required)
- `status` (enum, required)
  - Allowed values: `draft`, `created`, `processing-has`, `processing-pb`, `processing-ea`, `processing-bright`, `processing-fyi`, `pending-singhealth-formsg`, `pending-singhealth-call-centre`, `referral-confirmed-pending-appt`, `pending-email-ack`, `submitted-to-bright`, `pending-amend-timeslot`, `confirmed`, `sent`, `rejected`, `failed`, `pending-cancelled`, `cancelled`
- `notes` (list of NoteDto, required)
- `forms` (list of Form, optional) — List of forms required to complete the referral
- `url` (string, optional) — URL to view the referral
- `clinicLicenseNumber` (string, optional) — Clinic license number
- `clinicType` (enum, optional) — Clinic type
  - Allowed values: `CHAS-only`, `CHAS and HSG`
- `clinicalInfo` (string, optional) — Any clinical information that is relevant to the referral, e.g. medical history, drug allergies, treatment provided, etc.
- `timeslotStartAt` (string, optional) — Timeslot start time (ISO datetime)
- `appointmentLocation` (string, optional) — Appointment location

### PaginationMetadata

- `hasNext` (boolean, required)
- `totalCount` (double, required)
- `nextParams` (PaginatedQuery, optional)

### InstitutionCoreDto

- `hciCode` (string, required)
- `name` (string, required)
- `block` (string, required)
- `streetName` (string, required)
- `buildingName` (string, required, nullable)
- `floorNumber` (string, required, nullable)
- `unitNumber` (string, required, nullable)
- `postalCode` (string, required)

### OfferingDto

- `id` (string, required)
- `name` (string, required) — Name of the offering - use these as labels
- `institutionHciCode` (string, required)
- `institution` (InstitutionCoreDto, required)
- `system` (enum, required)
  - Allowed values: `HAS`, `PartnersBuddy`, `Refer`, `EmailAck`, `Bright`, `FYI`, `AAC`, `GPConnect`, `CLINICASSIST`, `LINKDOCTORS`, `GALENHEALTH`, `GPCONNECT`, `VANDACMS`, `MANADR`, `PLATO`, `RAFFLESMG`, `RUBICON`, `SGIMED`, `UNITEDCREST`, `IAPPS`, `UNOTECH`, `ZANDEN`, `SCGINTERNAL`
- `description` (string, required) — Clinical guidelines and other information which clinicians should read before proceeding with creating the referral. May contain URLs - should be rendered in a Linkify component
- `isActive` (boolean, required) — Whether the offering is able to receive new referrals currently
- `isSubsidisable` (boolean, required) — Whether this offering supports subsidized referrals.
- `timeslotPolicy` (enum, required) — How timeslots are handled for this offering. Is enforced at validation. timeslot-required: Timeslots must be selected when creating a referral. optional-timeslots-and-urgentable: Timeslots are selectable but optional. If no timeslot is selected, the referral will be routed to a manual call-centre for scheduling. If you indicate `isUrgent: true`, the timeslot will be disregarded and referral will be sent to the call-centre for triage. no-timeslots: Timeslots are not selectable for this offering. Calling the timeslot API will return an error.
  - Allowed values: `timeslot-required`, `optional-timeslots-and-urgentable`, `no-timeslots`
- `category` (enum, optional) — Category of the offering. Used to group offerings together.
  - Allowed values: `aac`

### GetReferralPatientDto

- `uin` (string, required) — Patient UIN, e.g. NRIC or FIN
- `name` (string, required) — Patient name
- `phoneNumber` (string, required) — Patient phone number - only Singaporean accepted for now
- `dob` (string, required) — Patient date of birth
- `gender` (enum, required) — Patient gender
  - Allowed values: `Male`, `Female`
- `chasStatus` (string, required, nullable) — Current CHAS status
- `address` (CreateAddressReq, optional)
- `residentialStatus` (enum, optional) — Patient residential status
  - Allowed values: `SC`, `PR`, `Foreigner`
- `isHsgEnrolled` (boolean, optional) — Patient Healthier SG (HSG) enrolment status

### ReferringDoctorDto

- `mcr` (string, required)
- `idType` (enum, required) — Type of ID specified in referrerId.
  - Allowed values: `mcr`, `nric`, `email`, `brightUserId`, `dcr`
- `name` (string, required)
- `email` (string, required)
- `contactNumber` (string, required)

### FormResponse

- `question` (string, required)
- `id` (string, required)
- `answer` (FormResponseAnswer, required)

### AttachmentDto

- `url` (string, required)
- `name` (string, required) — Human readable - include extension

### NoteDto

- `id` (string, required)
- `content` (string, required)
- `authorHciCode` (string, required)
- `authorName` (string, required)
- `createdAt` (double, required)
- `updatedAt` (double, required)

### Form

- `id` (string, required)
- `url` (string, required)
- `description` (string, required)
- `isFilled` (boolean, required)
- `formResponses` (list of FormResponse, required)
- `fields` (list of FormFieldsItems, optional)
- `version` (double, optional)
- `migrated` (boolean, optional)

### PaginatedQuery

- `offset` (double, optional, default: 0) — Offset for pagination
- `pageSize` (double, optional, default: 10) — Number of items per page

### CreateAddressReq

- `postalCode` (string, required) — Patient postal code
- `block` (string, required) — Patient address block number
- `streetName` (string, required) — Patient address street name
- `floorNumber` (string, required) — Patient address floor number
- `unitNumber` (string, required) — Patient address unit number

### FormResponseAnswer

- string
- list of string
- double

### FormFieldsItems

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "string",
      "sender": {
        "hciCode": "string",
        "name": "string",
        "block": "string",
        "streetName": "string",
        "buildingName": "string",
        "floorNumber": "string",
        "unitNumber": "string",
        "postalCode": "string"
      },
      "senderSystem": "HAS",
      "offering": {
        "id": "string",
        "name": "string",
        "institutionHciCode": "string",
        "institution": {
          "hciCode": "string",
          "name": "string",
          "block": "string",
          "streetName": "string",
          "buildingName": "string",
          "floorNumber": "string",
          "unitNumber": "string",
          "postalCode": "string"
        },
        "system": "HAS",
        "description": "Before proceeding with your referral, please refer to the guidelines of referrals to this SOC. https://go.gov.sg/refx-nuhs-gastro-guidelines",
        "isActive": true,
        "isSubsidisable": true,
        "timeslotPolicy": "timeslot-required",
        "category": "aac"
      },
      "patient": {
        "uin": "string",
        "name": "string",
        "phoneNumber": "91234567",
        "dob": "1990-01-01",
        "gender": "Male",
        "chasStatus": "string",
        "address": {
          "postalCode": "string",
          "block": "string",
          "streetName": "string",
          "floorNumber": "string",
          "unitNumber": "string"
        },
        "residentialStatus": "SC",
        "isHsgEnrolled": true
      },
      "referringDoctor": {
        "mcr": "string",
        "idType": "mcr",
        "name": "string",
        "email": "string",
        "contactNumber": "string"
      },
      "isSubsidised": true,
      "isUrgent": true,
      "createdAt": "2024-05-01T00:00:00Z",
      "updatedAt": "2024-05-01T00:00:00Z",
      "formResponses": [
        {
          "question": "string",
          "id": "string",
          "answer": "string"
        }
      ],
      "attachments": [
        {
          "url": "string",
          "name": "ecg-report.png"
        }
      ],
      "status": "draft",
      "notes": [
        {
          "id": "string",
          "content": "string",
          "authorHciCode": "string",
          "authorName": "string",
          "createdAt": 1.1,
          "updatedAt": 1.1
        }
      ],
      "forms": [
        {
          "id": "string",
          "url": "string",
          "description": "string",
          "isFilled": true,
          "formResponses": [
            {
              "question": "string",
              "id": "string",
              "answer": "string"
            }
          ],
          "fields": [
            {}
          ],
          "version": 1.1,
          "migrated": true
        }
      ],
      "url": "string",
      "clinicLicenseNumber": "string",
      "clinicType": "CHAS-only",
      "clinicalInfo": "string",
      "timeslotStartAt": "2024-05-01T00:00:00Z",
      "appointmentLocation": "string"
    }
  ],
  "metadata": {
    "hasNext": true,
    "totalCount": 1.1,
    "nextParams": {
      "offset": 0,
      "pageSize": 10
    }
  }
}
```

**SDK Code**

```python
import requests

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

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

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

print(response.json())
```

```javascript
const url = 'https://dummy-url-see-smartcms-spec/api/v1/referrals';
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/referrals"

	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/referrals")

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/referrals")
  .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/referrals', [
  'headers' => [
    'Authorization' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://dummy-url-see-smartcms-spec/api/v1/referrals");
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/referrals")! 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()
```