New JuneDevelopers
API reference

hole_scores

Your score on one hole of a round.

View .md
EndpointsScope rounds:read
  • GET/v1/hole_scoresList hole scores
  • GET/v1/hole_scores/{id}Get a hole score

Each hole score belongs to one round. List them for one round with round_id, or across rounds with updated_after.

The hole score object

FieldTypeDescription
objectstringAlways "hole_score".
idstringUnique id of the hole score.
round_idstringThe round this score belongs to.
hole_numberintegerHole number on the course, from 1.
strokesinteger or nullStrokes taken on the hole. Null when not entered yet.
puttsinteger or nullPutts taken, when entered.
fairway_hitboolean or nullWhether the tee shot finished in the fairway. Null when not recorded or on a par 3.
green_in_regulationboolean or nullWhether the green was reached in regulation, when recorded.
penalty_strokesinteger or nullPenalty strokes on the hole, when entered.
parinteger or nullPar of the hole, from the round scorecard when it has one, otherwise the course. Null when unknown.
yardage_yardsinteger or nullLength of the hole from the tee the round was played from, in yards. Null when unknown.
created_atstring (timestamp)When the score was first entered.
updated_atstring (timestamp)When the score was last changed. Par and yardage come from the scorecard or course, so a change to them does not move it.

Example hole score:

{
  "object": "hole_score",
  "id": "aa311280-73b2-4a0b-8458-ced896a87627",
  "round_id": "498fe851-9796-4fcb-abbe-95e3a176e444",
  "hole_number": 7,
  "strokes": 5,
  "putts": 2,
  "fairway_hit": true,
  "green_in_regulation": false,
  "penalty_strokes": 0,
  "par": 4,
  "yardage_yards": 385,
  "created_at": "2026-06-14T16:41:27.000Z",
  "updated_at": "2026-06-14T19:12:09.000Z"
}

Endpoints

Responses carry Request-Id, RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset, and a 429 adds Retry-After. See Headers.

List hole scores

The scores you entered, ordered by hole_number ascending, then id ascending. Pass round_id for one round, updated_after for scores changed since a time, or both; at least one is required. Scores from test rounds are not included. Needs a key with the rounds:read scope.

GET/v1/hole_scores
AuthorizationBearer <token>

A personal API key (nj_live_...), sent as a bearer token. Create one on the Developer page at https://newjune.co/golf/developer. The scopes listed on each operation are the key scopes it needs.

In: header

Scope: rounds:read

Query Parameters

limit?integer

How many items to return, 1 to 100. Defaults to 25.

Default25
Range1 <= value <= 100
cursor?string

The next_cursor value from the previous page, passed back unchanged with the same filters.

round_id?string

Only hole scores from this round. Either round_id or updated_after is required.

Formatuuid
updated_after?string

Only hole scores 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. Either round_id or updated_after is required. Without round_id, scores from every round come back in the same order (hole_number, then id).

Formatdate-time

Response Body

curl "https://data.newjune.co/v1/hole_scores" \
  -H "Authorization: Bearer $NEW_JUNE_API_KEY"
{
  "object": "list",
  "data": [
    {
      "object": "hole_score",
      "id": "aa311280-73b2-4a0b-8458-ced896a87627",
      "round_id": "498fe851-9796-4fcb-abbe-95e3a176e444",
      "hole_number": 7,
      "strokes": 5,
      "putts": 2,
      "fairway_hit": true,
      "green_in_regulation": false,
      "penalty_strokes": 0,
      "par": 4,
      "yardage_yards": 385,
      "created_at": "2026-06-14T16:41:27.000Z",
      "updated_at": "2026-06-14T19:12:09.000Z"
    }
  ],
  "has_more": true,
  "next_cursor": "eyJ2IjoxLCJrIjpbIjciLCJhYTMxMTI4MC03M2IyLTRhMGItODQ1OC1jZWQ4OTZhODc2MjciXX0"
}

{
  "error": {
    "type": "invalid_request_error",
    "code": "invalid_cursor",
    "message": "The cursor is not valid. Use the next_cursor value from a previous response.",
    "param": "cursor",
    "request_id": "req_5f0c6e2a9b1d4c7e8f3a2b10",
    "doc_url": "https://developers.newjune.co/errors#invalid_cursor"
  }
}

{
  "error": {
    "type": "authentication_error",
    "code": "api_key_expired",
    "message": "This API key has expired. Create a new key on the Developer page at newjune.co/golf/developer.",
    "param": null,
    "request_id": "req_5f0c6e2a9b1d4c7e8f3a2b10",
    "doc_url": "https://developers.newjune.co/errors#api_key_expired"
  }
}

