Clubway public API (2.5)

Download OpenAPI specification:Download

This document describes the API that clubs can use to communicate with Clubway. Usage of API must be enabled by the Clubway support team.

Privacy

When using personal information of members obtained through API, the API user must adhere to the privacy settings defined by the member. Member can specify that any of his/her personal information can or cannot be displayed publicly. If the accessibility is public, that information can be displayed publicly for example on the club's website. If the accessibility is none, the information must not be displayed to unlimited audience, for example openly on the public internet.

Details on how the accessibility is presented are listed on corresponding endpoint descriptions.

Accessing API

API access is bound to a specific user in the club. All actions performed via API are associated with that user, i.e. API user can perform all actions and has same visibility than the user via Web-interface. Updating and deleting events is only possible for events created by the same API user.

The API key must be sent as HTTP header with all requests


X-myClub-token: ec608ee3a007433afb274de88cb31bd5

Rate limits

There is a rate limit of 300 requests / hour for each API key with a burst of 500 requests (i.e. you can make 500 requests at a time, but then you will have to wait for 100 minutes before you can make your next request). If you make a request that exceeds the rate limit you will receive HTTP response 503 Service Unavailable



Changelog

Version 2.5 (June 2, 2025)

List members endpoint and updates to events & courses list

  • Members List members available
  • Pagination to events & courses list (300 limit by default)

Version 2.4 (March 17, 2025)

Changes to Contracts

Contract creating supports now unit_price. This is the price for the contract and it defaults to 0. unit_price is also now returned in the contract list.

Version 2.3 (November 12, 2024)

New endpoint Kinds

  • Kinds List sports available

Updates to old endpoints

  • Groups

    New attribute kind_ids

  • Courses

    New attributes venue_ids and space_left

Version 2.2 (October 21, 2024)

Event embed endpoint changes and deprecations

Visibilities of the events can be now explicitly set with a collection of none, group, club, public and course.

all-value is deprecated and will be removed in the future. all is equivalent to group, club and public.

Response of the event embed still contains the visibility field, but it is deprecated and will be removed in the future. Instead, the visibilities field should be used.

When creating an event, the visibility field is still used. It still accepts the old values (string), but the new values (array of strings) are recommended.

Version 2.1 (July 11, 2023)

New endpoint Contracts

Version 2.0 (June 20, 2022)

  • Notifications

    Now accepts and returns details_html instead of details. The details paramter can still be used, but markdown will no longer be processed.

  • Events

    Now accepts and returns description_html instead of description. The description paramter can still be used, but markdown will no longer be processed.

Version 1.21 (January 31, 2022)

Member.male is replaced with member.gender

  • All endpoints that used to return member.male (boolean) now instead return member.gender (string).

  • Possible values for gender are 'male', 'female', 'other', 'undefined' (default)

  • When creating a member, the old male attribute is still accepted, but it is converted to gender.


Updates to old endpoints

Shop orders

  • Removed line.variant-attribute from response.

  • Returned collection is limited

  • since-params supports time


Version 1.20 (December 23, 2021)

New endpoints


Version 1.19 (December 8, 2021)


Version 1.18 (October 11, 2021)

  • Events list can be filtered with only events that have updated or its participations have updated after a selected time. Also events event_recurrency_id is returned.

Version 1.17 (April 30, 2021)

  • Shop orders example JSON product name changed to visible_name.

Version 1.16 (April 19, 2021)

New endpoint


Version 1.15 (October 6, 2020)

New endpoint


Version 1.14 (September 9, 2020)

Updates to old endpoints

  • Member Embeds supports new types and allows setting visible fields for them. Requires Home Page add-on to be active.

Version 1.13 (September 18, 2019)

New endpoint


Version 1.12 (February 26, 2019)

Updates to old endpoints

  • Groups has new fields: description, description_html.

Version 1.11 (February 5, 2019)

Updates to old endpoints

  • Events has new fields: accepted_card_product_ids.

New endpoint


Version 1.10 (December 20, 2018)

Updates to old endpoints


Version 1.9 (December 11, 2018)

Updates to old endpoints


Version 1.8 (December 10, 2018)

New endpoint


Version 1.7 (November 22, 2018)

New endpoints

Updates to old endpoints


Version 1.6 (November 8, 2018)

