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

# Get the recommended offering for a category based on postal code

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

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

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

- `category` (enum, required) — Offering category to retrieve recommendation for
  - Allowed values: `aac`
- `postalCode` (string, required) — Postal code of the patient to retrieve recommendation for

## Response

### 200

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

## Errors

### 401 Unauthorized Error

Invalid authorization header.

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

### 404 Not Found Error

No recommended offering found.

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

## Types

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

## Examples

**Response**

```json
{
  "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"
}
```

**SDK Code**

```python
import requests

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

querystring = {"category":"aac","postalCode":"postalCode"}

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/offerings/recommended?category=aac&postalCode=postalCode';
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/offerings/recommended?category=aac&postalCode=postalCode"

	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/offerings/recommended?category=aac&postalCode=postalCode")

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/offerings/recommended?category=aac&postalCode=postalCode")
  .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/offerings/recommended?category=aac&postalCode=postalCode', [
  'headers' => [
    'Authorization' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://dummy-url-see-smartcms-spec/api/v1/offerings/recommended?category=aac&postalCode=postalCode");
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/offerings/recommended?category=aac&postalCode=postalCode")! 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()
```