API documentation

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:

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.

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 SupportedPOST, GET
DescriptionAllows you to create or get club events in an SCM account

Elements For Club Events

GuidThe club event unique id in the system (read only)
EventTitle requiredThe title of the event (max length = 50)
EventDetailsThe details of the event (optional max length = 4000)
EventStartDate requiredThe start date of the event (yyyy-mm-dd format)
EventStartTime requiredThe start time of the event (24hr format)
EventEndDate requiredThe end date of the event (yyyy-mm-dd format)
EventEndTime requiredThe end time of the event (24hr format)
BusProvidedIs a bus provided? (1 or 0)
BusSeatsHow many seats on the bus? (number)
BusDepartureDateThe departure date of the bus (optional yyyy-mm-dd format)
BusDepartureTimeThe departure time of the bus (optional 24hr format)
CalendarColourThe colour of the event on the club calendar (0, B, G, O, R, Y, Pu, Gr, Pi, N, T)
EventVenueThe venue of the event (optional max length = 50)
Address1The address line 1 of the event (optional max length = 50)
Address2The address line 2 of the event (optional max length = 50)
Address3The address line 3 of the event (optional max length = 50)
Address4The address line 4 of the event (optional max length = 50)
PostcodeThe postcode of the event (optional max length = 50)
FeeThe fee per event for swimmers (optional decimal)
RelayFeeThe fee per relay event for swimmers (optional decimal)
PoolThe pool size optional (20m, 25m, 33m, 50m, OW)
AgeOnDateThe age on date for the event (optional yyyy-mm-dd format)
MeetCodeThe meet code for the event (optional max length = 50)
SessionNumberThe session number of the event (optional max length = 50)
LicenceNumberThe licence number of the event (optional max length = 50)
EntryCloseDateThe closing date for entries (optional yyyy-mm-dd format)
SwimTimesAny 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 SupportedPOST, GET
DescriptionAllows you to create or get incidents in an SCM account

Elements For Incidents

GuidThe incident unique id in the system (read only)
IncidentTitle requiredThe title of the incident (max length = 50)
IncidentDate requiredThe date of the incident (yyyy-mm-dd format)
IncidentDetailsThe details of the incident (optional max length = 4000)
ProposedActionThe proposed action for the incident (optional max length = 4000)
Status requiredThe status of the incident (Open, In Progress, On Hold, Closed)
AddedBy requiredThe member that added the incident
CommentsAny 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 SupportedGET
DescriptionAllows you to get meets in an SCM account

Elements For Meets

GuidThe meet unique id in the system (read only)
MeetNameThe name of the meet (max length = 50)
FacilityThe location of the meet (optional max length = 50)
TypeThe type of meet (Open Meet, Team Gala, Club Champs, Turn Up and Swim)
StartDateThe start date of the meet (yyyy-mm-dd format)
EndDateThe end date of the meet (yyyy-mm-dd format)
AgeUpDateThe age up date of the meet (yyyy-mm-dd format)
EligibilityDateThe eligibility date of the meet (yyyy-mm-dd format)
EntryOpenDateThe entry open date of the meet (yyyy-mm-dd format)
EntryDeadlineThe entry deadline date of the meet (yyyy-mm-dd format)
StreetThe street address of the meet (optional max length = 50)
Address2The address line 2 of the meet (optional max length = 50)
CityThe city of the meet (optional max length = 50)
CountyThe county of the meet (optional max length = 50)
PostCodeThe post code of the meet (optional max length = 50)
CountryThe country of the meet (optional max length = 50)
SwimTimesAddedSwim times have been added (optional 1 or 0)
SwimTimesVerifiedSwim times have been verified (optional 1 or 0)
SwimTimesAny 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 SupportedPOST, GET
DescriptionAllows you to create or get trial requests in an SCM account

Elements For Trial Requests

GuidThe trial request unique id in the system (read only)
DateAddedThe read only date the trial request was added (yyyy-mm-dd format)
FirstName requiredThe first name of the trial requester (max length = 50)
LastName requiredThe last name of the trial requester (max length = 50)
Dob requiredThe date of birth of the trial requester (yyyy-mm-dd format)
GenderThe trial requester's gender (M or F)
EmailThe trial requester's email address (max length = 50)
SwimmingExperienceThe 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@domain.com",
    ...
}

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 SupportedPOST, GET, PUT, DELETE
DescriptionAllows you to create (POST), get (GET), update (PUT) or archive (DELETE) members in an SCM account

