Ir al contenido

Listar feriados

GET/api/holiday

Devuelve la lista paginada de feriados. Usa BaseControllerHelper::index. Los parámetros comunes (search, status, trashed, ids, fechas, per_page…) se describen en Paginación y filtros.

per_pageinteger

Registros por página. Por defecto 20.

orderstring

Campo y sentido, por ejemplo name|ASC. Campos permitidos: id, name, created_at, updated_at, status. Por defecto id|DESC.

relationsstring

Relaciones a cargar. El modelo no restringe las relaciones.

No exige un permiso del módulo: HolidayPolicy::viewAny devuelve verdadero para cualquier usuario autenticado.

Ventana de terminal
curl -X GET \
"https://servererp.allendostmen.app/api/holiday" \
-H "Authorization: Bearer $TOKEN" \
-H "Accept: application/json"
Lista paginada200
{
"current_page": 1,
"data": [
{
"id": 1,
"name": "FERIADOS 2026",
"values": [
"2026-01-01",
"2026-07-28",
"2026-12-25"
],
"status": "activo",
"previous_status": null,
"status_update_comment": null,
"status_update_date": null,
"status_update_user_id": null,
"create_user_id": 1,
"update_user_id": null,
"delete_user_id": null,
"restore_user_id": null,
"created_at": "2026-11-19T10:40:15.000000Z",
"updated_at": "2026-11-19T10:40:15.000000Z",
"deleted_at": null
}
],
"first_page_url": "https://servererp.allendostmen.app/api/holiday?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://servererp.allendostmen.app/api/holiday?page=1",
"next_page_url": null,
"path": "https://servererp.allendostmen.app/api/holiday",
"per_page": 20,
"prev_page_url": null,
"to": 1,
"total": 1
}
Sin permiso403
{
"message": "This action is unauthorized."
}