API Documentation
The SwimClub Manager API allows you to create applications that can read/update information in your SCM account.
Each request to the Api must be authenticated with your Api token using an “Authorization-Token” header containing your token.
For Example:
POST https://api.swimclubmanager.co.uk/Members
Authorization-Token: 6846a9d9eadc4c8bbeae5a1b672309d1
Content-Type: application/json
{
"Firstname": "Joseph",
"Lastname": "Bloggs",
"KnownAs": "Jo",
...
}
When using the authentication token you do not require any additional password.
Important: You must treat your Api token as you would treat your login username and password. Anyone that has your Api token can post to the Api on your behalf! If you suspect someone has your Api token you can reset it via the “Setup > Club > Club Details” page link.
For POST requests, a content-type header of application/json must be included and the body of the request should be valid json in the same format as what is returned in a GET request.
GET requests are returned in pages of 100. Add a request header or querystring value of “Page = x” to request any page other than the first.
The number of API calls in a 24 hour period is limited to 5000. You can check your current rate limit status by looking at the “X-Ratelimit-Remaining” HTTP header which is returned in response to every API request.
Base API URL
The URL for the API is https://api.swimclubmanager.co.uk/ and then the URL for each method added onto the end.
Club Events
Overview
URL | /ClubEvents |
Methods Supported | POST, GET |
Description | Allows you to create or get club events in an SCM account |
Elements For Club Events
Guid | The club event unique id in the system (read only) |
EventTitle required | The title of the event (max length = 50) |
EventDetails | The details of the event (optional max length = 4000) |
EventStartDate required | The start date of the event (yyyy-mm-dd format) |
EventStartTime required | The start time of the event (24hr format) |
EventEndDate required | The end date of the event (yyyy-mm-dd format) |
EventEndTime required | The end time of the event (24hr format) |
BusProvided | Is a bus provided? (1 or 0) |
BusSeats | How many seats on the bus? (number) |
BusDepartureDate | The departure date of the bus (optional yyyy-mm-dd format) |
BusDepartureTime | The departure time of the bus (optional 24hr format) |
CalendarColour | The colour of the event on the club calendar (0, B, G, O, R, Y, Pu, Gr, Pi, N, T) |
EventVenue | The venue of the event (optional max length = 50) |
Address1 | The address line 1 of the event (optional max length = 50) |
Address2 | The address line 2 of the event (optional max length = 50) |
Address3 | The address line 3 of the event (optional max length = 50) |
Address4 | The address line 4 of the event (optional max length = 50) |
Postcode | The postcode of the event (optional max length = 50) |
Fee | The fee per event for swimmers (optional decimal) |
RelayFee | The fee per relay event for swimmers (optional decimal) |
Pool | The pool size optional (20m, 25m, 33m, 50m, OW) |
AgeOnDate | The age on date for the event (optional yyyy-mm-dd format) |
MeetCode | The meet code for the event (optional max length = 50) |
SessionNumber | The session number of the event (optional max length = 50) |
LicenceNumber | The licence number of the event (optional max length = 50) |
EntryCloseDate | The closing date for entries (optional yyyy-mm-dd format) |
SwimTimes | Any associated swim times for the event (read only) |
GET Club Event
To get a Club Event, use the following URL where {guid} is the Guid of the Club Event:
GET /ClubEvents/{guid}
Data Returned
When you GET a Club Event, the following JSON will be returned:
{
"Guid": "f6e21c87-1581-4aa6-a15a-791874b1eddf",
"EventTitle": "Club champs",
"EventDetails": "",
"EventStartDate": "2016-05-14",
"EventStartTime": "09:00",
"EventEndDate": "2016-05-14",
"EventEndTime": "19:00",
"SwimTimes":
[{
"Time": "00:28.65",
"Distance": "50m",
... },
...
]
...}
When you POST a new Club Event, the api will return a JSON object with the Club Event’s details.
Incident Book
Overview
URL | /IncidentBook |
Methods Supported | POST, GET |
Description | Allows you to create or get incidents in an SCM account |
Elements For Incidents
Guid | The incident unique id in the system (read only) |
IncidentTitle required | The title of the incident (max length = 50) |
IncidentDate required | The date of the incident (yyyy-mm-dd format) |
IncidentDetails | The details of the incident (optional max length = 4000) |
ProposedAction | The proposed action for the incident (optional max length = 4000) |
Status required | The status of the incident (Open, In Progress, On Hold, Closed) |
AddedBy required | The member that added the incident |
Comments | Any comments made to the incident (read only) |
GET Incident
To get an Incident, use the following URL where {guid} is the Guid of the Incident:
GET /IncidentBook/{guid}
Data Returned
When you GET an Incident, the following JSON will be returned:
{
"Guid": "f6e21c87-1581-4aa6-a15a-791874b1eddf",
"IncidentTitle": "Banged head on pool wall",
"IncidentDate": "2016-05-14",
"IncidentDetails": "...",
"ProposedAction": "...",
"Status": "Closed",
"AddedBy": [{
"Guid": "46C33DEC-3D26-4151-A8CE-38B152DE2A16",
"Firstname": "Joseph",
"KnownAs": "Jo",
"Lastname": "Bloggs"
}],
"Comments": [{
"DateAdded": "2016-05-14",
"Comment": "Sent email",
"Firstname": "Joseph",
"KnownAs": "Jo",
"Lastname": "Bloggs"
},...
]
...}
When you POST a new Incident, the api will return a JSON object with the Incident’s details.
Meets
Overview
URL | /Meets |
Methods Supported | GET |
Description | Allows you to get meets in an SCM account |
Elements For Meets
Guid | The meet unique id in the system (read only) |
MeetName | The name of the meet (max length = 50) |
Facility | The location of the meet (optional max length = 50) |
Type | The type of meet (Open Meet, Team Gala, Club Champs, Turn Up and Swim) |
StartDate | The start date of the meet (yyyy-mm-dd format) |
EndDate | The end date of the meet (yyyy-mm-dd format) |
AgeUpDate | The age up date of the meet (yyyy-mm-dd format) |
EligibilityDate | The eligibility date of the meet (yyyy-mm-dd format) |
EntryOpenDate | The entry open date of the meet (yyyy-mm-dd format) |
EntryDeadline | The entry deadline date of the meet (yyyy-mm-dd format) |
Street | The street address of the meet (optional max length = 50) |
Address2 | The address line 2 of the meet (optional max length = 50) |
City | The city of the meet (optional max length = 50) |
County | The county of the meet (optional max length = 50) |
PostCode | The post code of the meet (optional max length = 50) |
Country | The country of the meet (optional max length = 50) |
SwimTimesAdded | Swim times have been added (optional 1 or 0) |
SwimTimesVerified | Swim times have been verified (optional 1 or 0) |
SwimTimes | Any associated swim times for the meet (read only) |
GET Meet
To get a Meet, use the following URL where {guid} is the Guid of the Meet:
GET /Meets/{guid}
Data Returned
When you GET a Meet, the following JSON will be returned:
{
"Guid": "f6e21c87-1581-4aa6-a15a-791874b1eddf",
"MeetName": "Droitwich Champs",
"Facility": "Leisure Centre",
"Type": "Open Meet",
"StartDate": "2016-05-14",
"EndDate": "2016-05-14",
...
"SwimTimes": [{
"Time": "00:28.65",
"Distance": "50m",
...},
...
]
...}
Trial Requests
Overview
URL | /TrialRequests |
Methods Supported | POST, GET |
Description | Allows you to create or get trial requests in an SCM account |
Elements For Trial Requests
Guid | The trial request unique id in the system (read only) |
DateAdded | The read only date the trial request was added (yyyy-mm-dd format) |
FirstName required | The first name of the trial requester (max length = 50) |
LastName required | The last name of the trial requester (max length = 50) |
Dob required | The date of birth of the trial requester (yyyy-mm-dd format) |
Gender | The trial requester’s gender (M or F) |
The trial requester’s email address (max length = 50) | |
SwimmingExperience | The swimming experience of the trial requester (max length = 4000) |
GET Trial Request
To get a Trial Request, use the following URL where {guid} is the Guid of the Trial Request:
GET /TrialRequests/{guid}
Data Returned
When you GET a Trial Request, the following JSON will be returned:
{
"Guid": "f6e21c87-1581-4aa6-a15a-791874b1eddf",
"Firstname": "Jo",
"Lastname": "Bloggs",
"Dob": "1999-06-12",
"Email": "[email protected]",
...
}
When you POST a new Trial Request, the api will return a JSON object with the Trial Request’s details.
Members
Overview
URL | /Members |
Methods Supported | POST, GET, PUT, DELETE |
Description | Allows you to create (POST), get (GET), update (PUT) or archive (DELETE) members in an SCM account |
Elements For Members
Guid | The member’s unique id in the system (read only) |
MemberID | The member ID of the member (max length = 50) |
Firstname required | The first name of the member (max length = 50) |
KnownAs | The name the member is known as if different from Firstname (max length = 50) |
Lastname required | The last name of the member (max length = 50) |
PrimaryContactName | The primary contact for the member (max length = 50) |
RelationshipToMember | The relationship to the member (max length = 50) |
HomePhone | The members home phone number (max length = 50) |
MobilePhone | The member’s mobile phone number (max length = 50) |
The member’s email address (max length = 50) | |
DOB | The member’s date of birth (yyyy-mm-dd format) |
Gender | The member’s gender (M or F) |
Ethnicity | The me’mbers ethnicity Use ASA Ethnicity codes |
Address1 | The member’s address 1 (max length = 50) |
Address2 | The member’s address 2(max length = 50) |
Address3 | The member’s address 3 (max length = 50) |
Town | The member’s town (max length = 50) |
County | The members county (max length = 50) |
Postcode | The member’s postcode (max length = 50) |
EmergencyContactPerson1 | The member’s emergency contact person 1 (max length = 50) |
EmergencyContactPhone1 | The member’s emergency contact phone 1 (max length = 50) |
EmergencyContactPerson2 | The member’s emergency contact person 2 (max length = 50) |
EmergencyContactPhone2 | The member’s emergency contact phone 2 (max length = 50) |
DetailsConfirmedCorrect | The date the member confirmed their details were correct (yyyy-mm-dd format) |
LastModifiedDate | The date the member was last modified (yyyy-mm-dd format) |
Active | The members active status (1 or 0) |
DateJoinedClub | The date the member joined your club (yyyy-mm-dd format) |
ASANumber | The member’s asa number (max length = 50) |
AsaCategory | The member’s asa category (max length = 50) |
CountryOfRepresentation | The member’s country of representation (max length = 50) |
IsASwimmer | If the member is a swimmer (1 or 0) |
IsAVolunteer | If the member is a volunteer (1 or 0) |
IsACoach | If the member is a coach (1 or 0) |
IsAParent | If the member is a parent (1 or 0) |
WaterPolo | If the member is a water polo player (1 or 0) |
SynchronisedSwimming | If the member is synchro (1 or 0) |
OpenWater | If the member is an open water swimmer (1 or 0) |
LifeSaving | If the member is life saving (1 or 0) |
LTSTeacher | If the member is a learn to swim teacher (1 or 0) |
Masters | If the members is a masters swimmer (1 or 0) |
CommitteeMember | If the member is on the committee (1 or 0) |
JobTitle | The member’s job title at the club (max length = 50) |
CompetitiveDivingPassed | The date the member passed competitive diving (yyyy-mm-dd format) |
SwimsForOtherClub | The name of another club the member swims for (max length = 100) |
LocoParentisRights | The date loco parentis rights were given (yyyy-mm-dd format) |
ConsentToTravel | The date consent to travel was given (yyyy-mm-dd format) |
ConsentImageUse | The date consent to image use was given (yyyy-mm-dd format) |
ConsentVideoUse | The date consent to video use was given (yyyy-mm-dd format) |
SchoolAttended | The school the member attended (max length = 50) |
LastClubDisclaimerAcknowledged | The date the member last acknowledged a club disclaimer (yyyy-mm-dd format) |
DateLeft | The date the member left the club (yyyy-mm-dd format) |
Notes | Any notes pertaining to the member (max length = 4000) |
MedicalHistory | Any medical history pertaining to the member (max length = 4000) |
Allergies | Any allergies the member has (max length = 4000) |
DisabilityDetails | Any disabilities the member has (max length = 4000) |
Doctor | The member’s doctor (max length = 50) |
DoctorAddress | The member’s doctor’s address (max length = 50) |
DoctorPhone | The member’s doctor’s phone number (max length = 50) |
DBSDate | The member’s DBS date (yyyy-mm-dd format) |
DBSRenewalDate | The member’s DBS renewal date (yyyy-mm-dd format) |
DBSCertificateNumber | The member’s DBS certificate number (max length = 50) |
SafeguardingDate | The member’s Safeguarding date (yyyy-mm-dd format) |
SafeguardingRenewalDate | The member’s Safeguarding renewal date (yyyy-mm-dd format) |
Username | The member’s login username (max length = 50) |
Password | The member’s login password (max length = 50) |
LastLoggedIn | The date the member last logged in (yyyy-mm-dd format – Read Only) |
InvoiceDiscountPercent | The member’s invoice discount if applicable number to 2 decimal places |
SessionRestrictions | A list of Session Guids that the member is restricted to |
Parents | A list of User Guids of the swimmer’s parents |
Swimmers | A list of User Guids of the parent’s swimmers |
GET Member
To get a Member, use the following URL where {guid} is the Guid of the Member:
GET /Members/{guid}
Data Returned
When you GET a Member, the following JSON will be returned:
{
"Guid": "85525b05-ef52-4997-9f50-6ed0539d37b0",
"Firstname": "Lakesha",
"Lastname": "Wilson",
"KnownAs": "",
"Dob": "2002-12-03",
"Gender": "F",
"Address1": "2 Scotsburn Rd",
"Address2": "",
"Address3": "",
"Town": "",
"City": "TALERDDIG",
"Postcode": "SY19 8FF",
...
}
When you POST a new Member, the api will return a JSON object with the Member’s details. The password field will always be blank.
Waiting List
Overview
URL | /WaitingList |
Methods Supported | POST, GET |
Description | Allows you to get (GET), create (POST) waiting list members in an SCM account |
Elements For Waiting List
Guid | The person’s unique id in the system (read only) |
DateAdded required | The first name of the person (yyyy-mm-dd format) |
Firstname required | The first name of the person (max length = 50) |
Lastname required | The last name of the person (max length = 50) |
DOB | The person’s date of birth (yyyy-mm-dd format) |
Gender | The person’s gender (M or F) |
The person’s email address (max length = 50) | |
Address1 | The person’s address 1 (max length = 50) |
Address2 | The person’s address 2(max length = 50) |
Address3 | The person’s address 3 (max length = 50) |
Town | The person’s town (max length = 50) |
County | The person’s county (max length = 50) |
Postcode | The person’s postcode (max length = 50) |
HomePhone | The person’s home phone number (max length = 50) |
MobilePhone | The person’s mobile phone number (max length = 50) |
PreviousExperience | The person’s previous experience (max length = 4000) |
Notes | Any relevant notes (max length = 4000) |
DateLastEmailed | The date the person was last emailed (read only) |
DateConvertedToMember | The date the person was converted to a member (read only) |
GET Waiting List
To get a Waiting List, use the following URL where {guid} is the Guid of the Waiting List person:
GET /WaitingList/{guid}
Data Returned
When you GET a Waiting List, the following JSON will be returned:
{
"Guid": "85525b05-ef52-4997-9f50-6ed0539d37b0",
"Firstname": "Lakesha",
"Lastname": "Wilson",
"DOB": "2002-12-03",
"Gender": "F",
"Email": "[email protected]",
"Address1": "2 Scotsburn Rd",
"Address2": "",
"Address3": "",
"Town": "",
"City": "TALERDDIG",
"Postcode": "SY19 8FF",
...
}
When you POST a new Waiting List, the api will return a JSON object with the Waiting List details.
Who’s Who
Overview
URL | /WhosWho |
Methods Supported | GET |
Description | Allows you to get who’s who in an SCM account |
The “WhosWho” GET method returns a list of your Who’s Who categories and Members assigned to those categories
{
"Categories":
[{
"Category": "Club Officers",
"Members":
[{
"Firstname": "Joseph",
"Lastname": "Bloggs",
"KnownAs": "Jo",
"Notes": "Secretary"
},
...
},
...}
Club Sessions
Overview
URL | /ClubSessions |
Methods Supported | GET |
Description | Allows you to get (GET) club sessions in an SCM account |
Elements For Club Sessions
Guid | The session’s unique id in the system (read only) |
SessionName | The name of the session |
WeekDay | The day of the week the session is on |
StartTime | The time the session starts |
EndTime | The time the session ends |
SessionFee | The session fee |
NoSessionDates | Any dates or date ranges the session does not run on |
MaxMembers | The max number of members for the session |
SessionLocation | The location of the session |
Archived | The archived status of the session |
Coaches | A list of member Guids of the session coaches (only for coaching rotas set to “automatic”) |
Members | A list of member Guids of members assigned this session |
GET Club Session
To get a Club Session, use the following URL where {guid} is the Guid of the club session:
GET /ClubSessions/{guid}
Data Returned
When you GET a Club Session, the following JSON will be returned:
{
"Guid": "bb835a18-1234-5678-a99f-3177572e40d7",
"SessionName": "Ben test",
"WeekDay": "Sunday",
"StartTime": "00:00",
"EndTime": "00:00",
"SessionFee": 0,
"NoSessionDates": "",
"MaxMembers": 0,
"SessionLocation": "",
"Archived": 0,
"Coaches":
[{
"Guid": "94d54adb-1234-5678-985d-a530e4457b51",
"LastAttended": "2017-11-05" }
],
"Members":
[{
"Guid": "90b11226-1234-5678-b38f-23984e58223f",
"LastAttended": "2017-11-05" },
{
"Guid": "3993c5d5-1234-5678-b6bd-73e46b4abaa7",
"LastAttended": "2017-11-05"
},
]}
Club Groups
Overview
URL | /ClubGroups |
Methods Supported | GET, PUT |
Description | Allows you to get (GET) and update (PUT) club groups in an SCM account |
Elements For Club Groups
Guid | The group’s unique id in the system (read only) |
GroupName | The name of the group |
MaxMembers | The max number of members for the group |
GroupFee | The group fee |
Members | A list of member Guids of members assigned this group |
GET Club Group
To get a Club Group, use the following URL where {guid} is the Guid of the club group:
GET /ClubGroups/{guid}
Data Returned
When you GET a Club Group, the following JSON will be returned:
{
"Guid": "bb835a18-1234-5678-a99f-3177572e40d7",
"GroupName": "Development",
"MaxMembers": 15,
"GroupFee": "10",
"Members":
[{
"Guid": "90b11226-1234-5678-b38f-23984e58223f"
},
{
"Guid": "3993c5d5-1234-5678-b6bd-73e46b4abaa7"
},
]}
Club Roles
Overview
URL | /ClubRoles |
Methods Supported | GET, PUT |
Description | Allows you to get (GET) and update (PUT) club roles in an SCM account |
Elements For Club Roles
Guid | The role’s unique id in the system (read only) |
RoleName | The name of the role |
Members | A list of member Guids of members assigned this role |
GET Club Role
To get a Club Role, use the following URL where {guid} is the Guid of the club role:
GET /ClubRoles/{guid}
Data Returned
When you GET a Club Role, the following JSON will be returned:
{
"Guid": "bb835a18-1234-5678-a99f-3177572e40d7",
"RoleName": "Coach",
"Members":
[{
"Guid": "90b11226-1234-5678-b38f-23984e58223f"
},
{
"Guid": "3993c5d5-1234-5678-b6bd-73e46b4abaa7"
},
]}
Email Lists
Overview
URL | /EmailLists |
Methods Supported | POST, GET, PUT |
Description | Allows you to get (GET), add (POST) and update (PUT) email lists in an SCM account |
Elements For Email Lists
Guid | The list’s unique id in the system (read only) |
ListName | The name of the list |
Members | A list of member Guids of members in this list |
GET Email List
To get an Email list, use the following URL where {guid} is the Guid of the email list:
GET /EmailLists/{guid}
Data Returned
When you GET an Email List, the following JSON will be returned:
{
"Guid": "bb835a18-1234-5678-a99f-3177572e40d7",
"ListName": "Swim Club Challenge",
"Members":
[{
"Guid": "90b11226-1234-5678-b38f-23984e58223f"
},
{
"Guid": "3993c5d5-1234-5678-b6bd-73e46b4abaa7"
},
]}
When you POST or PUT a new EmailList, the api will return a JSON object with the List’s details.
Code Of Conduct
Overview
URL | /CodeOfConduct |
Methods Supported | GET, PUT |
Description | Allows you to get (GET) code of conducts in an SCM account |
Elements For Code Of Conducts
Guid | The code of conduct’s unique id in the system (read only) |
Title | The tile of the code of conduct |
Details | The details of the code of conduct |
Filename | The file name of an attached file |
Members | A list of member Guids of members assigned to this code of conduct |
GET Code Of Conduct
To get a Code of Conduct, use the following URL where {guid} is the Guid of the code of conduct:
GET /CodeOfConduct/{guid}
Data Returned
When you GET a Code of Conduct, the following JSON will be returned:
{
"Guid": "bb835a18-1234-5678-a99f-3177572e40d7",
"Title": "Coaches",
"Details": "Details goes here...",
"Filename": "",
"Members": [{
"Guid": "90b11226-1234-5678-b38f-23984e58223f",
"DateAgreed": ""
},
{
"Guid": "3993c5d5-1234-5678-b6bd-73e46b4abaa7",
"DateAgreed": "2018-04-19"
},
]}
Notice Board
Overview
URL | /NoticeBoard |
Methods Supported | GET |
Description | Allows you to get (GET) noticeboard in an SCM account |
Elements For Notice Board
Guid | The noticeboard’s unique id in the system (read only) |
NoticeDate | The date of the noticeboard item (yyyy-mm-dd format) |
NoticeTitle | The title of the noticeboard item |
NoticeDetails | The noticeboard message |
DisplayUntilDate | The date the notice will display until (yyyy-mm-dd format) |
FirstName | The first name of the member who created the noticeboard item |
KnownAs | The “known as” of the member who created the noticeboard item |
LastName | The last name of the member who created the noticeboard item |
GET Notice Board
To get a Notice Board, use the following URL where {guid} is the Guid of the noticeboard item:
GET /NoticeBoard/{guid}
Data Returned
When you GET a Notice Board, the following JSON will be returned:
{
"Guid": "bb835a18-1234-5678-a99f-3177572e40d7",
"NoticeDate": "2018-09-19",
"NoticeTitle": "Title goes here...",
"NoticeDetails": "Details goes here...",
"DisplayUntilDate": "2018-09-22",
"FirstName": "Jo",
"KnownAs": "",
"LastName": "Bloggs",
}
Error Codes
Code | Explanation |
---|---|
400 | Bad request – something is wrong with your data i.e. missing required fields etc |
401 | Unauthorized – invalid authorization token |
403 | Forbidden – you have made too many api requests in the current 24 hour period |
404 | Not Found – you supplied an incorrect object id |
500 | Internal Server Error – something has gone wrong on our side |
A message detailing the exact error will also be sent along with the error code above