API v2

Status: Preview. Parkdly turns API v2 on for each app: ask us to enable it for yours.

API v2 serves the version of a course the club published, not the course as it is being edited. A club can work on its course for weeks; your app sees the change only when the club presses Publish. Each publish is a new version with a number: 1, 2, 3, and so on.

API v1 does not change. It keeps the same answers and still reads the live course.

Authentication

API v2 uses one token for your app, not one per club. Ask for it with your app's credentials:

POST https://parkdly.com/oauth/token
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials&client_id={client_id}&client_secret={client_secret}
{
  "access_token": "eyJhbGciOi...",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "read"
}

Send it on every request, and ask for a new one when it expires:

Authorization: Bearer {access_token}

With this token, a club's link to your app is the permission: you read every course a club has linked to your app. A user's v1 token does not work on v2, and the app token does not work on v1.

An app that Parkdly has not turned v2 on for gets 400 unauthorized_client.

Versions

  • Your app reads the last published version of a course. Edits after it reach your app only with the next publish.
  • Each version has a number that only goes up, and a publishedAt time. Store the number: when a webhook brings a higher one, read the course again.
  • Ids stay the same across versions. A course, layout or hole keeps its id from one version to the next, so you can match them with what you stored. A hole deleted after a publish keeps its id in v2 until the club publishes again.
  • You get the layouts the club shares with your app, each with its own hole numbers, par and length.

Errors

Errors have the same format as in v1: { "error": "<code>", "message": "..." }. Your app can tell these apart:

StatuserrorWhat it means
401unauthorizedNo app token, an expired one, or a user's v1 token.
404not_connectedThe course is not linked to your app, or the club disconnected your app.
409not_publishedThe course is linked to your app, but the club has not published it yet.
410course_deletedThe club deleted the course. It can still restore it for 30 days. After that the course answers 404.
400invalid_limitlimit is not a whole number from 1 to 100.
400invalid_cursorcursor is not a nextCursor this API gave out.
400invalid_requestThe request body is not valid JSON, or a field is missing.
400invalid_return_urlreturnUrl is not exactly one of your app's redirect URIs.
404session_not_foundNo connect session with that id for your app.
429rate_limit_exceededSee Rate Limits.

Webhooks

For an app on API v2, course.published carries the version, not the course. Read the course with GET /api/v2/courses/:courseId.

{
  "event": "course.published",
  "timestamp": "2026-11-09T12:00:00.000Z",
  "courseId": "clx123abc",
  "externalCourseId": "your-course-id",
  "version": { "number": 4, "publishedAt": "2026-11-09T12:00:00.000Z" }
}

course.deleted carries no course either, so you never see edits the club did not publish:

{
  "event": "course.deleted",
  "timestamp": "2026-11-09T12:00:00.000Z",
  "courseId": "clx123abc",
  "externalCourseId": "your-course-id"
}

course.connected tells you which course the club connected, or moved your link to. version is null for a new course the club still has to map; you get course.published once it publishes.

{
  "event": "course.connected",
  "timestamp": "2026-11-09T12:00:00.000Z",
  "courseId": "clx123abc",
  "externalCourseId": "your-course-id",
  "layoutIds": ["clxlayout1"],
  "version": { "number": 1, "publishedAt": "2026-11-09T12:00:00.000Z" }
}

course.disconnected says the link is gone; the course reads not_connected from now on. by is club or app. When the club moves your link to another course, you get course.disconnected for the old course and course.connected for the new one, with the same externalCourseId.

{
  "event": "course.disconnected",
  "timestamp": "2026-11-09T12:00:00.000Z",
  "courseId": "clx123abc",
  "externalCourseId": "your-course-id",
  "by": "club"
}

Headers, signatures, retries and when course.deleted is sent are as in Webhooks.

Next Steps