Club

List of clubs

Path:

GET /api/clubs

Example:

https://test.ophardt.online/de/api/clubs

Shows all clubs of this federation

Result:

Field Type Value
id Integer ID of athlete
clubtype String Type of club (C = Club, S = School, U = univerity, B = Boarding School)
shortname String National shortname for displays (e.g. FCM)
shortnameInternational String International shortname for displays (e.g. FCM)
name String Name for lists (e.g. FC Musterstadt)
nameInternational String International name (only latin letters)
nameNational String National name (non latin letters)
nameOfficial String Official name (club register), e.g. Fechtclub Musterstadt 1900 e.V.
city String City of club
nationalCode String Code of national federation
regionalCode String Code of regional federation
address1 String Street of club office
address2 String Street of club office
addresscity String City of club office
postcode String Postcode club office
email String E-Mail of club
phone String Phone of club office
website String Website
social_facebook String Social Media: Facebook
social_twitter String Social Media: Twitter
social_instagram String Social Media: Instagram
social_youtube String Social Media: YouTube
social_snapchat String Social Media: Snapchat
social_other String Another social media link
created Datetime Created
modified Datetime Last modified
active Boolean Active 

Show single club

Path:

GET /api/club/{id}

{id} must be replaced by the id of the club

Example:

https://test.ophardt.online/de/api/club/1000

Show data of athlete with ID 1000

Result:

the same fields as for the list of clubs

Add new club:

Path:

PUT /api/club

Example:

PUT https://test.ophardt.online/de/api/club

Payload needs to be n Json-Format in the format:

{
"fieldname1": value1,
"fieldname2": value2
}

JSON fields:

Field Mand. Type Value
localid yes Integer Unique Id of federation
clubtype yes String Type of club (C = Club, S = School, U = univerity, B = Boarding School)
shortname yes String National shortname for displays (e.g. FCM)
shortnameInternational yes String International shortname for displays (e.g. FCM)
name yes String Name for lists (e.g. FC Musterstadt)
nameInternational yes String International name (only latin letters)
nameNational yes String National name (non latin letters)
nameOfficial yes String Official name (club register), e.g. Fechtclub Musterstadt 1900 e.V.
city yes String City of club
nationalCode yes String Code of national federation
regionalCode yes String Code of regional federation
address1   String Street of club office
address2   String Street of club office
addresscity   String City of club office
postcode   String Postcode club office
email   String E-Mail of club
phone   String Phone of club office
website   String Website
social_facebook   String Social Media: Facebook
social_twitter   String Social Media: Twitter
social_instagram   String Social Media: Instagram
social_youtube   String Social Media: YouTube
social_snapchat   String Social Media: Snapchat
social_other   String Another social media link

Result:

Name When? Value
code always 200 if success, 501 unauthorized, > 600 other error
reason unauthorized description of error
accesslevel success / other error 1 for "read only", 2 for "read/write"
errors other error list of errors with code and reason
athlete_id success ID of new athlete

Edit existing club:

Path:

POST /api/club/{id}

Replace {id} with Ophardt ID of club

Example:

POST https://test.ophardt.online/de/api/club/1000

Payload needs to be n Json-Format in the format:

{
"fieldname1": value1,
"fieldname2": value2
}

JSON fields:

Field Mand. Type Value
clubtype   String Type of club (C = Club, S = School, U = univerity, B = Boarding School)
shortname   String National shortname for displays (e.g. FCM)
shortnameInternational   String International shortname for displays (e.g. FCM)
name   String Name for lists (e.g. FC Musterstadt)
nameInternational   String International name (only latin letters)
nameNational   String National name (non latin letters)
nameOfficial   String Official name (club register), e.g. Fechtclub Musterstadt 1900 e.V.
city   String City of club
nationalCode   String Code of national federation
regionalCode   String Code of regional federation
address1   String Street of club office
address2   String Street of club office
addresscity   String City of club office
postcode   String Postcode club office
email   String E-Mail of club
phone   String Phone of club office
website   String Website
social_facebook   String Social Media: Facebook
social_twitter   String Social Media: Twitter
social_instagram   String Social Media: Instagram
social_youtube   String Social Media: YouTube
social_snapchat   String Social Media: Snapchat
social_other   String Another social media link

Result:

Name When? Value
code always 200 if success, 501 unauthorized, > 600 other error
reason unauthorized description of error
accesslevel success / other error 1 for "read only", 2 for "read/write"
errors other error list of errors with code and reason
athlete_id success ID of new athlete

Delete existing club:

Path:

DELETE /api/club/{id}

Replace {id} with Ophardt ID of club

Example:

DELETE https://test.ophardt.online/de/api/club/1000

Result:

Name When? Value
code always 200 if success, 501 unauthorized, > 600 other error
reason unauthorized description of error
accesslevel success / other error 1 for "read only", 2 for "read/write"
club_id success ID of new club