GET /api/faq/category/:id
Publiek endpoint om FAQ-items binnen een specifieke categorie te zoeken.
Base URL
- Productie:
https://faq.dlapolakow.app
Request
- Methode:
GET - Pad:
/api/faq/category/:id
Path params
id(number, required): categorie-id.
Query params
q(string, optional): zoekterm.lang(string, optional):pl,en,nl. Standaard ispl.
Request voorbeeld
bash
curl -X GET "https://faq.dlapolakow.app/api/faq/category/1?q=belasting&lang=nl"Response 200
json
{
"ok": true,
"category": {
"id": 1,
"name": {
"pl": "Formalnosci",
"en": "Formalities",
"nl": "Formaliteiten"
}
},
"faqs": [
{
"id": "8b96f5ef2b2f4be8a77d6c6f3a8de9f1",
"slug": "belasting-in-nederland",
"seo_title": "Belasting in Nederland",
"seo_description": "Belangrijkste belastinginformatie",
"category": {
"id": 1,
"name": {
"pl": "Formalnosci",
"en": "Formalities",
"nl": "Formaliteiten"
}
}
}
],
"total": 1,
"q": "belasting"
}Endpoint gedrag
- Retourneert alleen
publisheditems uit de gekozen categorie. - Als
qleeg is, retourneert het maximaal 50 items uit die categorie. - Als
qis opgegeven, gebruikt het dezelfde zoeklogica als de hoofd FAQ-zoekendpoint.
Foutcodes
400ongeldige categorie-id:
json
{
"ok": false,
"error": "Invalid category id"
}404categorie niet gevonden:
json
{
"ok": false,
"error": "Category not found"
}500serverfout:
json
{
"ok": false,
"error": "Unknown error"
}
