Click here for a complete list of routes.
/events
GET /events restricted
This request returns the events for a given member.
The following is a sample HTTP GET request and response. The placeholders
shown need to be replaced with actual values.
Request example
GET /v2/events HTTP/1.1
Host: api.lions.at
X-Authorization: access-token
Response example
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{
"success": true,
"count": 1,
"events": {
"id": 123,
"type": "EVENT",
"title": "title of the event",
"startDate": "2012-12-20 11:30",
"endDate": "",
"allDay": false,
"description": "description of the event",
"...": "..."
}
}
GET /events/id
restricted
This request returns the details of an event for a given member.
The following is a sample HTTP GET request and response. The placeholders
shown need to be replaced with actual values.
Request example
GET /v2/events/id
HTTP/1.1 Host: api.lions.at X-Authorization:access-token
Response example
HTTP/1.1 200 OK Content-Type: application/json Content-Length:length
{ "id":id
, "type": "EVENT", "title": "title of the event", "startDate": "2012-12-20 11:30", "endDate": "", "allDay": false, "description": "description of the event", "location": { "name": "Restaurant A la bonne fourchette", "address": "Route de Berne 125", "postalCode": "1580", "city": "Avenches", "country": "CH", "latitude": 46.883254, "longitude": 7.045321, "phone": "026 123 45 67", "email": "", "www": "https://www.mon-restaurant.tld" }, "registrationEnabled": true, "registrationDueDate": "2024-11-22 07:29", "registrationUrl": "", "reviewEnabled": false, "attachment": "", "banner": "", "bannerSq": "", "attending": "NO", "attendingComment": "", "hasRegistration": true, "hasQuestions": "", "hasUnansweredQuestions": false, "questions": [], "guests": [] }
POST /events/id
restricted
This request updates the registration to an event for a given member.
The following is a sample HTTP POST request and response. The placeholders
shown need to be replaced with actual values.
Request example
POST /v2/events/id
HTTP/1.1 Host: api.lions.at X-Authorization:access-token
Content-Type: application/json Content-Length:length
{ "attending": "YES", "attendingComment": "Looking forward to it" }
Response example
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"success":true}
GET /events/id
/members
restricted
This request returns the list of members attending or not attending the event and those who did not answer (unknown). Unknown list may be partial if too large (> 80).
The following is a sample HTTP GET request and response. The placeholders
shown need to be replaced with actual values.
Request example
GET /v2/events/id
/members HTTP/1.1 Host: api.lions.at X-Authorization:access-token
Response example
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{
"success": true,
"count": 2,
"members": [
{
"id": 5,
"fullName": "Franz Muster",
"...": "..."
},
{
"id": 9,
"fullName": "Franz Mustermann",
"...": "..."
}
],
"absent": [],
"unknown": [],
"comments": [
{
"member": 5,
"content": "I have another meeting"
}
]
}
POST /events/id
/members/invite
restricted
This request invites a member or an external guest (or partner) to the event (if enabled for the event).
The following is a sample HTTP POST request and response. The placeholders
shown need to be replaced with actual values.
Request example
POST /v2/events/id
/members/invite HTTP/1.1 Host: api.lions.at X-Authorization:access-token
Content-Type: application/json Content-Length:length
{ "member": 1234, "guest_first_name": "", "guest_last_name": "", "guest_email": "", "guest_message": "", "partner": false }
Response example
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{
"success": true
}
POST /events/id
/members/member-id
restricted
This request updates the attending status of a given member (beware: it does not work with external guest). Attending status may be either "YES" or "NO". Until the beginning of the event, the change is as if the participant changed their mind (even if registration is closed). Afterwards it is considered to be an actual review of the participation.
The following is a sample HTTP POST request and response. The placeholders
shown need to be replaced with actual values.
Request example
POST /v2/events/id
/members/member-id
HTTP/1.1 Host: api.lions.at X-Authorization:access-token
Content-Type: application/json Content-Length:length
{ "attending": "YES" }
Response example
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{
"success": true
}
GET /events/id
/members/member-id
/answers
restricted
This request fetches the answers (and registration) of a given member.
The following is a sample HTTP GET request and response. The placeholders
shown need to be replaced with actual values.
Request example
GET /v2/events/id
/members/member-id
/answers HTTP/1.1 Host: api.lions.at X-Authorization:access-token
Response example
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{
"...": "..."
}
POST /events/id
/members/member-id
/answers
restricted
This request updates the answer to the question associated to the registration of a given member. This endpoint is only available to reviewers and is accessible anytime, even after the end of the registration period.
The following is a sample HTTP POST request and response. The placeholders
shown need to be replaced with actual values.
Request example
POST /v2/events/id
/members/member-id
/answers HTTP/1.1 Host: api.lions.at X-Authorization:access-token
Content-Type: application/json Content-Length:length
{ "question": 1234, "answer": "some-answer" }
Response example
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{
"success": true
}
GET /events/id
/ticket
restricted
This request generates the ticket of the given person.
The following is a sample HTTP GET request and response. The placeholders
shown need to be replaced with actual values.
Request example
GET /v2/events/id
/ticket?registration
=1234
& HTTP/1.1 Host: api.lions.at X-Authorization:access-token
Response example
HTTP/1.1 200 OK
Content-Type: application/pdf
Content-Length: length
(binary data)
GET /events/create restricted
This request returns calendars where new events may be created.
The following is a sample HTTP GET request and response. The placeholders
shown need to be replaced with actual values.
Request example
GET /v2/events/create HTTP/1.1
Host: api.lions.at
X-Authorization: access-token
Response example
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{
"success": true,
"count": 1,
"calendars": [
{
"id": 123,
"title": "LC Carcassonne Liberte"
}
]
}
POST /events/confirm restricted
This request confirms the attendance to an event for a given member. This is a restricted API which may only be called by authorized reviewers of the corresponding event.
The following is a sample HTTP POST request and response. The placeholders
shown need to be replaced with actual values.
Request example
POST /v2/events/confirm HTTP/1.1 Host: api.lions.at X-Authorization:access-token
Content-Type: application/json Content-Length:length
{ "barcode": "[reviewBarcode as fetched when calling /events for a given member]", "event": 1234, "metaid": 0 }
Response example
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{
"success": true,
"error": ""
}
Name | Type | Description |
---|---|---|
error | string | Error message in English |
errorCode | int |
|
errorInfo | array | Content depends on the corresponding error |
GET /events/ical/identifier
restricted
This request returns a iCalendar feed with events attended by the member associated with the given identifier. Past events are removed from feed after 1 year.
The following is a sample HTTP GET request and response. The placeholders
shown need to be replaced with actual values.
Request example
GET /v2/events/ical/identifier
HTTP/1.1
Host: api.lions.at
Response example
HTTP/1.1 200 OK
Content-Type: text/calendar
Content-Length: length
BEGIN:VCALENDAR
VERSION:2.0
...