New endpoints

Updates to old endpoints

  • Events list has new parameters to use in querying and max limit of 300 events returned. Participant info can also be included in result.

Version 1.5 (April 9, 2018)

  • Removed login from Member Create. For backwards compatibility a value for login can still be provied, but will be ignored.

  • Removed login, login_count, last_login_at, failed_login_count from Member Show and Member Search


Version 1.4 (January 31, 2018)

  • Privacy instructions added

  • Member Show now includes information on which fields the member has allowed to be publicly shown


Version 1.3 (May 30, 2016)


Version 1.2 (May 19, 2016)


Version 1.1 (October 22, 2015 )

Action | Change

-------|------------

Event Get|Result now includes participants

Event List|List events in a group

Member Show|Link to member avatar is now included in result set

Group Memberships|New endpoint to return list of group membership






Events

List events

Lists events in given group. Events in subgroups are not included in the result. Results can be further filtered by given parameters. Events to which user has no access will be excluded from the result.

Authorizations:
ApiToken
query Parameters
course_ids
Array of numbers

ids of the courses to list events for.

end_date
string <date>

Events that start or end on or before that date will be returned.

group_id
number

id of the group to list events for.

group_ids
Array of numbers

ids of the groups to list events for.

ids
Array of numbers

ids of the events to list.

include_participants
boolean
Default: false

Include particpants for each event

limit
number

Limit the number of events returned. Default is 300.

page
number

The page of the result set. Default is 1.

start_date
string <date>
Default: "yesterday's date"

Events that start or end on or after that date will be returned.

updated_after
string <date-time>

Events basic information or its participations have changed after timestamp

venue_id
number

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create event

Authorizations:
ApiToken
Request Body schema: application/json
object

Event

Responses

Request samples

Content type
application/json
{
  • "event": {
    }
}

Response samples

Content type
application/json
{
  • "event": {
    }
}

Show event

Authorizations:
ApiToken
path Parameters
id
required
number

ID of the event

Responses

Response samples

Content type
application/json
{
  • "event": {
    }
}

Update event

Authorizations:
ApiToken
path Parameters
id
required
number

ID of the event

Request Body schema: application/json
object (event-core)

Responses

Request samples

Content type
application/json
{
  • "event": {
    }
}

Response samples

Content type
application/json
{
  • "event": {
    }
}

Delete event

Authorizations:
ApiToken
path Parameters
id
required
number

ID of the event

Responses

Response samples

Content type
application/json
{
  • "message": "ok"
}

Courses

List courses

Lists courses in given group. Courses in subgroups are not included in the result. Results can be further filtered by given parameters. Courses to which user has no access will be excluded from the result. Maximum of 300 courses are returned.

Authorizations:
ApiToken
query Parameters
end_date
string <date>

Courses that start or end on or before that date will be returned.

group_id
number

id of the group to list courses for.

group_ids
Array of numbers

ids of the groups to list courses for.

ids
Array of numbers

ids of the courses to list.

include_participants
boolean
Default: false

Include participants for each course

start_date
string <date>
Default: "yesterday's date"

Courses that start or end on or after that date will be returned.

updated_after
string <date-time>

Courses basic information or its participations have changed after timestamp.

visibility
Array of any
Items Enum: "none" "group" "club" "public"

Courses with given visibilities are return.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create course

Authorizations:
ApiToken
Request Body schema: application/json
object

Course

Responses

Request samples

Content type
application/json
{
  • "course": {
    }
}

Response samples

Content type
application/json
{
  • "course": {
    }
}

Show course

Authorizations:
ApiToken
path Parameters
id
required
number

ID of the course

Responses

Response samples

Content type
application/json
{
  • "course": {
    }
}

Update course

Authorizations:
ApiToken
path Parameters
id
required
number

ID of the course

Request Body schema: application/json
object

Course

Responses

Request samples

Content type
application/json
{
  • "course": {
    }
}

Response samples

Content type
application/json
{
  • "course": {
    }
}

Delete course

Authorizations:
ApiToken
path Parameters
id
required
number

ID of the course

Responses

Response samples

Content type
application/json
{
  • "message": "ok"
}

Members

Create member

Only API users which is club owner can create new members.

Authorizations:
ApiToken
Request Body schema: application/json
object

