Back to top

myClub public API (v1.13)

This document describes the API that clubs can use to communicate with myClub. Usage of API must be enabled by myClub 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



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

Keys for event

Key Required Description
allow_comments Allow members to comment event. "1" If members can comment the event, "0" if not.
description Description of the event
ends_at X End time of the event
event_category_id Id of the event’s category
group_id X Id of the group where the event is created
max_participations X Maximum number of participants to the event
name X Name of the event
participants_public X Make event participants public: "1" If list of event participants is public to the members or "0" if not.
queue_enabled Queuing enabled for event: "1" If members can queue to filled up event, "0" if not.
registration Who is allowed to register to the event. One of "none", "invited", "group" or "club"
registration_closes_at Registration closing date and time
registration_opens_at Registration opening date and time
send_confirmation Send confirmation mail to registered members: "1" If the confirmation mail will be sent or "0" if not.
starts_at X Event’s starting date and time
venue_id X Id of the event’s venue
visibility Visibility of the event. One of "none", "group", `“public”

Creation

Create event
POST/api/events

Example URI

POST https://[own-domain].myclub.fi/api/events
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "event": {
    "name": "Morning Ice",
    "starts_at": "2014-10-30 06:00:00",
    "ends_at": "2014-10-30 06:00:00",
    "group_id": 34,
    "venue_id": 83
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "event": {
    "allow_comments": true,
    "description": null,
    "ends_at": "2014-10-30T06:00:00+02:00",
    "event_category_id": null,
    "group_id": 34,
    "id": 651,
    "max_participations": null,
    "name": "Morning Ice",
    "participants_public": true,
    "queue_enabled": false,
    "registration": "group",
    "registration_closes_at": null,
    "registration_opens_at": null,
    "send_confirmation": false,
    "starts_at": "2014-10-30T06:00:00+02:00",
    "venue_id": 83,
    "visibility": "group"
  }
}

Existing events

Show event
GET/api/events/{id}

Example URI

GET https://[own-domain].myclub.fi/api/events/id
URI Parameters
HideShow
id
number (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "event": {
    "allow_comments": true,
    "description": null,
    "ends_at": "2014-10-30T06:00:00+02:00",
    "event_category": {
      "color": "#00ffff",
      "name": "Training"
    },
    "group_id": 34,
    "id": 651,
    "invoices": [
      {
        "due_amount": "25.0",
        "due_date": "2015-10-23",
        "id": 101,
        "member_id": 105,
        "status": "open"
      },
      {
        "due_amount": "12.0",
        "due_date": "2015-10-25",
        "id": 102,
        "member_id": 106,
        "status": "paid"
      }
    ],
    "max_participations": null,
    "name": "Morning Ice",
    "participants_public": true,
    "queue_enabled": false,
    "registration": "group",
    "registration_closes_at": null,
    "registration_opens_at": null,
    "send_confirmation": false,
    "starts_at": "2014-10-30T06:00:00+02:00",
    "venue_id": 83,
    "visibility": "group",
    "participations": [
      {
        "comment": null,
        "confirmed_at": "2015-10-22T10:30:50+03:00",
        "created_at": "2015-10-16T13:11:13+03:00",
        "price": null,
        "queue_order": 0,
        "registered_order": 1,
        "self_registration": false,
        "updated_at": "2015-10-22T10:30:50+03:00",
        "member_id": 87338,
        "indication": "no_response"
      },
      {
        "comment": null,
        "confirmed_at": null,
        "created_at": "2015-10-16T13:11:13+03:00",
        "price": null,
        "queue_order": 0,
        "registered_order": 2,
        "self_registration": false,
        "updated_at": "2015-10-16T13:11:13+03:00",
        "member_id": 87346,
        "indication": "yes"
      }
    ],
    "accepted_card_product_ids": [
      10,
      11
    ]
  }
}

Update event
PUT/api/events/{id}

Example URI

PUT https://[own-domain].myclub.fi/api/events/id
URI Parameters
HideShow
id
number (required) 
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "event": {
    "name": "Morning Ice",
    "starts_at": "2014-10-30 06:00:00",
    "ends_at": "2014-10-30 06:00:00",
    "group_id": 34,
    "venue_id": 83
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "event": {
    "allow_comments": true,
    "description": null,
    "ends_at": "2014-10-30T06:00:00+02:00",
    "event_category_id": null,
    "group_id": 34,
    "id": 651,
    "max_participations": null,
    "name": "Morning Ice",
    "participants_public": true,
    "queue_enabled": false,
    "registration": "group",
    "registration_closes_at": null,
    "registration_opens_at": null,
    "send_confirmation": false,
    "starts_at": "2014-10-30T06:00:00+02:00",
    "venue_id": 83,
    "visibility": "group"
  }
}

Delete event
DELETE/api/events/{id}

Example URI

DELETE https://[own-domain].myclub.fi/api/events/id
URI Parameters
HideShow
id
number (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
"ok"

List events

List events
GET/api/events/?group_id={group_id}&start_date={start_date}&end_date={end_date}&venue_id={venue_id}

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. Maximum of 300 events are returned.

Example URI

GET https://[own-domain].myclub.fi/api/events/?group_id=group_id&start_date=start_date&end_date=end_date&venue_id=venue_id
URI Parameters
HideShow
group_id
number (optional) 

id of the group to list events for.

group_ids
array (optional) 

ids of the groups to list events for.

ids
array (optional) 

ids of the events to list.

start_date
string (optional) Default: yesterday's date 

Events that start or end on or after that date will be returned. Format YYYY-MM-DD

end_date
string (optional) 

Events that start or end on or before that date will be returned. Format YYYY-MM-DD

venue_id
number (optional) 
include_participants
string (required) Default: false 

If set to true, participant info will be included.

Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "event": {
      "allow_comments": false,
      "description": "This is the \r\ndescription of the event.\r\n\r\n\r\nasdf\r\nasdf\r\n",
      "ends_at": "2013-04-25T20:00:00+03:00",
      "event_category_id": null,
      "group_id": 209,
      "id": 1779,
      "max_participations": 20,
      "name": "Testing",
      "participants_public": true,
      "queue_enabled": true,
      "registration": "group",
      "registration_closes_at": null,
      "registration_opens_at": null,
      "send_confirmation": true,
      "starts_at": "2013-04-25T19:00:00+03:00",
      "venue_id": 244,
      "visibility": "group"
    },
    ,
    "participations": [
      {
        "comment": null,
        "confirmed_at": "2015-10-22T10:30:50+03:00",
        "created_at": "2015-10-16T13:11:13+03:00",
        "price": null,
        "queue_order": 0,
        "registered_order": 1,
        "self_registration": false,
        "updated_at": "2015-10-22T10:30:50+03:00",
        "member_id": 87338,
        "indication": "no_response"
      }
    ],
    "accepted_card_product_ids": [10, 11]
  },
  {
    "event": {
      "allow_comments": false,
      "description": "",
      "ends_at": "2013-02-27T12:00:00+02:00",
      "event_category_id": null,
      "group_id": 209,
      "id": 1781,
      "max_participations": null,
      "name": "Testing",
      "participants_public": false,
      "queue_enabled": false,
      "registration": "group",
      "registration_closes_at": null,
      "registration_opens_at": null,
      "send_confirmation": true,
      "starts_at": "2013-02-27T10:00:00+02:00",
      "venue_id": 244,
      "visibility": "group"
    },
    ,
    "participations": [
      {
        "comment": null,
        "confirmed_at": "2015-10-22T10:30:50+03:00",
        "created_at": "2015-10-16T13:11:13+03:00",
        "price": null,
        "queue_order": 0,
        "registered_order": 1,
        "self_registration": false,
        "updated_at": "2015-10-22T10:30:50+03:00",
        "member_id": 87338,
        "indication": "no_response"
      }
    ],
    "accepted_card_product_ids": []
  }
]

Copy event

Copy event
POST/api/events/{id}/copy

Creates new event based on existing event and copies all participants from the event.

Example URI

POST https://[own-domain].myclub.fi/api/events/id/copy
URI Parameters
HideShow
id
number (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "event_id": 100,
  "event_name": "Harjoitukset",
  "group_id": 500,
  "group_name": "Tapanilan erän jujutsu",
  "venue_id": 10,
  "venue_name": "Sali 1",
  "start_time": "2012-02-03T13:30:00+02:00",
  "ends_at": "2012-02-03T14:30:00+02:00",
  "unconfirmed_members": [
    {
      "id": 100,
      "firstname": "Matti",
      "lastname": "Meikäläinen",
      "birthday": null,
      "age": 0,
      "male": true,
      "confirmed_at": null,
      "overdue_invoices_count": 0
    },
    {
      "id": 101,
      "firstname": "Maija",
      "lastname": "Meikäläinen",
      "birthday": null,
      "age": 0,
      "male": false,
      "confirmed_at": null,
      "overdue_invoices_count": 0
    }
  ],
  "confirmed_members": []
}

Confirm members

Confirm members
POST/api/events/{id}/confirm

Confirm member’s participation in define event

Example URI

POST https://[own-domain].myclub.fi/api/events/id/confirm
URI Parameters
HideShow
id
number (required) 
Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
member_ids=101,102
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "event_id": 24,
  "event_name": "Harjoitukset",
  "group_id": 500,
  "group_name": "Tapanilan erän jujutsu",
  "venue_id": 10,
  "venue_name": "Sali 1",
  "start_time": "2012-02-03T13:30:00+02:00",
  "ends_at": "2012-02-03T14:30:00+02:00",
  "unconfirmed_members": [],
  "confirmed_members": [
    {
      "id": 100,
      "firstname": "Matti",
      "lastname": "Meikäläinen",
      "birthday": null,
      "age": 0,
      "male": true,
      "confirmed_at": "2012-02-03T13:31:00+02:00",
      "overdue_invoices_count": 1
    },
    {
      "id": 101,
      "firstname": "Maija",
      "lastname": "Meikäläinen",
      "birthday": null,
      "age": 0,
      "male": false,
      "confirmed_at": "2012-02-03T13:32:00+02:00",
      "overdue_invoices_count": 0
    }
  ]
}

Today's events

Today's events
GET/api/events/today

Returns a list of events happening today

Example URI

GET https://[own-domain].myclub.fi/api/events/today
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "event_id": 100,
    "event_name": "Harjoitukset",
    "group_id": 500,
    "group_name": "Tapanilan erän jujutsu",
    "venue_id": 10,
    "venue_name": "Sali 1",
    "start_time": "2012-02-03T13:30:00+02:00",
    "ends_at": "2012-02-03T14:30:00+02:00",
    "unconfirmed_members": [],
    "confirmed_members": [
      {
        "id": 567,
        "firstname": "Matti",
        "lastname": "Meikäläinen",
        "birthday": null,
        "age": 0,
        "male": true,
        "confirmed_at": "2012-02-03T13:31:00+02:00",
        "overdue_invoices_count": 1
      },
      {
        "id": 568,
        "firstname": "Maija",
        "lastname": "Meikäläinen",
        "birthday": null,
        "age": 0,
        "male": false,
        "confirmed_at": "2012-02-03T13:32:00+02:00",
        "overdue_invoices_count": 0
      }
    ]
  },
  {
    "event_id": 101,
    "event_name": "Harjoitukset-Juniorit",
    "group_id": 500,
    "group_name": "Tapanilan erän jujutsu",
    "venue_id": 10,
    "venue_name": "Sali 1",
    "start_time": "2012-02-03T17:30:00+02:00",
    "ends_at": "2012-02-03T18:30:00+02:00",
    "unconfirmed_members": [],
    "confirmed_members": []
  }
]

Members

Keys for member

Key Required Description
active true, if member is active
birthday member birthday
city City address of member
clothing_size Clothing size of member
competition_number Competition number of player
country Country of member
email Member email address
email_2 Guardian 1 email address
email_3 Guardian 2 email address
external_license_id Member’s external license id
first_name X First name
guardian_1_name Guardian 1 name
guardian_1_phone Guardian 1 phone number
guardian_2_name Guardian 2 name
guardian_2_phone Guardian 2 phone
invoicing_info Freeform notes about members invoicing details
hcp HCP
height Member’s height
hetu Member’s sosial security id
joined_at Date member joined
last_name X Last name
left_at Date member left club
locale Member’s locale
male True, if member is male
notes Notes
organisation Organization name if member represents an external organization
photography_permission True, if member can be photographed
street Street address of the member
weight Member weight
custom_values Hash of club specific custom member fields. Field name is key and value should be of same type as the custom field.

Creation

Create member
POST/api/members

Returns an id to be used in future requests. Only API users which is club owner can create new members.

Example URI

POST https://[own-domain].myclub.fi/api/members
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "member": {
    "birthday": "1990-01-01",
    "city": "Espoo",
    "clothing_size": "M",
    "email": "john.doe@spam.com",
    "male": true,
    "street": "Albergan puistotie",
    "zip": "02600",
    "first_name": "John",
    "last_name": "Doe",
    "custom_values": {
      "Integer Custom Field": 1,
      "Boolean Custom Field": true,
      "Date Custom Field": "2014-01-01",
      "Multiselect Custom Field": [
        "Multiselect Item 1",
        "Multiselect Item 2"
      ]
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "member_id": 10001
}

Existing member

Show member
GET/api/members/{id}

  • 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. In case of public_custom_fields, the title of the custom_value is referred to.

  • avatars element in response contains a link to user uploaded image in different sizes

    • mini 48px × 48px
    • small 100px × 100px
    • medium 233px × 233px
    • original 500px × 500px (max, scaled to fit largest size, might not be square)

If the member has not uploaded an Avatar, the values will be null.

Example URI

GET https://[own-domain].myclub.fi/api/members/id
URI Parameters
HideShow
id
number (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "member": {
    "active": true,
    "birthday": "1990-01-01",
    "city": "Espoo",
    "clothing_size": "M",
    "club_id": 9,
    "competition_number": "42",
    "confirmed": false,
    "country": "Suomi",
    "created_at": "2014-11-12T11:02:26+02:00",
    "email": "john.doe@spam.com",
    "email_2": "jack.doe@spam.com",
    "email_3": "jane.doe@spam.com",
    "email_confirmations": true,
    "external_license_id": "007",
    "first_name": "John",
    "guardian_1_name": "Jack Doe",
    "guardian_1_phone": "+35891234",
    "guardian_2_name": "Jane Doe",
    "guardian_2_phone": "+35891234",
    "hcp": "13.0",
    "height": 178,
    "hetu": "010190-126J",
    "id": 1234,
    "import_id": null,
    "invoicing_info": null,
    "joined_at": "2014-01-01",
    "last_name": "Doe",
    "last_request_at": null,
    "left_at": null,
    "locale": "fi",
    "male": true,
    "notes": null,
    "notifications": true,
    "organisation": null,
    "own_notes": null,
    "phone": "+24591234",
    "photography_permission": true,
    "street": "Albergan puistotie",
    "terms_accepted": false,
    "updated_at": "2014-11-12T11:20:55+02:00",
    "week_mail": true,
    "weight": "76.0",
    "zip": "02600",
    "memberships": [],
    "custom_values": [
      {
        "title": "Pelipaikka",
        "data_type": "multilist",
        "value": [
          "Maalivahti"
        ]
      },
      {
        "title": "Boolean",
        "data_type": "boolean",
        "value": false
      }
    ],
    "invoices": [
      {
        "due_amount": "25.0",
        "due_date": "2015-10-23",
        "id": 101,
        "member_id": 1234,
        "status": "open"
      },
      {
        "due_amount": "12.0",
        "due_date": "2015-10-25",
        "id": 102,
        "member_id": 1234,
        "status": "paid",
        "starts_at": "2015-10-25T11:00:00.000+03:00",
        "ends_at": null,
        "event_id": 110,
        "event_name": "Training"
      }
    ],
    "avatars": {
      "mini": "https://..../8989-32fe945fc0d6ed5efa499f08b35e67914f16bd81-mini.jpg",
      "small": "https://..../8989-32fe945fc0d6ed5efa499f08b35e67914f16bd81-small.jpg",
      "medium": "https://..../8989-32fe945fc0d6ed5efa499f08b35e67914f16bd81-medium.jpg",
      "original": "https://..../8989-32fe945fc0d6ed5efa499f08b35e67914f16bd81-original.jpg"
    },
    "public_fields": [
      "first_name",
      "last_name",
      "phone"
    ],
    "public_custom_fields": [
      "Pelipaikka"
    ]
  }
}

Find member by name

Find by name
GET/api/members/search?first_name={first_name}&last_name={last_name}

Example URI

GET https://[own-domain].myclub.fi/api/members/search?first_name=first_name&last_name=last_name
URI Parameters
HideShow
first_name
string (required) 
last_name
string (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "member": {
    "active": true,
    "birthday": "1990-01-01",
    "business": false,
    "city": "Espoo",
    "clothing_size": "M",
    "club_id": 9,
    "coach": false,
    "competition_number": "42",
    "confirmed": false,
    "country": "Suomi",
    "created_at": "2014-11-12T11:02:26+02:00",
    "default_group_id": null,
    "email": "john.doe@spam.com",
    "email_2": "jack.doe@spam.com",
    "email_3": "jane.doe@spam.com",
    "email_confirmations": true,
    "external_license_id": "007",
    "first_name": "John",
    "guardian_1_name": "Jack Doe",
    "guardian_1_phone": "+35891234",
    "guardian_2_name": "Jane Doe",
    "guardian_2_phone": "+35891234",
    "hcp": "13.0",
    "height": 178,
    "hetu": "010190-126J",
    "id": 1234,
    "import_id": null,
    "invoicing_info": null,
    "joined_at": "2014-01-01",
    "last_name": "Doe",
    "last_request_at": null,
    "left_at": null,
    "locale": "fi",
    "male": true,
    "notes": null,
    "notifications": true,
    "organisation": null,
    "own_notes": null,
    "owner": false,
    "phone": "+24591234",
    "photography_permission": true,
    "street": "Albergan puistotie",
    "terms_accepted": false,
    "updated_at": "2014-11-12T11:20:55+02:00",
    "week_mail": true,
    "weight": "76.0",
    "zip": "02600",
    "memberships": [],
    "custom_values": [
      {
        "title": "Pelipaikka",
        "data_type": "multilist",
        "value": [
          "Maalivahti"
        ]
      },
      {
        "title": "Boolean",
        "data_type": "boolean",
        "value": false
      }
    ],
    "avatars": {
      "mini": "https://..../8989-32fe945fc0d6ed5efa499f08b35e67914f16bd81-mini.jpg",
      "small": "https://..../8989-32fe945fc0d6ed5efa499f08b35e67914f16bd81-small.jpg",
      "medium": "https://..../8989-32fe945fc0d6ed5efa499f08b35e67914f16bd81-medium.jpg",
      "original": "https://..../8989-32fe945fc0d6ed5efa499f08b35e67914f16bd81-original.jpg"
    },
    "public_fields": [
      "first_name",
      "last_name",
      "phone"
    ],
    "public_custom_fields": [
      "Pelipaikka"
    ]
  }
}

Memberships

Create
POST/api/memberships?member_id={member_id}&group_id={group_id}

Adds the member to a group or updates an existing membership. If level is omitted, level information is not set and will also remove level from existing membership.

Example URI

POST https://[own-domain].myclub.fi/api/memberships?member_id=member_id&group_id=group_id
URI Parameters
HideShow
member_id
number (required) 
group_id
number (required) 
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "level": "Maalivahti"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "ok"
}

Remove
DELETE/api/memberships?member_id={member_id}&group_id={group_id}

Removes member from the given group

Example URI

DELETE https://[own-domain].myclub.fi/api/memberships?member_id=member_id&group_id=group_id
URI Parameters
HideShow
member_id
number (required) 
group_id
number (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "ok"
}

Invoices

Keys for invoice

Key Required Description
bank_account_id X Id of invoice bank account
currency Currency of the invoice
due_date X Invoice due date
event_id Id of the event this invoice is attached to
group_id X The group this invoice belongs to
internal_comment Internal comment
message Additional information printed to invoice
member_id X Id of the receiver
payment_term_days payment term in days
penal_interest Penal interest
reference Reference number
reference_prefix Prefix for reference number
invoice_lines Array of invoice lines (see below)

Keys for invoice line

Key Description
category_id Invoice gategory
editable Can line be edited in UI
gross_unit_price Gross unit price of item including tax
net_unit_price Net unit price of the item
number Rank order number of item in invoice
product_id Product id
quantity Quantity
title Title of invoice line item
vat_percent Vat percent

Creation

Create invoice
POST/api/invoices

Returns id of newly created invoice

Example URI

POST https://[own-domain].myclub.fi/api/invoices
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "invoice": {
    "bank_account_id": 9,
    "due_date": "2014-12-01",
    "group_id": 34,
    "member_id": 171,
    "invoice_lines": [
      {
        "category_id": 57,
        "gross_unit_price": "250.0",
        "net_unit_price": "200.0",
        "number": 100,
        "quantity": "1.0",
        "title": "Jääkiekkolasku",
        "vat_percent": "25.0"
      }
    ]
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
113

Show Invoice

Show invoice
GET/api/invoices/{id}

Example URI

GET https://[own-domain].myclub.fi/api/invoices/id
URI Parameters
HideShow
id
number (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "invoice": {
    "bank_account_id": 9,
    "comments": null,
    "created_at": "2014-11-11T14:48:12+02:00",
    "currency": "EUR",
    "delivered": false,
    "due_amount": "120.0",
    "due_date": "2014-11-25",
    "e_invoice_sent_at": null,
    "enqueued_at": null,
    "event_id": null,
    "formatted_reference": "2859",
    "group_id": 43,
    "id": 113,
    "internal_comment": "",
    "issued_on": null,
    "last_payment_entered_on": "2014-11-11",
    "last_payment_on": "2014-11-11",
    "message": "",
    "paid_amount": "120.0",
    "payment_term_days": 14,
    "penal_interest": "11.5",
    "reference": "2859",
    "reference_prefix": null,
    "status_id": "draft",
    "updated_at": "2014-11-11T14:49:21+02:00",
    "member_ext_id": 171,
    "invoice_lines": [
      {
        "category_id": 57,
        "created_at": "2014-11-11T14:48:12+02:00",
        "editable": true,
        "gross_unit_price": "120.0",
        "id": 134,
        "net_unit_price": "120.0",
        "number": 100,
        "product_id": null,
        "quantity": "1.0",
        "title": "Jäämaksu",
        "updated_at": "2014-11-11T14:49:21+02:00",
        "vat_percent": "0.0"
      }
    ],
    "payments": [
      {
        "amount": "120.0",
        "bank_account_id": null,
        "comment": "Käteismaksu",
        "created_at": "2014-11-11T14:49:21+02:00",
        "creator_id": 2170,
        "entry_date": "2014-11-11",
        "filing_code": "Simo Aho ti 11 marras 14",
        "payer": null,
        "payment_date": "2014-11-11",
        "payment_import_id": null,
        "reference": null,
        "updated_at": "2014-11-11T14:49:21+02:00",
        "visible": true,
        "payment_method": "cash"
      }
    ]
  }
}

Deliver Invoice

Deliver invoice
POST/api/invoices/{id}/deliver

Example URI

POST https://[own-domain].myclub.fi/api/invoices/id/deliver
URI Parameters
HideShow
id
number (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
"ok"

Groups

Groups

List groups
GET/api/groups

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

Example URI

GET https://[own-domain].myclub.fi/api/groups
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
{
  "group": {
    "description": "# Hockey team
      This team loves to play hockey.
    ",
    "description_html": "<h1>Hockey team</h1><p>This team loves to play hockey</p>",
    "display_order": 1,
    "email": "myclub.demo@gmail.com",
    "id": 34,
    "level_set_id": 33,
    "name": "Jääkiekkojaos",
    "parent_id": 33,
    "updated_at": "2013-08-27T13:15:06+03:00",
    "photo_small": "https://myclub.s3-eu-central-1.amazonaws.com/group_photos/1",
    "photo_original": "https://myclub.s3-eu-central-1.amazonaws.com/group_photos/2",
  }
},
{
  "group": {
    "description": null,
    "description_html": null,
    "display_order": 2,
    "email": "myclub.demo@gmail.com",
    "id": 35,
    "level_set_id": 34,
    "name": "F-juniorit",
    "parent_id": 34,
    "updated_at": "2013-08-27T13:15:06+03:00",
    "photo_small": null,
    "photo_original": null
  }
}]

Memberships

Get memberships of group
GET/api/groups/{id}/memberships

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”.

Example URI

GET https://[own-domain].myclub.fi/api/groups/id/memberships
URI Parameters
HideShow
id
number (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "membership": {
      "group_id": 211,
      "member_id": 87338,
      "created_at": "2011-12-15T11:07:45+02:00",
      "updated_at": "2011-12-15T11:07:47+02:00",
      "level": "Pelaaja",
      "level_display_order": 1
    }
  },
  {
    "membership": {
      "group_id": 211,
      "member_id": 87346,
      "created_at": "2011-12-15T11:07:46+02:00",
      "updated_at": "2011-12-15T11:07:47+02:00",
      "level": "Pelaaja",
      "level_display_order": 1
    }
  }
]

Membership Levels

List membership levels
GET/api/groups/{id}

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

Example URI

GET https://[own-domain].myclub.fi/api/groups/id
URI Parameters
HideShow
id
number (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  "Kannattajajäsen",
  "Jäsen",
  "Valmennuspäälikkö",
  "Kunniajäsen",
  "Hallituksen jäsen",
  "Hallituksen puheenjohtaja"
]

Notifications

Keys for notification

Key Required Description
group_id X Which group the notification belongs to.
subject X Subject text of the notification.
details Content for the notification. Markdown can be used to style.
published_at DateTime (2020-05-24 00:00) after which the notification is visible. Leave empty to always show.
expires_at DateTime (2020-05-31 00:00) after which the notification is no longer visible. Leave empty to always show.
allow_comments Can members comment on the notification. True or false (default).
visibility X One of public or group. Is the notification visible without logging in.

Creation

Create notification
POST/api/notifications

Example URI

POST https://[own-domain].myclub.fi/api/notifications
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "notification": {
    "group_id": 10,
    "subject": "Rules of conduct",
    "details": "
      * Be nice
      * Help each other
    ",
    "published_at": "2020-05-24T00:00:00.000+03:00",
    "expires_at": "2020-05-31T00:00:00.000+03:00",
    "allow_comments": true,
    "visibility": "public"
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "notification": {
    "id": 22,
    "group_id": 10,
    "subject": "Rules of conduct",
    "details": "
      * Be nice
      * Help each other
    ",
    "details_html": "
      <ul><li>Be nice</li><li>Help each other</li></ul>
    ",
    "published_at": "2020-05-24T00:00:00.000+03:00",
    "expires_at": "2020-05-31T00:00:00.000+03:00",
    "updated_at": "2020-05-30T13:00:00.000+03:00",
    "allow_comments": true,
    "visibility": "public",
    "attachments": [],
    "photo_small" : null,
    "photo_original": null
  }
}

Existing notifications

Show notification
GET/api/notifications/{id}

Example URI

GET https://[own-domain].myclub.fi/api/notifications/id
URI Parameters
HideShow
id
number (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "notification": {
    "id": 22,
    "group_id": 10,
    "subject": "Rules of conduct",
    "details": "
      * Be nice
      * Help each other
    ",
    "details_html": "
      <ul><li>Be nice</li><li>Help each other</li></ul>
    ",
    "published_at": "2020-05-24T00:00:00.000+03:00",
    "expires_at": "2020-05-31T00:00:00.000+03:00",
    "updated_at": "2020-05-30T13:00:00.000+03:00",
    "allow_comments": true,
    "visibility": "public",
    "attachments": [{ id: 1, file_name: 'notes.pdf', url: 'http://club.myclub.fi/attachments/1', content_type: 'application/pdf'}],
    "photo_small" : "https://myclub.s3-eu-central-1.amazonaws.com/notification_photos/2",
    "photo_original": "https://myclub.s3-eu-central-1.amazonaws.com/notification_photos/3"
  }
}

Update notification
PUT/api/notifications/{id}

Example URI

PUT https://[own-domain].myclub.fi/api/notifications/id
URI Parameters
HideShow
id
number (required) 
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "notification": {
    "subject": "Updated rules of conduct"
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "notification": {
    "id": 22,
    "group_id": 10,
    "subject": "Updated rules of conduct",
    "details": "
      * Be nice
      * Help each other
    ",
    "details_html": "
      <ul><li>Be nice</li><li>Help each other</li></ul>
    ",
    "published_at": "2020-05-24T00:00:00.000+03:00",
    "expires_at": "2020-05-31T00:00:00.000+03:00",
    "updated_at": "2020-05-30T13:00:00.000+03:00",
    "allow_comments": true,
    "visibility": "public",
    "attachments": [{ id: 1, file_name: 'notes.pdf', url: 'http://club.myclub.fi/attachments/1', content_type: 'application/pdf'}],
    "photo_small" : "https://myclub.s3-eu-central-1.amazonaws.com/notification_photos/2",
    "photo_original": "https://myclub.s3-eu-central-1.amazonaws.com/notification_photos/3"
  }
}

Delete notification
DELETE/api/notifications/{id}

Example URI

DELETE https://[own-domain].myclub.fi/api/notifications/id
URI Parameters
HideShow
id
number (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
"ok"

List notifications

List notifications
GET/api/notifications/?group_ids[]={group_id}

Lists notifications in given groups or all.

Example URI

GET https://[own-domain].myclub.fi/api/notifications/?group_ids[]=group_id
URI Parameters
HideShow
group_ids
array (optional) 

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

group_id
number (optional) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "notification": {
      "id": 22,
      "group_id": 10,
      "subject": "Rules of conduct",
      "details": "
        * Be nice
        * Help each other
      ",
      "details_html": "
        <ul><li>Be nice</li><li>Help each other</li></ul>
      ",
      "published_at": null,
      "expires_at": null,
      "updated_at": "2020-05-30T13:00:00.000+03:00",
      "allow_comments": true,
      "visibility": "public",
      "attachments": [{ id: 1, file_name: 'notes.pdf', url: 'http://club.myclub.fi/attachments/1', content_type: 'application/pdf'}],
      "photo_small" : "https://myclub.s3-eu-central-1.amazonaws.com/notification_photos/2",
      "photo_original": "https://myclub.s3-eu-central-1.amazonaws.com/notification_photos/3"
    }
  },
  {
    "notification": {
      "id": 24,
      "group_id": 5,
      "subject": "Team announcement",
      "details": "End of season party during next week end! Join the fun!",
      "details_html": "
        End of season party during next week end! Join the fun!
      ",
      "published_at": "2020-05-24T00:00:00.000+03:00",
      "expires_at": "2020-05-31T00:00:00.000+03:00",
      "updated_at": "2020-05-30T13:00:00.000+03:00",
      "allow_comments": true,
      "visibility": "group",
      "attachments": [],
      "photo_small" : null,
      "photo_original": null
    }
  }
]

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.

Creation

Create embed style
POST/api/embed_styles

Example URI

POST https://[own-domain].myclub.fi/api/embed_styles
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "embed_style": {
    "name": "Blue theme",
    "custom_css": "
      body {
        background-color: 'blue'
      }
    "
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "embed_style": {
    "id": 1,
    "name": "Blue theme",
    "custom_css": "
      body {
        background-color: 'blue'
      }
    ",
    "stylesheet_url": null
  }
}

Existing embed styles

Show embed style
GET/api/embed_styles/{id}

Example URI

GET https://[own-domain].myclub.fi/api/embed_styles/id
URI Parameters
HideShow
id
number (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "embed_style": {
    "name": "Blue theme",
    "custom_css": "
      body {
        background-color: 'blue'
      }
    ",
    stylesheet_url: null
  }
}

Update embed style
PUT/api/embed_styles/{id}

Example URI

PUT https://[own-domain].myclub.fi/api/embed_styles/id
URI Parameters
HideShow
id
number (required) 
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "embed_style": {
    "name": "Turn blue into red",
    "custom_css": "
      body {
        background-color: 'red'
      }
    "
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "embed_style": {
    id: 1,
    "name": "Turn blue into red",
    "custom_css": "
      body {
        background-color: 'red'
      }
    ",
    "stylesheet_url": null
  }
}

Delete event
DELETE/api/embed_styles/{id}

Example URI

DELETE https://[own-domain].myclub.fi/api/embed_styles/id
URI Parameters
HideShow
id
number (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
"ok"

List embed styles

List embed styles
GET/api/embed_styles/

Lists embed styles.

Example URI

GET https://[own-domain].myclub.fi/api/embed_styles/
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "embed_style": {
      id: 1,
      "name": "Blue theme",
      "custom_css": "
        body {
          background-color: 'blue'
        }
      ",
      "stylesheet_url": null
    }
  },
  {
    "embed_style": {
      id: 2,
      "name": "Red decorations",
      "custom_css": null,
      "stylesheet_url": "http://some-domain.fi/red_decorations.css"
    }
  }
]

Event Embeds

Keys for event embed

Key Required Description
name X Name of the event embed.
group_id X Id of the group to display events from.
default_mode X One of custom, list, week, month. How to display the embedded events.
visibility X One of all, group, public. Display events of chosen visibility.
registration X One of all, club, none, group. Display events of chosen registration.
components Only used if default_mode is custom. Array with any of following values group, venue, indication_info, indication_amounts. By default embed with custom default_mode displays only date, time and event name. By providing components, extra info can be added.
max_amount Limit amount of events to show. Maximum value is 60 (default).
max_weeks Limit maximum number of weeks ahead to include events from. Only works with custom and list default_mode.
embed_style_id Id of the EmbedStyle to associate with the embed.
hide_filters One of false (default) or true. Should filtering functionality be hidden.
show_sub_groups One of false (default) or true. Should events from sub groups be shown.
subscription_enabled One of false or true (default). Should “Add to calendar” link be displayed for downloading .ics feed. Only works with week and month default_mode.
default_locale One of fi, en, sv. Display events using this locale. If left blank, selects locale by browser language, or fi.
category_ids Array of EventCategory ids to display events from. By default does not limit by category
venue_ids Array of Venue ids to display events from. By default does not limit by venue

Creation

Create event embed
POST/api/event_embeds

Example URI

POST https://[own-domain].myclub.fi/api/event_embeds
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "event_embed": {
    "name": "League games",
    "group_id": 25,
    "default_mode": "month",
    "visibility": "all",
    "registration": "all",
    "max_amount": 20,
    "hide_filters": true,
    "show_sub_groups": false,
    "default_locale": "fi",
    "category_ids": [
      13
    ]
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "event_embed": {
    "id": 554,
    "name": "League games",
    "group_id": 25,
    "default_mode": "month",
    "visibility": "all",
    "registration": "all",
    "components": null,
    "max_amount": 20,
    "max_weeks": null,
    "embed_style_id": null,
    "hide_filters": true,
    "show_sub_groups": false,
    "subscription_enabled": null,
    "default_locale": "fi",
    "category_ids": [
      13
    ],
    "venue_ids": null,
    "ics_link": "https://download-feed.myclub.fi/events.ics",
    "embed_url": "https://link-to-embed.myclub.fi"
  }
}

Existing event embeds

Show event embed
GET/api/event_embeds/{id}

Example URI

GET https://[own-domain].myclub.fi/api/event_embeds/id
URI Parameters
HideShow
id
number (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "event_embed": {
    "id": 554,
    "name": "League games",
    "group_id": 25,
    "default_mode": "custom",
    "visibility": "all",
    "registration": "group",
    "components": [
      "indication_info",
      "indication_amounts"
    ],
    "max_amount": 20,
    "max_weeks": 4,
    "embed_style_id": 23,
    "hide_filters": true,
    "show_sub_groups": false,
    "subscription_enabled": null,
    "default_locale": "fi",
    "category_ids": [
      13
    ],
    "venue_ids": [
      98,
      104,
      224
    ],
    "ics_link": "https://download-feed.myclub.fi/events.ics",
    "embed_url": "https://link-to-embed.myclub.fi"
  }
}

Update event embed
PUT/api/event_embeds/{id}

Example URI

PUT https://[own-domain].myclub.fi/api/event_embeds/id
URI Parameters
HideShow
id
number (required) 
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "event_embed": {
    "default_mode": "custom",
    "components": [
      "indication_info",
      "indication_amounts"
    ]
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "event_embed": {
    "id": 554,
    "name": "League games",
    "group_id": 25,
    "default_mode": "custom",
    "visibility": "all",
    "registration": "group",
    "components": [
      "indication_info",
      "indication_amounts"
    ],
    "max_amount": 20,
    "max_weeks": 4,
    "embed_style_id": 23,
    "hide_filters": true,
    "show_sub_groups": false,
    "subscription_enabled": null,
    "default_locale": "fi",
    "category_ids": [
      13
    ],
    "venue_ids": [
      98,
      104,
      224
    ],
    "ics_link": "https://download-feed.myclub.fi/events.ics",
    "embed_url": "https://link-to-embed.myclub.fi"
  }
}

Delete event embed
DELETE/api/event_embeds/{id}

Example URI

DELETE https://[own-domain].myclub.fi/api/event_embeds/id
URI Parameters
HideShow
id
number (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
"ok"

List event embeds

List event embeds
GET/api/event_embeds/?group_ids[]={group_id}

Lists event embeds in given groups or all.

Example URI

GET https://[own-domain].myclub.fi/api/event_embeds/?group_ids[]=group_id
URI Parameters
HideShow
group_ids
array (optional) 

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

group_id
number (optional) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "event_embed": {
      "id": 554,
      "name": "League games",
      "group_id": 25,
      "default_mode": "month",
      "visibility": "all",
      "registration": "all",
      "components": null,
      "max_amount": 20,
      "max_weeks": null,
      "embed_style_id": null,
      "hide_filters": true,
      "show_sub_groups": false,
      "subscription_enabled": null,
      "default_locale": "fi",
      "category_ids": [
        13
      ],
      "venue_ids": null,
      "ics_link": "https://download-feed.myclub.fi/events.ics",
      "embed_url": "https://link-to-embed.myclub.fi"
    }
  },
  {
    "event_embed": {
      "id": 555,
      "name": "Training",
      "group_id": 35,
      "default_mode": "list",
      "visibility": "group",
      "registration": "group",
      "components": null,
      "max_amount": null,
      "max_weeks": null,
      "embed_style_id": 7,
      "hide_filters": false,
      "show_sub_groups": true,
      "subscription_enabled": null,
      "default_locale": "fi",
      "category_ids": [
        16
      ],
      "venue_ids": null,
      "ics_link": "https://download-feed.myclub.fi/events2.ics",
      "embed_url": "https://link-to-embed2.myclub.fi"
    }
  }
]

Notification Embeds

Keys for notification embed

Key Required Description
name X Name of the notification embed.
group_id X Id of the group to display notifications from.
default_mode X One of condensed, list. How to display the embedded notifications.
max_amount Limit amount of notifications to show. Maximum value is 50 (default).
embed_style_id Id of the EmbedStyle to associate with the embed.
hide_filters One of false (default) or true. Should filtering functionality be hidden.
show_sub_groups One of false (default) or true. Should notifications from sub groups be shown.
default_locale One of fi, en, sv. Display using this locale. If left blank, selects locale by browser language, or fi.

Creation

Create notification embed
POST/api/notification_embeds

Example URI

POST https://[own-domain].myclub.fi/api/notification_embeds
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "notification_embed": {
    "name": "News",
    "group_id": 25,
    "default_mode": "condensed",
    "max_amount": 20,
    "hide_filters": true,
    "show_sub_groups": false,
    "default_locale": "fi"
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "notification_embed": {
    "id": 33,
    "name": "News",
    "group_id": 25,
    "default_mode": "condensed",
    "max_amount": 20,
    "hide_filters": true,
    "show_sub_groups": false,
    "default_locale": "fi",
    "embed_url": "https://link-to-embed.myclub.fi"
  }
}

Existing notification embeds

Show notification embed
GET/api/notification_embeds/{id}

Example URI

GET https://[own-domain].myclub.fi/api/notification_embeds/id
URI Parameters
HideShow
id
number (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "notification_embed": {
    "id": 33,
    "name": "News",
    "group_id": 25,
    "default_mode": "condensed",
    "max_amount": 20,
    "hide_filters": true,
    "show_sub_groups": false,
    "default_locale": "fi",
    "embed_url": "https://link-to-embed.myclub.fi"
  }
}

Update notification embed
PUT/api/notification_embeds/{id}

Example URI

PUT https://[own-domain].myclub.fi/api/notification_embeds/id
URI Parameters
HideShow
id
number (required) 
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "notification_embed": {
    "default_mode": "list"
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "notification_embed": {
    "id": 33,
    "name": "News",
    "group_id": 25,
    "default_mode": "list",
    "max_amount": 20,
    "hide_filters": true,
    "show_sub_groups": false,
    "default_locale": "fi",
    "embed_url": "https://link-to-embed.myclub.fi"
  }
}

Delete notification embed
DELETE/api/notification_embeds/{id}

Example URI

DELETE https://[own-domain].myclub.fi/api/notification_embeds/id
URI Parameters
HideShow
id
number (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
"ok"

List notification embeds

List notification embeds
GET/api/notification_embeds/?group_ids[]={group_id}

Lists notification embeds in given groups or all.

Example URI

GET https://[own-domain].myclub.fi/api/notification_embeds/?group_ids[]=group_id
URI Parameters
HideShow
group_ids
array (optional) 

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

group_id
number (optional) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "notification_embed": {
      "id": 33,
      "name": "News",
      "group_id": 25,
      "default_mode": "condensed",
      "max_amount": 20,
      "hide_filters": true,
      "show_sub_groups": false,
      "default_locale": "fi",
      "embed_url": "https://link-to-embed.myclub.fi"
    }
  },
  {
    "notification_embed": {
      "id": 122,
      "name": "Team announcements",
      "group_id": 2,
      "default_mode": "list",
      "max_amount": 10,
      "hide_filters": false,
      "show_sub_groups": false,
      "default_locale": "fi",
      "embed_url": "https://link-to-embed.myclub.fi"
    }
  }
]

Member Embeds

Keys for member embed

Key Required Description
name X Name of the member embed.
group_id X Id of the group to display members from.
default_mode X One of list_with_images, list. How to display the embedded members.
max_amount Limit amount of members to show. Maximum value is 100 (default).
embed_style_id Id of the EmbedStyle to associate with the embed.
default_locale One of fi, en, sv. Display using this locale. If left blank, selects locale by browser language, or fi.
category_ids Array of Level ids to display members from. By default does not limit by level.

Creation

Create member embed
POST/api/member_embeds

Example URI

POST https://[own-domain].myclub.fi/api/member_embeds
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "member_embed": {
    "name": "Staff",
    "group_id": 67,
    "default_mode": "list_with_images",
    "max_amount": 10,
    "category_ids": [
      12
    ],
    "default_locale": "fi"
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "member_embed": {
    "id": 73,
    "name": "Staff",
    "group_id": 67,
    "default_mode": "list_with_images",
    "max_amount": 10,
    "category_ids": [
      12
    ],
    "default_locale": "fi",
    "embed_url": "https://link-to-embed.myclub.fi"
  }
}

Existing member embeds

Show member embed
GET/api/member_embeds/{id}

Example URI

GET https://[own-domain].myclub.fi/api/member_embeds/id
URI Parameters
HideShow
id
number (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "member_embed": {
    "id": 73,
    "name": "Staff",
    "group_id": 67,
    "default_mode": "list_with_images",
    "max_amount": 10,
    "category_ids": [
      12
    ],
    "default_locale": "fi",
    "embed_url": "https://link-to-embed.myclub.fi"
  }
}

Update member embed
PUT/api/member_embeds/{id}

Example URI

PUT https://[own-domain].myclub.fi/api/member_embeds/id
URI Parameters
HideShow
id
number (required) 
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "member_embed": {
    "default_mode": "list"
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "member_embed": {
    "id": 73,
    "name": "Staff",
    "group_id": 67,
    "default_mode": "list",
    "max_amount": 10,
    "category_ids": [
      12
    ],
    "default_locale": "fi",
    "embed_url": "https://link-to-embed.myclub.fi"
  }
}

Delete member embed
DELETE/api/member_embeds/{id}

Example URI

DELETE https://[own-domain].myclub.fi/api/member_embeds/id
URI Parameters
HideShow
id
number (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
"ok"

List member embeds

List member embeds
GET/api/member_embeds/?group_ids[]={group_id}

Lists member embeds in given groups or all.

Example URI

GET https://[own-domain].myclub.fi/api/member_embeds/?group_ids[]=group_id
URI Parameters
HideShow
group_ids
array (optional) 

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

group_id
number (optional) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "member_embed": {
      "id": 73,
      "name": "Staff",
      "group_id": 67,
      "default_mode": "list_with_images",
      "max_amount": 10,
      "category_ids": [
        12
      ],
      "default_locale": "fi",
      "embed_url": "https://link-to-embed.myclub.fi"
    }
  },
  {
    "member_embed": {
      "id": 122,
      "name": "Players",
      "group_id": 67,
      "default_mode": "list_with_images",
      "max_amount": 30,
      "category_ids": [
        22,
        23
      ],
      "default_locale": "fi",
      "embed_url": "https://link-to-embed.myclub.fi"
    }
  }
]

Shop Product Embeds

Keys for shop product embed

Key Required Description
name X Name of the shop product embed.
max_amount Limit amount of shop products to show. Leave empty to display all.
embed_style_id Id of the EmbedStyle to associate with the embed.
default_locale One of fi, en, sv. Display using this locale. If left blank, selects locale by browser language, or fi.

Creation

Create shop product embed
POST/api/shop_product_embeds

Example URI

POST https://[own-domain].myclub.fi/api/shop_product_embeds
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "shop_product_embed": {
    "name": "Top 30 Products",
    "max_amount": 30,
    "default_locale": "fi"
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "shop_product_embed": {
    "id": 33,
    "name": "Top 30 Products",
    "max_amount": 30,
    "default_locale": "fi",
    "embed_url": "https://link-to-embed.myclub.fi"
  }
}

Existing shop product embeds

Show shop product embed
GET/api/shop_product_embeds/{id}

Example URI

GET https://[own-domain].myclub.fi/api/shop_product_embeds/id
URI Parameters
HideShow
id
number (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "shop_product_embed": {
    "id": 33,
    "name": "Top 30 Products",
    "max_amount": 30,
    "default_locale": "fi",
    "embed_url": "https://link-to-embed.myclub.fi"
  }
}

Update shop product embed
PUT/api/shop_product_embeds/{id}

Example URI

PUT https://[own-domain].myclub.fi/api/shop_product_embeds/id
URI Parameters
HideShow
id
number (required) 
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "shop_product_embed": {
    "name": "Top 20 Products",
    "max_amount": 20
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "shop_product_embed": {
    "id": 33,
    "name": "Top 20 Products",
    "max_amount": 20,
    "default_locale": "fi",
    "embed_url": "https://link-to-embed.myclub.fi"
  }
}

Delete shop product embed
DELETE/api/shop_product_embeds/{id}

Example URI

DELETE https://[own-domain].myclub.fi/api/shop_product_embeds/id
URI Parameters
HideShow
id
number (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
"ok"

List shop product embeds

List shop product embeds
GET/api/shop_product_embeds

Lists shop product embeds.

Example URI

GET https://[own-domain].myclub.fi/api/shop_product_embeds
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "shop_product_embed": {
      "id": 33,
      "name": "Top 20 Products",
      "max_amount": 20,
      "default_locale": "fi",
      "embed_url": "https://link-to-embed.myclub.fi"
    }
  },
  {
    "shop_product_embed": {
      "id": 122,
      "name": "All products",
      "max_amount": null,
      "default_locale": "fi",
      "embed_url": "https://link-to-embed.myclub.fi"
    }
  }
]

Club

Club information

Show basic information of club
GET/api/club

Return details for the club.

Example URI

GET https://[own-domain].myclub.fi/api/club
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "club": {
    "name": "Demo Club",
    "street": "Example Street 5",
    "zip": "000000",
    "city": "Capitol City",
    "email": "email@democlub.com",
    "description": "Club for all sports.",
    "logo": {
      "url": "http://image.png",
      "content_type": "image/png"
    },
    "invoicing_details": {
      "reference": "Contact Person",
      "street": "Example Street 5",
      "zip": "000000",
      "city": "Capitol City",
      "e_invoice_address": "0506845840"
    }
  }
}

Other

Bank Accounts

List bank accounts
GET/api/bank_accounts

Shows bank accounts defined by the club

Example URI

GET https://[own-domain].myclub.fi/api/bank_accounts
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "bank_account": {
      "bic": "OKOYFIHH",
      "display_order": 0,
      "iban": "FI8650000120008123",
      "id": 9,
      "name": "Perustili",
      "online_payments": true,
      "receiver_address": null,
      "receiver_email": null,
      "receiver_name": "Demo-Seura",
    }
  },
  {
    "bank_account": {
      "bic": "AABAFI22",
      "display_order": 0,
      "iban": "FI3866010001186123",
      "id": 10,
      "name": "Toinen tili",
      "online_payments": true,
      "receiver_address": "Linnoitustie 4A\r\n02600 Espoo",
      "receiver_email": "myclub.demo@gmail.com",
      "receiver_name": "Demo Seura Ry",
    }
  }
]

Invoicing Categories

List invoicing categories
GET/api/invoicing_categories

Shows invoicing categories that can be used to categorize invoice lines

Example URI

GET https://[own-domain].myclub.fi/api/invoicing_categories
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "invoicing_category": {
      "display_order": 100,
      "id": 57,
      "name": "Jäsenmaksut"
    }
  },
  {
    "invoicing_category": {
      "display_order": 110,
      "id": 58,
      "name": "Kurssimaksut"
    }
  },
  {
    "invoicing_category": {
      "display_order": 120,
      "id": 59,
      "name": "Kausimaksut"
    }
  },
  {
    "invoicing_category": {
      "display_order": 140,
      "id": 60,
      "name": "Vakuutusmaksut"
    }
  },
  {
    "invoicing_category": {
      "display_order": 130,
      "id": 61,
      "name": "Kenttämaksut"
    }
  },
  {
    "invoicing_category": {
      "display_order": 150,
      "id": 62,
      "name": "Varustemaksut"
    }
  },
  {
    "invoicing_category": {
      "display_order": 160,
      "id": 63,
      "name": "Muu"
    }
  }
]

Membership Levels

List membership levels
GET/api/groups/{id}

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

Example URI

GET https://[own-domain].myclub.fi/api/groups/id
URI Parameters
HideShow
id
number (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  "Kannattajajäsen",
  "Jäsen",
  "Valmennuspäälikkö",
  "Kunniajäsen",
  "Hallituksen jäsen",
  "Hallituksen puheenjohtaja"
]

Venues

List venues
GET/api/venues

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

Example URI

GET https://[own-domain].myclub.fi/api/venues
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "venue": {
      "city": "Espoo",
      "club_id": 9,
      "country": "Suomi",
      "created_at": "2013-08-27T13:15:00+03:00",
      "id": 81,
      "map_link": null,
      "name": "Kannusillanmäen väestönsuoja",
      "street": "Kannusillankatu 4",
      "updated_at": "2013-08-27T13:15:00+03:00",
      "web_link": null,
      "zip": "02770"
    }
  },
  {
    "venue": {
      "city": "Espoo",
      "club_id": 9,
      "country": "Suomi",
      "created_at": "2013-08-27T13:15:00+03:00",
      "id": 82,
      "map_link": null,
      "name": "Espoonlahden urheiluhalli",
      "street": "Rehtorintie 11",
      "updated_at": "2013-08-27T13:15:00+03:00",
      "web_link": null,
      "zip": "02320"
    }
  }
]

Event Categories

List event categories
GET/api/event_categories

List all event categories for club.

Example URI

GET https://[own-domain].myclub.fi/api/event_categories
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  "event_category": { "id": 411, "color": "#ff0000", "name": "Training" },
  "event_category": { "id": 412, "color": "#959595", "name": "Tournament" },
  "event_category": { "id": 413, "color": "#446688", "name": "Match" },
]

Card products

List card products
GET/api/card_products

Shows card products defined by the club

Example URI

GET https://[own-domain].myclub.fi/api/card_products
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "card_product": {
      "id": 10,
      "name": "Season card 2019",
      "valid_from": "2019-01-01",
      "valid_until": "2019-06-30",
      "days_valid": null,
      "usage_times": null,
      "gross_unit_price": "155.0",
      "vat_percent": "0.0"
    }
  },
  {
    "card_product": {
      "id": 11,
      "name": "10 times card",
      "valid_from": null,
      "valid_until": null,
      "days_valid": 90,
      "usage_times": 10,
      "gross_unit_price": "39.9",
      "vat_percent": "0.0"
    }
  }
]

Generated by aglio on 09 Oct 2019