FAQ Categories
Manage frequently asked question categories organized by user role.
Create FAQ Category
Creates a new FAQ category.
Request Body
Target user role. Values: GUIDE, TOURIST, BOTH
Display order for the category (lower numbers appear first)
Response
Unique identifier for the FAQ category
Target user role: GUIDE, TOURIST, or BOTH
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
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
Retrieves a specific FAQ category by ID.
Path Parameters
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
Updates an existing FAQ category.
Path Parameters
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
Deletes an FAQ category.
Path Parameters
Example Request
curl -X DELETE http://localhost:8080/api/faq_categories/5
FAQ Items
Manage individual FAQ questions and answers.
Create FAQ Item
Creates a new FAQ item (question and answer pair).
Request Body
ID of the parent FAQ category
The answer to the question
Whether this FAQ item is active/visible. Default: true
Display order within the category (lower numbers appear first)
Response
Unique identifier for the FAQ item
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
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
Retrieves a specific FAQ item by ID.
Path Parameters
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
Updates an existing FAQ item.
Path Parameters
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
Deletes an FAQ item.
Path Parameters
Example Request
curl -X DELETE http://localhost:8080/api/faq_items/142