Skip to content

GET /api/faq/categories

Public endpoint to fetch FAQ categories.

Base URL

  • Production: https://faq.dlapolakow.app

Request

  • Method: GET
  • Path: /api/faq/categories

Query params

  • lang (string, optional): pl,en,nl. Default is pl.

Request example

bash
curl -X GET "https://faq.dlapolakow.app/api/faq/categories?lang=en"

Response 200

json
{
  "ok": true,
  "categories": [
    {
      "id": 1,
      "name": {
        "pl": "Formalnosci",
        "en": "Formalities",
        "nl": "Formaliteiten"
      },
      "label": "Formalities",
      "published_count": 3
    }
  ]
}

Endpoint behavior

  • Returns all categories from faq_categories.
  • label is localized based on lang.
  • published_count is the number of published FAQ entries in the category.

Error codes

  • 500 server error:
json
{
  "ok": false,
  "error": "Unknown error"
}