# rounds

Source: https://developers.newjune.co/api-reference/rounds

> A round of golf you played or set up.

A round of golf you played or set up.

Scope: `rounds:read`. Base URL: `https://data.newjune.co`.

A round is the root of your data. Hole scores, shots, reports, and evaluations point back to it with round_id.

## Endpoints

- `GET /v1/rounds`: List rounds
- `GET /v1/rounds/{id}`: Get a round

Responses carry `Request-Id`, `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset`, and a `429` adds `Retry-After`. See [Headers](https://developers.newjune.co/conventions#headers).

## The round object

| Field | Type | Description |
| --- | --- | --- |
| `object` | string | Always "round". |
| `id` | string | Unique id of the round. |
| `status` | string | Where the round is in its life. One of: `scheduled`, `in_progress`, `paused`, `completed`, `cancelled`. |
| `started_at` | string (timestamp) | When the round started. |
| `ended_at` | string (timestamp) or null | When the round ended. Null while it is still going. |
| `timezone` | string or null | IANA time zone where the round was played, when known. |
| `play_mode` | string | Standard rounds are analyzed after you play. Casual rounds are played for fun and are not analyzed. One of: `standard`, `casual`. |
| `holes_planned` | integer or null | How many holes the round was set up for (9 or 18), when known. |
| `holes_scored` | integer | Holes with a score entered. |
| `total_strokes` | integer or null | Sum of hole scores entered so far. Null when no hole has a score. |
| `par_total` | integer or null | Par of the holes scored so far, from the round scorecard or the course. Null when no hole has a score or any scored hole has no known par. |
| `score_to_par` | integer or null | The total_strokes value minus par_total. Null when either is null. |
| `course` | object or null | The course the round was played on. Null when the course is not available to you. |
| `course.id` | string | Unique id of the course. |
| `course.name` | string | Course name. |
| `course.facility_name` | string | Name of the club or facility. |
| `course.city` | string or null | City, when known. |
| `course.state_province` | string or null | State or province, when known. |
| `course.country` | string or null | Country, when known. |
| `tee` | object or null | The tee played from. Null when not chosen. |
| `tee.id` | string | Unique id of the tee. |
| `tee.name` | string | Tee name as shown on the card. |
| `created_at` | string (timestamp) | When the round was created. |
| `updated_at` | string (timestamp) | When the round itself was last changed: its status, times, course, tee, scorecard, or other round details, including some the API does not show. Entering or editing hole scores does not change it, even though holes_scored, total_strokes, par_total, and score_to_par change with them. |

Example round:

```json
{
  "object": "round",
  "id": "498fe851-9796-4fcb-abbe-95e3a176e444",
  "status": "completed",
  "started_at": "2026-06-14T15:02:11.000Z",
  "ended_at": "2026-06-14T19:08:40.000Z",
  "timezone": "America/Los_Angeles",
  "play_mode": "standard",
  "holes_planned": 18,
  "holes_scored": 18,
  "total_strokes": 87,
  "par_total": 72,
  "score_to_par": 15,
  "course": {
    "id": "f5a90a93-88b7-4aea-99a4-8aee6cbe414f",
    "name": "Ridge Course",
    "facility_name": "Larkspur Ridge Golf Club",
    "city": "Bend",
    "state_province": "OR",
    "country": "US"
  },
  "tee": {
    "id": "c92eb9f5-2a8c-4c12-b470-b87d90a6bcd3",
    "name": "Blue"
  },
  "created_at": "2026-06-14T14:58:30.000Z",
  "updated_at": "2026-06-14T19:21:05.000Z"
}
```

### List rounds

`GET /v1/rounds`

Your rounds, newest first: ordered by started_at descending, then id descending. Test rounds are not included. With updated_after, only rounds whose own updated_at is later; hole score changes do not move a round's updated_at. Needs a key with the rounds:read scope.

Scope: `rounds:read`. Operation id: `listRounds`.

#### Query parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | integer | no | How many items to return, 1 to 100. Defaults to 25. |
| `cursor` | string | no | The next_cursor value from the previous page, passed back unchanged with the same filters. |
| `status` | string | no | Only rounds with this status. One of: `scheduled`, `in_progress`, `paused`, `completed`, `cancelled`. |
| `started_after` | string (timestamp) | no | Only rounds that started at or after this time (ISO 8601, with Z or an offset). |
| `started_before` | string (timestamp) | no | Only rounds that started before this time (ISO 8601, with Z or an offset). |
| `updated_after` | string (timestamp) | no | Only rounds whose own updated_at is strictly after this time (ISO 8601, with Z or an offset). Use it to sync changes since your last run; the list order does not change. A round's updated_at does not move when its hole scores change, so sync hole scores with their own updated_after filter. |

#### Example request

curl:

```bash
curl "https://data.newjune.co/v1/rounds" \
  -H "Authorization: Bearer $NEW_JUNE_API_KEY"
```

TypeScript:

```ts
const response = await fetch('https://data.newjune.co/v1/rounds', {
  headers: { Authorization: `Bearer ${process.env.NEW_JUNE_API_KEY}` },
});
const body = await response.json();
console.log(body);
```

Python:

```python
import os
import requests

response = requests.get(
    "https://data.newjune.co/v1/rounds",
    headers={"Authorization": f"Bearer {os.environ['NEW_JUNE_API_KEY']}"},
    timeout=30,
)
print(response.json())
```

#### Responses

- `200`: A page of results.
- `400`: A query parameter is unknown, missing, or has an invalid value.
- `401`: The API key is missing, not valid, revoked, or expired.
- `403`: The key lacks the scope this endpoint needs, or the account is suspended.
- `429`: Too many requests. See the RateLimit and Retry-After headers.
- `500`: Something went wrong on our side.
- `503`: The API is temporarily unavailable.

### Get a round

`GET /v1/rounds/{id}`

One of your rounds by id. Needs a key with the rounds:read scope.

Scope: `rounds:read`. Operation id: `getRound`.

#### Path parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | The round's id. |

#### Example request

curl:

```bash
curl "https://data.newjune.co/v1/rounds/498fe851-9796-4fcb-abbe-95e3a176e444" \
  -H "Authorization: Bearer $NEW_JUNE_API_KEY"
```

TypeScript:

```ts
const response = await fetch('https://data.newjune.co/v1/rounds/498fe851-9796-4fcb-abbe-95e3a176e444', {
  headers: { Authorization: `Bearer ${process.env.NEW_JUNE_API_KEY}` },
});
const body = await response.json();
console.log(body);
```

Python:

```python
import os
import requests

response = requests.get(
    "https://data.newjune.co/v1/rounds/498fe851-9796-4fcb-abbe-95e3a176e444",
    headers={"Authorization": f"Bearer {os.environ['NEW_JUNE_API_KEY']}"},
    timeout=30,
)
print(response.json())
```

#### Responses

- `200`: The item.
- `401`: The API key is missing, not valid, revoked, or expired.
- `403`: The key lacks the scope this endpoint needs, or the account is suspended.
- `404`: No such resource for this account.
- `429`: Too many requests. See the RateLimit and Retry-After headers.
- `500`: Something went wrong on our side.
- `503`: The API is temporarily unavailable.
