Listar mano de obra de costo unitario
GET/api/unit-cost-workforce
Devuelve la lista paginada de ítems de mano de obra. Usa BaseControllerHelper::index y agrega el filtro unit_cost_id. Los parámetros comunes (search, status, trashed, ids, fechas, per_page…) se describen en Paginación y filtros.
Parámetros de consulta
Sección titulada «Parámetros de consulta»per_pageintegerRegistros por página. Por defecto 20.
unit_cost_idintegerDevuelve solo los ítems de ese costo unitario.
orderstringCampo y sentido, por ejemplo name|ASC. Campos permitidos: id, name, created_at, updated_at, status. Por defecto id|DESC.
relationsstringRelaciones a cargar. Ver Resumen.
Permiso
Sección titulada «Permiso»No exige un permiso del módulo: UnitCostWorkforcePolicy::viewAny devuelve verdadero para cualquier usuario autenticado.
curl -G \ "https://servererp.allendostmen.app/api/unit-cost-workforce" \ -H "Authorization: Bearer $TOKEN" \ -H "Accept: application/json" \ --data-urlencode "unit_cost_id=12" \ --data-urlencode "relations=workforce"const response = await fetch( "https://servererp.allendostmen.app/api/unit-cost-workforce?unit_cost_id=12&relations=workforce", { method: "GET", headers: { Authorization: `Bearer ${token}`, Accept: "application/json", }, },);const data = await response.json();use Illuminate\Support\Facades\Http;
$response = Http::withToken($token) ->acceptJson() ->get('https://servererp.allendostmen.app/api/unit-cost-workforce', [ 'unit_cost_id' => 12, 'relations' => 'workforce', ]);Lista de ítems de mano de obra200
{ "current_page": 1, "data": [ { "id": 21, "unit_cost_id": 12, "workforce_id": 4, "measurement_unit_id": 6, "name": "OFICIAL ALBAÑIL", "description": null, "original_price": "18.50000000", "original_coin_id": 1, "original_coin_value": "1.00000000", "index": 1, "yield": null, "cost": 18.5, "cost_utility": 1.85, "cost_utility_percentage": 10.0, "price": 20.35, "resource": 1.0, "quantity": 0.6667, "total_cost": 12.3333, "total_cost_utility": 1.2333, "total": 13.5667, "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/unit-cost-workforce?page=1", "from": 1, "last_page": 1, "last_page_url": "https://servererp.allendostmen.app/api/unit-cost-workforce?page=1", "next_page_url": null, "path": "https://servererp.allendostmen.app/api/unit-cost-workforce", "per_page": 20, "prev_page_url": null, "to": 1, "total": 1}Sin permiso403
{ "message": "This action is unauthorized."}