# Clubs
TIP
For clubs, the data in a response will also contain the data for the active license for the club if the club already has one for the current year. This might reduce the amount of api calls needed to keep your data in sync.
However that license information should not be added to the payload when creating or updating a club. This also means when creating a club, the active license will always be null.
WARNING
As long as the API is still a layer over the old database, the contact_person_id field will be ignored.
# Events
--- CLUB_CREATED ---
{
"event": "CLUB_CREATED",
"data": {
"club_id": 123
}
}
--- CLUB_UPDATED ---
{
"event": "CLUB_UPDATED",
"data": {
"club_id": 123
}
}
# Validation
WARNING
As long as the API is still a layer over the old database, the contact_person_id field will be ignored.
{
"name": [
"required",
"max:118",
],
"subname": [
"nullable",
"max:255",
],
"is_active": [
"boolean",
],
"location": [
"required",
"valid address id"
],
"registered_office": [
"nullable",
"valid address id"
],
"correspondence_address": [
"nullable",
"valid address id"
],
"contact_person_id": [
"nullable",
"valid person id",
],
"president_id": [
"nullable",
"valid person id",
],
"secretary_id": [
"nullable",
"valid person id",
],
"treasurer_id": [
"nullable",
"valid person id",
],
"phone": [
"nullable",
"max:20",
],
"fax": [
"nullable",
"max:20",
],
"email": [
"nullable",
"email",
"max:128",
],
"website": [
"nullable",
"url",
"max:128"
],
"founding_date": [
"required",
"date",
],
"legal_form": [
"required",
{
"rule": "in",
"values": [
"VZW / ASBL",
"BVBA / SPRL",
"CBVBA / SCRL",
"EBVBA / SPRLU",
"CVOA / SCRI",
"Eenmanszaak / Pers. Physique",
"Feitelijke vereniging / Ass. De Fait",
"NV / SA",
"Vennootschap / Société",
"VOF / SNC",
"SCA",
"SCS"
],
}
],
"company_number": [
"nullable",
{
"rule": "legal_form in",
"values": [
"Feitelijke vereniging / Ass. De Fait",
],
},
"max:20",
"requiredIf",
{
"rule": "legal_form in",
"values": [
"VZW / ASBL",
"BVBA / SPRL",
"CBVBA / SCRL",
"EBVBA / SPRLU",
"CVOA / SCRI",
"Eenmanszaak / Pers. Physique",
"NV / SA",
"Vennootschap / Société",
"VOF / SNC",
"SCA",
"SCS"
],
}
],
"bank_account_iban": [
"nullable",
"max:32",
],
"bank_account_bic": [
"nullable",
"max:16",
],
"exam_organiser": [
"boolean",
],
"declined": [
"boolean",
],
"declined_notes": [
"nullable",
],
"debt_kbrsf": [
"numeric",
],
"debt_kbrsf_notes": [
"nullable",
],
"debt_liga": [
"numeric",
],
"debt_liga_notes": [
"nullable",
],
"dont_use_external_data": [
"boolean",
],
}
# List
--- ENDPOINT ---
Domain: equidata
Paginated: true
Url: /clubs?page=2
Method: GET
--- EXAMPLE RESPONSE ---
{
// pagination meta,
"data": [
{
"id": 1,
"name": "Some Horses",
"is_active": false,
"active_license": {}, // a club license entity OR null
"location": {}, // an address entity
"registered_office": {}, // an address entity OR null
"correspondence_address": {}, // an address entity OR null
"contact_person": {}, // a person entity OR null. **While a layer over the old database this can also be a minimal person entity with id null having name, phone number and email fields filled.**
"president": {}, // a person entity OR null
"secretary": {}, // a person entity OR null
"treasurer": {}, // a person entity OR null
"phone": "017 82 46 99",
"fax": "066 98 66 27",
"email": "alyssa.collignon@delhaye.net",
"website": "http://segers.be",
"founding_date": "1991-05-26",
"company_number": "179703",
"legal_form": "SCS",
"bank_account_iban": "LU2807159U00C5QG5XP1",
"bank_account_bic": "LXJASUB6",
"declined": false,
"declined_notes": "Iusto rerum rerum dolores itaque voluptates omnis.",
"debt_kbrsf": "646.82",
"debt_kbrsf_notes": "Sit et temporibus commodi esse magni.",
"debt_liga": "831.88",
"debt_liga_notes": "Aut eligendi dolore voluptate neque.",
"exam_organiser": false,
"dont_use_external_data": true
},
/* ... other entries */
]
}
# Show
--- ENDPOINT ---
Domain: equidata
Url: /clubs/1
Method: GET
--- EXAMPLE RESPONSE ---
{
"id": 1,
"name": "Some Horses",
"is_active": false,
"active_license": null, // OR a club license entity
"location": {}, // an address entity
"registered_office": {}, // an address entity OR null
"correspondence_address": {}, // an address entity OR null
"contact_person": {}, // a person entity OR null. **While a layer over the old database this can also be a minimal person entity with id null having name, phone number and email fields filled.**
"president": {}, // a person entity OR null
"secretary": {}, // a person entity OR null
"treasurer": {}, // a person entity OR null
"phone": "017 82 46 99",
"fax": "066 98 66 27",
"email": "alyssa.collignon@delhaye.net",
"website": "http://segers.be",
"founding_date": "1991-05-26",
"company_number": "179703",
"legal_form": "SCS",
"bank_account_iban": "LU2807159U00C5QG5XP1",
"bank_account_bic": "LXJASUB6",
"declined": false,
"declined_notes": "Iusto rerum rerum dolores itaque voluptates omnis.",
"debt_kbrsf": "646.82",
"debt_kbrsf_notes": "Sit et temporibus commodi esse magni.",
"debt_liga": "831.88",
"debt_liga_notes": "Aut eligendi dolore voluptate neque.",
"exam_organiser": false,
"dont_use_external_data": true
}
# Create
--- ENDPOINT ---
Domain: equidata
Url: /clubs
Method: POST
--- EXAMPLE PAYLOAD ---
{
"name": "Some Horses",
"is_active": false,
"location": {}, // an address entity
"registered_office": {}, // an address entity OR null
"correspondence_address": {}, // an address entity OR null
"contact_person_id": 123, // a valid person id OR null
"president_id": 123, // a valid person id OR null
"secretary_id": 123, // a valid person id OR null
"treasurer_id": 123, // a valid person id OR null
"phone": "017 82 46 99",
"fax": "066 98 66 27",
"email": "alyssa.collignon@delhaye.net",
"website": "http://segers.be",
"founding_date": "1991-05-26",
"company_number": "179703",
"legal_form": "SCS",
"bank_account_iban": "LU2807159U00C5QG5XP1",
"bank_account_bic": "LXJASUB6",
"declined": false,
"declined_notes": "Iusto rerum rerum dolores itaque voluptates omnis.",
"debt_kbrsf": "646.82",
"debt_kbrsf_notes": "Sit et temporibus commodi esse magni.",
"debt_liga": "831.88",
"debt_liga_notes": "Aut eligendi dolore voluptate neque.",
"exam_organiser": false,
"dont_use_external_data": true
}
--- EXAMPLE RESPONSE ---
{
"id": 1,
"name": "Some Horses",
"is_active": false,
"active_license": {}, // a club license entity OR null
"location": {}, // an address entity
"registered_office": {}, // an address entity OR null
"correspondence_address": {}, // an address entity OR null
"contact_person": {}, // a person entity OR null
"president": {}, // a person entity OR null
"secretary": {}, // a person entity OR null
"treasurer": {}, // a person entity OR null
"phone": "017 82 46 99",
"fax": "066 98 66 27",
"email": "alyssa.collignon@delhaye.net",
"website": "http://segers.be",
"founding_date": "1991-05-26",
"company_number": "179703",
"legal_form": "SCS",
"bank_account_iban": "LU2807159U00C5QG5XP1",
"bank_account_bic": "LXJASUB6",
"declined": false,
"declined_notes": "Iusto rerum rerum dolores itaque voluptates omnis.",
"debt_kbrsf": "646.82",
"debt_kbrsf_notes": "Sit et temporibus commodi esse magni.",
"debt_liga": "831.88",
"debt_liga_notes": "Aut eligendi dolore voluptate neque.",
"exam_organiser": false,
"dont_use_external_data": true
}
# Update
--- ENDPOINT ---
Domain: equidata
Url: /clubs/1
Method: PUT
--- EXAMPLE PAYLOAD ---
{
"name": "Some Horses",
"is_active": false,
"location": {}, // an address entity
"registered_office": {}, // an address entity OR null
"correspondence_address": {}, // an address entity OR null
"contact_person_id": 123, // a valid person id OR null
"president_id": 123, // a valid person id OR null
"secretary_id": 123, // a valid person id OR null
"treasurer_id": 123, // a valid person id OR null
"phone": "017 82 46 99",
"fax": "066 98 66 27",
"email": "alyssa.collignon@delhaye.net",
"website": "http://segers.be",
"founding_date": "1991-05-26",
"company_number": "179703",
"legal_form": "SCS",
"bank_account_iban": "LU2807159U00C5QG5XP1",
"bank_account_bic": "LXJASUB6",
"declined": false,
"declined_notes": "Iusto rerum rerum dolores itaque voluptates omnis.",
"debt_kbrsf": "646.82",
"debt_kbrsf_notes": "Sit et temporibus commodi esse magni.",
"debt_liga": "831.88",
"debt_liga_notes": "Aut eligendi dolore voluptate neque.",
"exam_organiser": false,
"dont_use_external_data": true
}
--- EXAMPLE RESPONSE ---
{
"id": 1,
"name": "Some Horses",
"is_active": false,
"active_license": {}, // a club license entity OR null
"location": {}, // an address entity
"registered_office": {}, // an address entity OR null
"correspondence_address": {}, // an address entity OR null
"contact_person": {}, // a person entity OR null
"president": {}, // a person entity OR null
"secretary": {}, // a person entity OR null
"treasurer": {}, // a person entity OR null
"phone": "017 82 46 99",
"fax": "066 98 66 27",
"email": "alyssa.collignon@delhaye.net",
"website": "http://segers.be",
"founding_date": "1991-05-26",
"company_number": "179703",
"legal_form": "SCS",
"bank_account_iban": "LU2807159U00C5QG5XP1",
"bank_account_bic": "LXJASUB6",
"declined": false,
"declined_notes": "Iusto rerum rerum dolores itaque voluptates omnis.",
"debt_kbrsf": "646.82",
"debt_kbrsf_notes": "Sit et temporibus commodi esse magni.",
"debt_liga": "831.88",
"debt_liga_notes": "Aut eligendi dolore voluptate neque.",
"exam_organiser": false,
"dont_use_external_data": true
}