Elements For Members

GuidThe member's unique id in the system (read only)
MemberIDThe member ID of the member (max length = 50)
Firstname requiredThe first name of the member (max length = 50)
KnownAsThe name the member is known as if different from Firstname (max length = 50)
Lastname requiredThe last name of the member (max length = 50)
PrimaryContactNameThe primary contact for the member (max length = 50)
RelationshipToMemberThe relationship to the member (max length = 50)
HomePhoneThe members home phone number (max length = 50)
MobilePhoneThe member's mobile phone number (max length = 50)
EmailThe member's email address (max length = 50)
DOBThe member's date of birth (yyyy-mm-dd format)
GenderThe member's gender (M or F)
EthnicityThe me'mbers ethnicity Use ASA Ethnicity codes
Address1The member's address 1 (max length = 50)
Address2The member's address 2(max length = 50)
Address3The member's address 3 (max length = 50)
TownThe member's town (max length = 50)
CountyThe members county (max length = 50)
PostcodeThe member's postcode (max length = 50)
EmergencyContactPerson1The member's emergency contact person 1 (max length = 50)
EmergencyContactPhone1The member's emergency contact phone 1 (max length = 50)
EmergencyContactPerson2The member's emergency contact person 2 (max length = 50)
EmergencyContactPhone2The member's emergency contact phone 2 (max length = 50)
DetailsConfirmedCorrectThe date the member confirmed their details were correct (yyyy-mm-dd format)
LastModifiedDateThe date the member was last modified (yyyy-mm-dd format)
ActiveThe members active status (1 or 0)
DateJoinedClubThe date the member joined your club (yyyy-mm-dd format)
ASANumberThe member's asa number (max length = 50)
AsaCategoryThe member's asa category (max length = 50)
CountryOfRepresentationThe member's country of representation (max length = 50)
IsASwimmerIf the member is a swimmer (1 or 0)
IsAVolunteerIf the member is a volunteer (1 or 0)
IsACoachIf the member is a coach (1 or 0)
IsAParentIf the member is a parent (1 or 0)
CommitteeMemberIf the member is on the committee (1 or 0)
JobTitleThe member's job title at the club (max length = 50)
CompetitiveDivingPassedThe date the member passed competitive diving (yyyy-mm-dd format)
SwimsForOtherClubThe name of another club the member swims for (max length = 100)
LocoParentisRightsThe date loco parentis rights were given (yyyy-mm-dd format)
ConsentToTravelThe date consent to travel was given (yyyy-mm-dd format)
ConsentImageUseThe date consent to image use was given (yyyy-mm-dd format)
ConsentVideoUseThe date consent to video use was given (yyyy-mm-dd format)
SchoolAttendedThe school the member attended (max length = 50)
LastClubDisclaimerAcknowledgedThe date the member last acknowledged a club disclaimer (yyyy-mm-dd format)
DateLeftThe date the member left the club (yyyy-mm-dd format)
NotesAny notes pertaining to the member (max length = 4000)
MedicalHistoryAny medical history pertaining to the member (max length = 4000)
AllergiesAny allergies the member has (max length = 4000)
DisabilityDetailsAny disabilities the member has (max length = 4000)
DoctorThe member's doctor (max length = 50)
DoctorAddressThe member's doctor's address (max length = 50)
DoctorPhoneThe member's doctor's phone number (max length = 50)
DBSDateThe member's DBS date (yyyy-mm-dd format)
DBSRenewalDateThe member's DBS renewal date (yyyy-mm-dd format)
DBSCertificateNumberThe member's DBS certificate number (max length = 50)
SafeguardingDateThe member's Safeguarding date (yyyy-mm-dd format)
SafeguardingRenewalDateThe member's Safeguarding renewal date (yyyy-mm-dd format)
UsernameThe member's login username (max length = 50)
PasswordThe member's login password (max length = 50)
LastLoggedInThe date the member last logged in (yyyy-mm-dd format - Read Only)
InvoiceDiscountPercentThe member's invoice discount if applicable number to 2 decimal places
SessionRestrictionsA list of Session Guids that the member is restricted to
ParentsA list of User Guids of the swimmer's parents
SwimmersA 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 SupportedPOST, GET
DescriptionAllows you to get (GET), create (POST) waiting list members in an SCM account

Elements For Waiting List