Member

Responses

Request samples

Content type
application/json
{
  • "member": {
    }
}

Response samples

Content type
application/json
{
  • "member_id": 10001
}

List members

IMPORTANT PRIVACY NOTICE

public_fields and public_custom_fields elements describe which information the member has decided to make publicly available. If a field is not listed in these elements IT'S VALUE MUST NOT BE DISPLAYED PUBLICLY.

Authorizations:
ApiToken
query Parameters
group_ids
Array of integers

Array of group ids to show only members that have membership in these groups

ids
Array of integers

Array of member ids to show

limit
number

Limit the number of members returned. Default is 300.

page
number

The page of the result set. Default is 1.

roster_ids
Array of integers

Array of roster ids to show only members belonging to these rosters

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Show member

IMPORTANT PRIVACY NOTICE

public_fields and public_custom_fields elements describe which information the member has decided to make publicly available. If a field is not listed in these elements IT'S VALUE MUST NOT BE DISPLAYED PUBLICLY.

Authorizations:
ApiToken
path Parameters
id
required
number

Responses

Response samples

Content type
application/json
{
  • "member": {
    }
}

Create membership

Adds the member to a group or updates an existing membership.

Authorizations:
ApiToken
path Parameters
group_id
required
number

ID of the group

member_id
required
number

ID of the member

Request Body schema: application/json
level
string

Level for the member, if omitted, level information is not set and will also be removed from existing membership.

Responses

Request samples

Content type
application/json
{
  • "level": "Maalivahti"
}

Response samples

Content type
application/json
{
  • "message": "ok"
}

Remove membership

Removes member from the given group

Authorizations:
ApiToken
path Parameters
group_id
required
number

ID of the group

member_id
required
number

ID of the member

Responses

Response samples

Content type
application/json
{
  • "message": "ok"
}

Invoices

Create invoice

Returns id of newly created invoice

Authorizations:
ApiToken
Request Body schema: application/json
object

Invoice

Responses

Request samples

Content type
application/json
{
  • "invoice": {
    }
}

Response samples

Content type
application/json
113

Show invoice

Authorizations:
ApiToken
path Parameters
id
required
number

ID of the invoice

Responses

Response samples

Content type
application/json
{
  • "invoice": {
    }
}

Deliver invoice

Issues and delivers invoice to member

Authorizations:
ApiToken
path Parameters
id
required
number

ID of the invoice

Responses

Response samples

Content type
application/json
"ok"

Notifications

List notifications

Lists notifications in given groups or all.

Authorizations:
ApiToken
query Parameters
group_id
number
group_ids
Array of integers

Array of group ids to search notifications from. If blank, return all.

visibility
string
Enum: "all" "group" "public"

Filter notifications by visibility. Defaults to all.

Responses

Response samples

Content type
application/json
[
  • {},
  • {
    }
]

Create notification

Authorizations:
ApiToken
Request Body schema: application/json
object

Notification

Responses

Request samples

Content type
application/json
{
  • "notification": {
    }
}

Response samples

Content type
application/json
{
  • "notification": {
    }
}

Show notification

Authorizations:
ApiToken
path Parameters
id
required
number

ID of the Notification

Responses

Response samples

Content type
application/json
{}

Update notification

Authorizations:
ApiToken
path Parameters
id
required
number

ID of the Notification

Request Body schema: application/json
object

Notification

Responses

Request samples

Content type
application/json
{
  • "notification": {
    }
}

Response samples

Content type
application/json
{}

Delete notification

Authorizations:
ApiToken
path Parameters
id
required
number

ID of the Notification

Responses

Response samples

Content type
application/json
"ok"

Groups

List groups

Lists all groups for the club. Group is needed when creating events or invoices.

Authorizations:
ApiToken

Responses

Response samples

Content type
application/json
[
  • {},
  • {
    }
]

Get memberships of group

Returns a list of all memberships in the group. Membership includes member level and member id. The level of membership can only be shown publicly if the member's public_fields element contains the identifier "level".

Authorizations:
ApiToken
path Parameters
id
required
number

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

List levels

Returns a list of membership levels used in the group. Needed when creating new members.

Authorizations:
ApiToken
path Parameters
id
required
number

Responses

Response samples

