Competitions
GEThttps://myswimmingclub.uk/api/competitions
Get information about all competitions.
Request
Header Parameters
X-Tenant integerrequired
The Tenant ID you are making the request for. You can find your Tenant ID by going to the /about
page in the membership system. If you already have an access token for a user, you can find their Tenant ID by making a request to the /api/userinfo
endpoint.
Responses
- 200
- 401
- 403
Paginated set of Competition
- application/json
- Schema
- Example (auto)
Schema
data object[]required
meta objectrequired
links objectrequired
{
"data": [
{
"id": 0,
"name": "string",
"venue_id": 0,
"venue": {
"id": 0,
"name": "string",
"description": "string",
"longitude": "string",
"latitude": "string",
"address_components": [
null
],
"html_attributions": [
null
]
},
"sessions": [
{
"id": 0,
"competition_id": 0,
"name": "string",
"start_time": "2024-07-29T15:51:28.071Z",
"end_time": "2024-07-29T15:51:28.071Z",
"venue": {
"id": 0,
"name": "string",
"description": "string",
"longitude": "string",
"latitude": "string",
"address_components": [
null
],
"html_attributions": [
null
]
},
"events": [
{
"id": 0,
"name": "string",
"category": "open",
"distance": 0,
"stroke": "individual_medley",
"units": "metres",
"ages": [
null
],
"event_code": 1,
"entry_fee": 0,
"processing_fee": 0,
"entrant_type": "I",
"round": "H"
}
]
}
],
"status": "draft",
"public": true,
"processing_fee": 0,
"default_entry_fee": 0,
"files": [
{
"id": "string",
"public_name": "string",
"competition_id": 0,
"sequence": 0,
"original_name": "string",
"mime_type": "string",
"size": 0,
"public": true,
"download_link": "string"
}
],
"member_list_generated": true
}
],
"meta": {
"current_page": 0,
"last_page": 0,
"links": [
{
"label": "string",
"active": true
}
],
"per_page": 0,
"total": 0
},
"links": {}
}
Unauthenticated
- application/json
- Schema
- Example (auto)
Schema
messagestringrequired
Error overview.
{
"message": "string"
}
Authorization error
- application/json
- Schema
- Example (auto)
Schema
messagestringrequired
Error overview.
{
"message": "string"
}
Authorization: http
name: httptype: httpscheme: bearerbearerFormat: JWT
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://myswimmingclub.uk/api/competitions");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear