> This page is for version 0.0.64.
> 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 5 timeslots for a referral destination

GET https://dummy-url-see-smartcms-spec/api/v1/offerings/{offeringId}/timeslots

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

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

### Path parameters

- `offeringId` (string, required)

### Query parameters

- `from` (double, required)
- `isSubsidised` (boolean, optional, default: false)

## Response

### 200

- `list of Timeslot`

## Errors

### 401 Unauthorized Error

Invalid authorization header.

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

## Types

### Timeslot

- `from` (double, required) — Start time in milliseconds since epoch
- `to` (double, required) — End time in milliseconds since epoch
- `description` (string, optional) — Optional description of the timeslot

## Examples

**Response**

```json
[
  {
    "from": 1714857600000,
    "to": 1714861200000,
    "description": "Clinic H, BLK 3 L1 (Yellow Zone)"
  }
]
```

**SDK Code**

```python
import requests

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

querystring = {"from":"1.1"}

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/offeringId/timeslots?from=1.1';
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/offeringId/timeslots?from=1.1"

	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/offeringId/timeslots?from=1.1")

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/offeringId/timeslots?from=1.1")
  .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/offeringId/timeslots?from=1.1', [
  'headers' => [
    'Authorization' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

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