Content type
application/json
[
  • "Kannattajajäsen",
  • "Jäsen",
  • "Valmennuspäälikkö",
  • "Kunniajäsen",
  • "Hallituksen jäsen",
  • "Hallituksen puheenjohtaja"
]

List levels details

Returns a list of membership levels used in the group with details.

Authorizations:
ApiToken
path Parameters
id
required
number

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Contracts

List contracts

Shows contracts in the club

Authorizations:
ApiToken
query Parameters
member_id
number

Id of member for which contracts should be returned

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create contracts

Create a contract.

Authorizations:
ApiToken
Request Body schema: application/json
object

Contract

Responses

Request samples

Content type
application/json
{
  • "contract": {
    }
}

Response samples

Content type
application/json
{
  • "contract": {
    }
}

List contract services

Shows contract services defined by the club

Authorizations:
ApiToken

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Club

Show basic information of club

Return details for the club.

Authorizations:
ApiToken

Responses

Response samples

Content type
application/json
{
  • "club": {
    }
}

Web Shop

Club must have web shop add-on

Api member must have owner or shop manager role

List web shop orders

Returned collection is limited to 100 records.

Authorizations:
ApiToken
query Parameters
since
string <date-time>

Date of which to start listing orders. If empty returns all.

Responses

Response samples

Content type
application/json
{
  • "order": {
    }
}

Other

List bank accounts

Shows bank accounts defined by the club

Authorizations:
ApiToken

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

List card products

Shows card products defined by the club

Authorizations:
ApiToken

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

List custom fields

Shows custom fields defined by the club

Authorizations:
ApiToken

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

List event categories

List all event categories for club.

Authorizations:
ApiToken

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    }
]

List invoicing categories

Shows invoicing categories that can be used to categorize invoice lines

Authorizations:
ApiToken

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

List kinds (sports)

Shows sports available for clubs and groups

Authorizations:
ApiToken

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

List venues

Lists all venues for the club. Used when creating an event an assigning a venue to that event

Authorizations:
ApiToken

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

List rosters

Lists all roster visible to the api member. Rosters can be used to filter members in the members index endpoint with query parameter roster_ids.

Authorizations:
ApiToken

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Event Embeds

List event embeds

Lists event embeds in given groups or all.

Authorizations:
ApiToken
query Parameters
group_ids
Array of integers

array of group ids to search embeds from. If blank, return all.

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Create event embed

Authorizations:
ApiToken
Request Body schema: application/json
object

Event Embed

Responses

Request samples

Content type
application/json
{
  • "event_embed": {
    }
}

Response samples

Content type
application/json
{
  • "event_embed": {
    }
}

Show event embed

Authorizations:
ApiToken
path Parameters
id
required
number

Responses

Response samples

Content type
application/json
{
  • "event_embed": {
    }
}

Update event embed

Authorizations:
ApiToken
path Parameters
id
required
number
Request Body schema: application/json
object

Event Embed

Responses

Request samples

Content type
application/json
{
  • "event_embed": {
    }
}

Response samples

Content type
application/json
{
  • "event_embed": {
    }
}

Delete event embed

Authorizations:
ApiToken
path Parameters
id
required
number

Responses

Response samples

Content type
application/json
"ok"

Course Embeds

List course embeds

Lists course embeds in given groups or all.

Authorizations:
ApiToken
query Parameters
group_ids
Array of integers

array of group ids to search embeds from. If blank, return all.

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Create course embed

Authorizations:
ApiToken
Request Body schema: application/json
object

course Embed

Responses

Request samples

Content type
application/json
{
  • "course_embed": {
    }
}

Response samples

Content type
application/json
{
  • "course_embed": {
    }
}

Show course embed

Authorizations:
ApiToken
path Parameters
id
required
number

Responses

Response samples

Content type
application/json
{
  • "course_embed": {
    }
}

Update course embed

Authorizations:
ApiToken
path Parameters
id
required
number
Request Body schema: application/json
object

course Embed

Responses

Request samples

Content type
application/json
{
  • "course_embed": {
    }
}

Response samples

Content type
application/json
{
  • "course_embed": {
    }
}

Delete course embed

Authorizations:
ApiToken
path Parameters
id
required
number

Responses

Response samples

Content type
application/json
"ok"

Member Embeds

List member embeds

