Skip to main content

FAQ Categories

Manage frequently asked question categories organized by user role.

Create FAQ Category

POST
endpoint
/api/faq_categories
Creates a new FAQ category. Request Body
name
string
required
Name of the FAQ category
roleScope
enum
required
Target user role. Values: GUIDE, TOURIST, BOTH
sortOrder
integer
Display order for the category (lower numbers appear first)
Response
faqCategoryId
integer
Unique identifier for the FAQ category
name
string
Category name
roleScope
enum
Target user role: GUIDE, TOURIST, or BOTH
sortOrder
integer
Display order
Example Request
curl -X POST http://localhost:8080/api/faq_categories \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Reservaciones y Pagos",
    "roleScope": "TOURIST",
    "sortOrder": 1
  }'
Example Response
{
  "faqCategoryId": 5,
  "name": "Reservaciones y Pagos",
  "roleScope": "TOURIST",
  "sortOrder": 1
}

Get All FAQ Categories

GET
endpoint
/api/faq_categories
Retrieves all FAQ categories. Example Request
curl http://localhost:8080/api/faq_categories
Example Response
[
  {
    "faqCategoryId": 5,
    "name": "Reservaciones y Pagos",
    "roleScope": "TOURIST",
    "sortOrder": 1
  },
  {
    "faqCategoryId": 6,
    "name": "Gestión de Tours",
    "roleScope": "GUIDE",
    "sortOrder": 1
  },
  {
    "faqCategoryId": 7,
    "name": "Cuenta y Seguridad",
    "roleScope": "BOTH",
    "sortOrder": 2
  }
]

Get FAQ Category by ID

GET
endpoint
/api/faq_categories/{id}
Retrieves a specific FAQ category by ID. Path Parameters
id
integer
required
The FAQ category ID
Example Request
curl http://localhost:8080/api/faq_categories/5
Example Response
{
  "faqCategoryId": 5,
  "name": "Reservaciones y Pagos",
  "roleScope": "TOURIST",
  "sortOrder": 1
}

Update FAQ Category

PUT
endpoint
/api/faq_categories/{id}
Updates an existing FAQ category. Path Parameters
id
integer
required
The FAQ category ID
Request Body Same fields as Create FAQ Category. Example Request
curl -X PUT http://localhost:8080/api/faq_categories/5 \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Reservaciones, Pagos y Cancelaciones",
    "roleScope": "TOURIST",
    "sortOrder": 1
  }'

Delete FAQ Category

DELETE
endpoint
/api/faq_categories/{id}
Deletes an FAQ category. Path Parameters
id
integer
required
The FAQ category ID
Example Request
curl -X DELETE http://localhost:8080/api/faq_categories/5

FAQ Items

Manage individual FAQ questions and answers.

Create FAQ Item

POST
endpoint
/api/faq_items
Creates a new FAQ item (question and answer pair). Request Body
faqCategoryId
integer
required
ID of the parent FAQ category
question
string
required
The FAQ question
answer
string
required
The answer to the question
isActive
boolean
Whether this FAQ item is active/visible. Default: true
sortOrder
integer
Display order within the category (lower numbers appear first)
Response
faqItemId
integer
Unique identifier for the FAQ item
faqCategoryId
integer
Parent category ID
question
string
The question
answer
string
The answer
isActive
boolean
Active status
sortOrder
integer
Display order
Example Request
curl -X POST http://localhost:8080/api/faq_items \
  -H "Content-Type: application/json" \
  -d '{
    "faqCategoryId": 5,
    "question": "¿Cómo puedo cancelar mi reservación?",
    "answer": "Puedes cancelar tu reservación desde tu panel de control. Las políticas de cancelación varían según el tour y el guía. Revisa los términos específicos en tu confirmación de reserva.",
    "isActive": true,
    "sortOrder": 1
  }'
Example Response
{
  "faqItemId": 142,
  "faqCategoryId": 5,
  "question": "¿Cómo puedo cancelar mi reservación?",
  "answer": "Puedes cancelar tu reservación desde tu panel de control. Las políticas de cancelación varían según el tour y el guía. Revisa los términos específicos en tu confirmación de reserva.",
  "isActive": true,
  "sortOrder": 1
}

Get All FAQ Items

GET
endpoint
/api/faq_items
Retrieves all FAQ items. Example Request
curl http://localhost:8080/api/faq_items
Example Response
[
  {
    "faqItemId": 142,
    "faqCategoryId": 5,
    "question": "¿Cómo puedo cancelar mi reservación?",
    "answer": "Puedes cancelar tu reservación desde tu panel de control.",
    "isActive": true,
    "sortOrder": 1
  },
  {
    "faqItemId": 143,
    "faqCategoryId": 5,
    "question": "¿Cuándo recibiré mi reembolso?",
    "answer": "Los reembolsos se procesan en 5-7 días hábiles.",
    "isActive": true,
    "sortOrder": 2
  }
]

Get FAQ Item by ID

GET
endpoint
/api/faq_items/{id}
Retrieves a specific FAQ item by ID. Path Parameters
id
integer
required
The FAQ item ID
Example Request
curl http://localhost:8080/api/faq_items/142
Example Response
{
  "faqItemId": 142,
  "faqCategoryId": 5,
  "question": "¿Cómo puedo cancelar mi reservación?",
  "answer": "Puedes cancelar tu reservación desde tu panel de control. Las políticas de cancelación varían según el tour y el guía.",
  "isActive": true,
  "sortOrder": 1
}

Update FAQ Item

PUT
endpoint
/api/faq_items/{id}
Updates an existing FAQ item. Path Parameters
id
integer
required
The FAQ item ID
Request Body Same fields as Create FAQ Item. Example Request
curl -X PUT http://localhost:8080/api/faq_items/142 \
  -H "Content-Type: application/json" \
  -d '{
    "faqCategoryId": 5,
    "question": "¿Cómo puedo cancelar mi reservación?",
    "answer": "Puedes cancelar tu reservación hasta 24 horas antes del tour desde tu panel de control.",
    "isActive": true,
    "sortOrder": 1
  }'

Delete FAQ Item

DELETE
endpoint
/api/faq_items/{id}
Deletes an FAQ item. Path Parameters
id
integer
required
The FAQ item ID
Example Request
curl -X DELETE http://localhost:8080/api/faq_items/142

Build docs developers (and LLMs) love