GuidThe person's unique id in the system (read only)
DateAdded requiredThe first name of the person (yyyy-mm-dd format)
Firstname requiredThe first name of the person (max length = 50)
Lastname requiredThe last name of the person (max length = 50)
DOBThe person's date of birth (yyyy-mm-dd format)
GenderThe person's gender (M or F)
EmailThe person's email address (max length = 50)
Address1The person's address 1 (max length = 50)
Address2The person's address 2(max length = 50)
Address3The person's address 3 (max length = 50)
TownThe person's town (max length = 50)
CountyThe person's county (max length = 50)
PostcodeThe person's postcode (max length = 50)
HomePhoneThe person's home phone number (max length = 50)
MobilePhoneThe person's mobile phone number (max length = 50)
PreviousExperienceThe person's previous experience (max length = 4000)
NotesAny relevant notes (max length = 4000)
DateLastEmailedThe date the person was last emailed (read only)
DateConvertedToMemberThe 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""jo@bloggs.com",
    "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 SupportedGET
DescriptionAllows 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 SupportedGET
DescriptionAllows you to get (GET) club sessions in an SCM account

Elements For Club Sessions

GuidThe session's unique id in the system (read only)
SessionNameThe name of the session
WeekDayThe day of the week the session is on
StartTimeThe time the session starts
EndTimeThe time the session ends
SessionFeeThe session fee
NoSessionDatesAny dates or date ranges the session does not run on
MaxMembersThe max number of members for the session
SessionLocationThe location of the session
ArchivedThe archived status of the session
CoachesA list of member Guids of the session coaches (only for coaching rotas set to "automatic")
MembersA 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 SupportedGET, PUT
DescriptionAllows you to get (GET) and update (PUT) club groups in an SCM account

Elements For Club Groups

GuidThe group's unique id in the system (read only)
GroupNameThe name of the group
MaxMembersThe max number of members for the group
GroupFeeThe group fee
MembersA 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 SupportedGET, PUT
DescriptionAllows you to get (GET) and update (PUT) club roles in an SCM account

Elements For Club Roles

GuidThe role's unique id in the system (read only)
RoleNameThe name of the role
MembersA 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 SupportedPOST, GET, PUT
DescriptionAllows you to get (GET), add (POST) and update (PUT) email lists in an SCM account

Elements For Email Lists

GuidThe list's unique id in the system (read only)
ListNameThe name of the list
MembersA 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 SupportedGET, PUT
DescriptionAllows you to get (GET) code of conducts in an SCM account

Elements For Code Of Conducts

GuidThe code of conduct's unique id in the system (read only)
TitleThe tile of the code of conduct
DetailsThe details of the code of conduct
FilenameThe file name of an attached file
MembersA 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 SupportedGET
DescriptionAllows you to get (GET) noticeboard in an SCM account

Elements For Notice Board

GuidThe noticeboard's unique id in the system (read only)
NoticeDateThe date of the noticeboard item (yyyy-mm-dd format)
NoticeTitleThe title of the noticeboard item

NoticeDetails

The noticeboard message
DisplayUntilDateThe date the notice will display until (yyyy-mm-dd format)
FirstNameThe first name of the member who created the noticeboard item
KnownAsThe "known as" of the member who created the noticeboard item
LastNameThe 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

CodeExplanation
400Bad request - something is wrong with your data i.e. missing required fields etc
401Unauthorized - invalid authorization token
403Forbidden - you have made too many api requests in the current 24 hour period
404Not Found - you supplied an incorrect object id
500Internal 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


    • Related Articles

    • API usage

      Run this report to see all of the API calls made using your API token.
    • View trial requests

      Trial requests are a way to store information for swimmers waiting for a club trial. There are 3 ways to add a trial request: 1) Via your SCM login Click on the "Add Request" button and complete the form. 2) Via your club website (Option 1 only) If ...
    • View registration forms

      When a new member joins the club they can fill out a form and all of their details will be recorded. There are 2 ways to record registration forms: Via your club website (for clubs on Option 1) Via the API
    • Waiting list

      This is where you can store your waiting list. There are 4 ways to get someone on the waiting list: Via your club website (for clubs on Option 1) Via the api Manually by clicking on the "Add Member" button Importing members via Excel/CSV file You can ...
    • Send texts

      Before you can send text messages, you need to register for an account with our 3rd party texting service. Click here and register for a free account. Then, once registered, log in and go to your "Settings > All Settings" page.  Scroll down and click ...