{
  "error": {
    "type": "permission_error",
    "code": "account_suspended",
    "message": "API access is suspended for this account.",
    "param": null,
    "request_id": "req_5f0c6e2a9b1d4c7e8f3a2b10",
    "doc_url": "https://developers.newjune.co/errors#account_suspended"
  }
}

{
  "error": {
    "type": "rate_limit_error",
    "code": "daily_limit_exceeded",
    "message": "This account has reached its daily request limit. It resets at midnight UTC.",
    "param": null,
    "request_id": "req_5f0c6e2a9b1d4c7e8f3a2b10",
    "doc_url": "https://developers.newjune.co/errors#daily_limit_exceeded"
  }
}

{
  "error": {
    "type": "api_error",
    "code": "internal_error",
    "message": "Something went wrong on our side. Try again later.",
    "param": null,
    "request_id": "req_5f0c6e2a9b1d4c7e8f3a2b10",
    "doc_url": "https://developers.newjune.co/errors#internal_error"
  }
}

{
  "error": {
    "type": "api_error",
    "code": "service_unavailable",
    "message": "The API is temporarily unavailable. Try again later.",
    "param": null,
    "request_id": "req_5f0c6e2a9b1d4c7e8f3a2b10",
    "doc_url": "https://developers.newjune.co/errors#service_unavailable"
  }
}

Get a hole score

One hole score by id. Needs a key with the rounds:read scope.

GET/v1/hole_scores/{id}
AuthorizationBearer <token>

A personal API key (nj_live_...), sent as a bearer token. Create one on the Developer page at https://newjune.co/golf/developer. The scopes listed on each operation are the key scopes it needs.

In: header

Scope: rounds:read

Path Parameters

idstring

The hole score's id.

Response Body

curl "https://data.newjune.co/v1/hole_scores/aa311280-73b2-4a0b-8458-ced896a87627" \
  -H "Authorization: Bearer $NEW_JUNE_API_KEY"
{
  "object": "hole_score",
  "id": "aa311280-73b2-4a0b-8458-ced896a87627",
  "round_id": "498fe851-9796-4fcb-abbe-95e3a176e444",
  "hole_number": 7,
  "strokes": 5,
  "putts": 2,
  "fairway_hit": true,
  "green_in_regulation": false,
  "penalty_strokes": 0,
  "par": 4,
  "yardage_yards": 385,
  "created_at": "2026-06-14T16:41:27.000Z",
  "updated_at": "2026-06-14T19:12:09.000Z"
}

{
  "error": {
    "type": "authentication_error",
    "code": "api_key_expired",
    "message": "This API key has expired. Create a new key on the Developer page at newjune.co/golf/developer.",
    "param": null,
    "request_id": "req_5f0c6e2a9b1d4c7e8f3a2b10",
    "doc_url": "https://developers.newjune.co/errors#api_key_expired"
  }
}

{
  "error": {
    "type": "permission_error",
    "code": "account_suspended",
    "message": "API access is suspended for this account.",
    "param": null,
    "request_id": "req_5f0c6e2a9b1d4c7e8f3a2b10",
    "doc_url": "https://developers.newjune.co/errors#account_suspended"
  }
}

{
  "error": {
    "type": "not_found_error",
    "code": "resource_not_found",
    "message": "No such hole score.",
    "param": null,
    "request_id": "req_5f0c6e2a9b1d4c7e8f3a2b10",
    "doc_url": "https://developers.newjune.co/errors#resource_not_found"
  }
}

{
  "error": {
    "type": "rate_limit_error",
    "code": "daily_limit_exceeded",
    "message": "This account has reached its daily request limit. It resets at midnight UTC.",
    "param": null,
    "request_id": "req_5f0c6e2a9b1d4c7e8f3a2b10",
    "doc_url": "https://developers.newjune.co/errors#daily_limit_exceeded"
  }
}

{
  "error": {
    "type": "api_error",
    "code": "internal_error",
    "message": "Something went wrong on our side. Try again later.",
    "param": null,
    "request_id": "req_5f0c6e2a9b1d4c7e8f3a2b10",
    "doc_url": "https://developers.newjune.co/errors#internal_error"
  }
}

{
  "error": {
    "type": "api_error",
    "code": "service_unavailable",
    "message": "The API is temporarily unavailable. Try again later.",
    "param": null,
    "request_id": "req_5f0c6e2a9b1d4c7e8f3a2b10",
    "doc_url": "https://developers.newjune.co/errors#service_unavailable"
  }
}