# Get event

# Get event

Full detail for one event: the same data its public event page renders, including its race list.

## Headers

| Header | Required | Value |
|---|---|---|
| `Authorization` | yes | `Bearer <access_token>` |

## Path parameters

| Param | Type | Note |
|---|---|---|
| `eventId` | UUID | from [List events](/docs/api/events); another club's id, a draft, or an unknown id is `404 EVENT_NOT_FOUND` (never 403) |

#### Request

```bash
curl -s https://sail-club-server.cloud.run/api/v1/events/1143117a-9c2b-4e7a-8f1d-2b6a9c4e7f10 \
  -H "Authorization: Bearer $TOKEN"
```

```javascript
const res = await fetch(`https://sail-club-server.cloud.run/api/v1/events/${eventId}`, {
  headers: { Authorization: `Bearer ${token}` },
});
if (res.status === 404) { /* unknown / not this club's / not published */ }
const event = await res.json();
```

```python
res = requests.get(
    f"https://sail-club-server.cloud.run/api/v1/events/{event_id}",
    headers={"Authorization": f"Bearer {token}"},
    timeout=10,
)
if res.status_code == 404:
    ...  # unknown / not this club's / not published
res.raise_for_status()
event = res.json()
```

```csharp
var res = await client.GetAsync($"/api/v1/events/{eventId}");
if (res.StatusCode == HttpStatusCode.NotFound) { /* unknown / not this club's / not published */ }
res.EnsureSuccessStatusCode();
var evt = await res.Content.ReadFromJsonAsync<PublicEventDetailDto>();
```

```php
<?php
$ch = curl_init("https://sail-club-server.cloud.run/api/v1/events/$eventId");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $token"],
]);
$event = json_decode(curl_exec($ch), true);
```

#### Response

```json
{
  "id": "1143117a-9c2b-4e7a-8f1d-2b6a9c4e7f10",
  "name": "Cup Regatta 2026",
  "logoUrl": "https://cdn.sailracing.club/clubs/TRX1001CL/logo.png",
  "location": "Datça Marina",
  "description": "Three-day fleet-racing regatta for ORC and one-design classes.",
  "startDate": "2026-10-11T09:00:00Z",
  "endDate": "2026-10-12T16:00:00Z",
  "registrationStart": "2026-08-01T00:00:00Z",
  "registrationEnd": "2026-10-05T23:59:00Z",
  "status": "Completed",
  "coverUrl": "https://cdn.sailracing.club/clubs/TRX1001CL/events/cup-regatta-2026/cover.jpg",
  "posterUrl": "https://cdn.sailracing.club/clubs/TRX1001CL/events/cup-regatta-2026/poster.jpg",
  "website": "https://example-club.org/cup-regatta-2026",
  "noticeOfRaceUrl": "https://example-club.org/cup-regatta-2026/nor.pdf",
  "resultsUrl": null,
  "liveTrackUrl": null,
  "instagram": "https://instagram.com/exampleclub",
  "whatsapp": "https://wa.me/905551234567",
  "isOfficial": true,
  "entryCount": 42,
  "type": "Regatta",
  "classes": ["ORC", "J/70"],
  "organizerId": "TRX1001CL",
  "organizer": { "id": "TRX1001CL", "name": "Example Sailing Club" },
  "coOrganizers": [],
  "races": [
    { "id": "9a1c0d2b-7e4a-46f8-9c1d-2e3f9a1c0d2b", "name": "Race 1", "scheduledDate": "2026-10-11T10:00:00Z",
      "status": "Completed", "hasResults": true, "resultCount": 42, "raceNo": 1 }
  ]
}
```

`200` — same caching headers as every data endpoint; see [Caching & freshness](/docs/caching).

## Response fields

Full field table: [Data models → Event detail](/docs/data-models#event-detail). `races[]` is the same shape
[List races](/docs/api/races) returns for this event.

## Errors

| HTTP | Code |
|---|---|
| 404 | [`EVENT_NOT_FOUND`](/docs/errors#EVENT_NOT_FOUND) |
| 401 | [`API_TOKEN_MISSING`](/docs/errors#API_TOKEN_MISSING) / [`API_TOKEN_INVALID`](/docs/errors#API_TOKEN_INVALID) |
| 403 | [`API_SCOPE_MISSING`](/docs/errors#API_SCOPE_MISSING) / [`API_IP_NOT_ALLOWED`](/docs/errors#API_IP_NOT_ALLOWED) |
| 429 | [`RATE_LIMIT_EXCEEDED`](/docs/errors#RATE_LIMIT_EXCEEDED) |
| 503 | [`API_UNAVAILABLE`](/docs/errors#API_UNAVAILABLE) |

## Caching

One entry per `eventId` in your cache; an event's detail rarely changes after it starts, so this is a very
cheap one to hold onto and revalidate with `If-None-Match` on your own schedule.

```prompt
Implement getEvent(eventId) for the Sail Club API.

GET https://sail-club-server.cloud.run/api/v1/events/{eventId}
Authorization: Bearer <access_token>

Success 200: the full event detail object (id, name, description, startDate/endDate, status, cover/poster
  URLs, website/noticeOfRaceUrl links, entryCount, races: [{ id, name, scheduledDate, status, hasResults,
  resultCount, raceNo, ... }], and more — fetch GET /api/v1/openapi.json for the exact schema, do not guess
  fields not listed there).
404 EVENT_NOT_FOUND: unknown id, another club's event, or not published — do not retry, treat as "not found".
401/403/429/503: same handling as every other call — see the full-integration prompt on /docs/overview.

Cache the response per eventId with its ETag; send If-None-Match on revalidation.

Adapt to your actual stack — the endpoint, path param and response shape above are language-neutral.
```