Lists member embeds in given groups or all.

Authorizations:
ApiToken
query Parameters
group_ids
Array of integers

array of group ids to search embeds from. If blank, return all.

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Create member embed

Authorizations:
ApiToken
Request Body schema: application/json
object

Member Embed

Responses

Request samples

Content type
application/json
{
  • "member_embed": {
    }
}

Response samples

Content type
application/json
{
  • "member_embed": {
    }
}

Show member embed

Authorizations:
ApiToken
path Parameters
id
required
number

Responses

Response samples

Content type
application/json
{
  • "member_embed": {
    }
}

Update member embed

Authorizations:
ApiToken
path Parameters
id
required
number
Request Body schema: application/json
object

Event Embed

Responses

Request samples

Content type
application/json
{
  • "member_embed": {
    }
}

Response samples

Content type
application/json
{
  • "member_embed": {
    }
}

Delete member embed

Authorizations:
ApiToken
path Parameters
id
required
number

Responses

Response samples

Content type
application/json
"ok"

Notification Embeds

List notification embeds

Lists notification embeds in given groups or all.

Authorizations:
ApiToken
query Parameters
group_ids
Array of integers

array of group ids to search embeds from. If blank, return all.

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Create notification embed

Authorizations:
ApiToken
Request Body schema: application/json
object

notification Embed

Responses

Request samples

Content type
application/json
{
  • "notification_embed": {
    }
}

Response samples

Content type
application/json
{
  • "notification_embed": {
    }
}

Show notification embed

Authorizations:
ApiToken
path Parameters
id
required
number

Responses

Response samples

Content type
application/json
{
  • "notification_embed": {
    }
}

Update notification embed

Authorizations:
ApiToken
path Parameters
id
required
number
Request Body schema: application/json
object

notification Embed

Responses

Request samples

Content type
application/json
{
  • "notification_embed": {
    }
}

Response samples

Content type
application/json
{
  • "notification_embed": {
    }
}

Delete notification embed

Authorizations:
ApiToken
path Parameters
id
required
number

Responses

Response samples

Content type
application/json
"ok"

Shop Product Embeds

List shop product embeds

Lists shop product embeds.

Authorizations:
ApiToken

Responses

Response samples

Content type
application/json
[]

Create shop product embed

Authorizations:
ApiToken
Request Body schema: application/json
object

shop-product Embed

Responses

Request samples

Content type
application/json
{
  • "shop_product_embed": {
    }
}

Response samples

Content type
application/json
{}

Show shop product embed

Authorizations:
ApiToken
path Parameters
id
required
number

Responses

Response samples

Content type
application/json
{}

Update shop product embed

Authorizations:
ApiToken
path Parameters
id
required
number
Request Body schema: application/json
object

shop-product Embed

Responses

Request samples

Content type
application/json
{
  • "shop_product_embed": {
    }
}

Response samples

Content type
application/json
{}

Delete shop product embed

Authorizations:
ApiToken
path Parameters
id
required
number

Responses

Response samples

Content type
application/json
"ok"

Embed Styles

Keys for style

Key Required Description
name X Name of the style in UI
custom_css * Inline content for the stylesheet. Must be valid css. Required unless stylesheet_url is provided.
stylesheet_url * Url from which css stylesheet is loaded. Required unless custom_css is provided.

List embed styles

Lists embed styles.

Authorizations:
ApiToken

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create embed style

Either custom_css or stylesheet_url must be provided

Authorizations:
ApiToken
Request Body schema: application/json
object

Embed Style

Responses

Request samples

Content type
application/json
{
  • "embed_style": {
    }
}

Response samples

Content type
application/json
{
  • "embed_style": {
    }
}

Show embed style

Authorizations:
ApiToken
path Parameters
id
required
number

Responses

Response samples

Content type
application/json
{
  • "embed_style": {
    }
}

Update embed style

Authorizations:
ApiToken
path Parameters
id
required
number
Request Body schema: application/json
object

Embed Style

Responses

Request samples

Content type
application/json
{
  • "embed_style": {
    }
}

Response samples

Content type
application/json
{
  • "embed_style": {
    }
}

Delete embed style

Authorizations:
ApiToken
path Parameters
id
required
number

Responses

Response samples

Content type
application/json
"ok"