mirror of
https://github.com/anna-sara/vbytes_lan.git
synced 2025-12-23 21:17:12 +01:00
9.8 KiB
9.8 KiB
Endpoints
GET /data/{api_token}
Parameters
name type data type description api_tokenrequired string Api key with permission
Responses
http code content-type response 200application/jsonjson object 401application/json{"code": 401,"message": "Unauthorized" }
Example response different keys
KEY 1
{
"participants": [
{
"id": 1,
"lan_id": 1,
"first_name": "John",
"surname": "Doe",
"grade": "8",
"phone": null,
"email": null,
"guardian_name": "John Doe",
"guardian_phone": "070123456",
"guardian_email": "mail@mail.com",
"is_visiting": 1,
"friends": null,
"special_diet": null,
"status": "lan",
"created_at": "2025-11-19T17:44:22.000000Z",
"updated_at": "2025-11-19T17:47:17.000000Z"
}
],
"volunteers": [
{
"id": 1,
"lan_id": 300,
"first_name": "Jane",
"surname": "Doe",
"phone": "070123456",
"email": "mail@mail.com",
"areas": [
"Städ",
"Kiosk"
],
"comment": null,
"created_at": "2025-11-19T17:45:15.000000Z",
"updated_at": "2025-11-19T17:48:05.000000Z"
}
]
}
KEY 2
{
"participants": [
{
"first_name": "John",
"surname": "Doe"
}
],
"volunteers": [
{
"first_name": "Jane",
"surname": "Doe"
}
]
}
KEY 3
{
"participants": [
{
"id": 1,
"lan_id": 1,
"first_name": "John",
"surname": "Doe",
"grade": "8",
"phone": null,
"email": null,
"guardian_name": "John Doe",
"guardian_phone": "070123456",
"guardian_email": "mail@mail.com",
"is_visiting": 1,
"friends": null,
"special_diet": null,
"status": "lan",
"created_at": "2025-11-19T17:44:22.000000Z",
"updated_at": "2025-11-19T17:47:17.000000Z"
}
]
}
KEY 4
{
"participants": [
{
"first_name": "John",
"surname": "Doe"
}
]
}
GET /version/{api_token}
Parameters
name type data type description api_tokenrequired string Api key with permission
Responses
http code content-type response 200application/jsonjson object 401application/json{"code": 401,"message": "Unauthorized" }
Example response different keys
KEY 1
{
"success": true,
"participants": 3,
"volunteers": 2
}
KEY 2
{
"success": true,
"participants": 3,
"volunteers": 2
}
KEY 3
{
"success": true,
"participants": 3
}
KEY 4
{
"success": true,
"participants": 3
}
POST /participant/{api_token}
Parameters
name type data type description api_tokenrequired string Api key with permission
Body data
name type data type description first_namerequired string Participant first name suramerequired string Participant surname graderequired string Participant grade phonenullable string Participant phone number nullable string Participant email guardian_namerequired string Participant guardian name guardian_phonerequired string Participant guardian phone guardian_emailrequired string Participant guardian email is_visitingrequired boolean 1 = Visiting , 0 = LAN gdprrequired booelan Participant accepts gdpr friendsnullable string Participant want to sit with special_dietnullable string Participant special diet
{
"first_name": "Joe",
"surname": "Doe",
"grade": "8",
"phone": null,
"email": null,
"guardian_name": "Jane Doe",
"guardian_phone": "070123456",
"guardian_email": "email@email.com",
"is_visiting": 1,
"gdpr": 1,
"friends": "Jake, James",
"special_diet": "Laktos"
}
Responses
http code content-type response 200application/json{"code": 200, "message": "Participant was created successfully" } 401application/json{"code": 401,"message": "Unauthorized" }
POST /volunteer/{api_token}
Parameters
name type data type description api_tokenrequired string Api key with permission
Body data
name type data type description first_namerequired string Volunteer first name suramerequired string Volunteer surname phonerequired string Volunteer phone number required string Volunteer email gdprrequired booelan Volunteer accepts gdpr areasrequired json Volunteer want to help put in this areas
{
"first_name": "Jane",
"surname": "Doe",
"phone": "0700123456",
"email": "email@email.com",
"gdpr": 1,
"areas": [
"Städ", "Kiosk"
]
}
Responses
http code content-type response 200application/json{"code": 200, "message": "Volunteer was created successfully" } 401application/json{"code": 401,"message": "Unauthorized" }