5.5: Retrieve a Tee Time Calendar
In this section, we will guide you through the process of retrieving tee time availability and pricing for a range of dates for a specific course using the Golfdigg OTA API.
5.5.1: Endpoint
To retrieve a tee time calendar, you will use the following endpoint:
- Endpoint:
/api/v1/ext/tee-time/calendar - Method: GET
5.5.2: Request Parameters
In your API request, include the following:
Authorization(Header): Use Basic Authentication with your API credentials.
| Parameter | Type | Required | Description |
|---|---|---|---|
courseId | string | Yes | Identifier of the golf course to retrieve the calendar for. |
from | string | Yes | Start date of the calendar range in YYYY-MM-DD format. |
to | string | Yes | End date of the calendar range in YYYY-MM-DD format. |
5.5.3: Response Format
This API returns a list of daily tee time summaries within the specified date range.
Here's the response format:
interface TeeTimeCalendarEntry {
date: string; // Date in YYYY-MM-DD format
price: number; // Lowest available price for the date
count: number; // Number of available tee times for the date
}
type TeeTimeCalendarResponse = TeeTimeCalendarEntry[];
| Field | Type | Description |
|---|---|---|
date | string | The date in YYYY-MM-DD format. |
price | int64 | The lowest available tee time price for that date. |
count | int64 | The number of available tee time slots for that date. |
5.5.4: Request Example
Here's an example of how to structure your API request to retrieve a tee time calendar:
GET /api/v1/ext/tee-time/calendar?courseId=5c9c8252ef0ab53dcf12e8d2&from=2026-04-21&to=2026-04-24
Host: ota-api.golfdigg.com
Authorization: Basic base64_encoded(apiKey)
Replace courseId, from, and to with the actual course ID and date range you want to query.
5.5.5: Response Example
The API will respond with a list of calendar entries for each date in the specified range. Here's a sample response:
[
{
"date": "2026-04-21",
"price": 120000,
"count": 12
},
{
"date": "2026-04-22",
"price": 120000,
"count": 12
},
{
"date": "2026-04-23",
"price": 120000,
"count": 12
},
{
"date": "2026-04-24",
"price": 120000,
"count": 11
}
]
Note: Dates with no available tee times will be omitted from the response. If the entire range has no availability, an empty array
[]will be returned.