-
Notifications
You must be signed in to change notification settings - Fork 4
Participants
Alykhan Kanji edited this page Oct 27, 2019
·
7 revisions
GET /participants/:fbid
Status: 200 OK
{
"id": 1,
"fbid": "p1",
"registered": false
"team_id": 1,
"source_id": 1,
"cause_id": 1,
"event_id": 1,
"team": {
"id": 1,
"name": "t1",
"participants": [
{
"id": 1,
"fbid": "p1"
}
],
"achievements": [
{
"id": 1,
"name": "a1",
"distance": 1
}
]
},
"cause": {
"id": 1,
"name": "c1"
},
"event": {
"id": 1,
"name": "e1",
"description": "E1.",
"start_date": "2017-02-01T00:00:00.000Z",
"end_date": "2017-12-31T00:00:00.000Z",
"team_limit": 1,
"team_building_start": "2017-01-01T00:00:00.000Z",
"team_building_end": "2017-01-31T00:00:00.000Z",
"locality_id": 1,
"cause_id": 1
},
"records": [
{
"id": 1,
"date": "2017-02-01T00:00:00.000Z",
"distance": 1,
"participant_id": 1,
"source_id": 1
}
],
"source": {
"id": 1,
"name": "s1"
}
}
GET /participants/:fbid/stats
Status: 200 OK
{
"distance": 1
}
POST /participants
Name | Type | Description |
---|---|---|
fbid | string | Required. The Facebook ID of the participant. |
registered | boolean | The registration status of the participant with AKF. Defaults to false . |
Status: 201 Created
{
"id": 1,
"fbid": "p1"
"registered": false
}
PATCH /participants/:fbid
Name | Type | Description |
---|---|---|
fbid | string | The Facebook ID of the participant. |
registered | boolean | The registration status of the participant with AKF. |
team_id | integer | The team of the participant. |
event_id | integer | The event of the participant. |
source_id | integer | The source of the participant. |
cause_id | integer | The cause of the participant. |
Status: 200 OK
[1]
DELETE /participants/:fbid
Status: 204 No Content