Este endpoint obtiene el listado de categorías de activos
HTTP Request
GET https://admin.cmmshere.com/api/v1/assetCategories
Parámetros de consulta
Estos parámetros son opcionales y utilizados para filtrar e interactuar con la información obtenida. Los parámetros de filtrado (si se utilizan) se usan para buscar resultados que contengan dicho texto.
| Parámetro | Tipo | Default | Descripción |
|---|---|---|---|
| name | String | No definido | Nombre de la categoría |
| initials | String | No definido | Siglas de la categoría |
| offset | Int | No definido | Offset para paginación |
| limit | Int | No definido | Límite para la paginación |
| orderBy | Array | ["created_at", "desc"] | Ordenamiento. El primer valor es el campo y el segundo la dirección ASC o DESC |
Ejemplo de petición
curl --location --request GET 'https://admin.cmmshere.com/api/v1/assetCategories' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 804|fCkDcz43egLAubMzPinRCIVUIjPUsGkvbVJ864IP' \
--header 'Cookie: XSRF-TOKEN=eyJpdiI6IlM4Nnp4Qnh1QnZ0dmQwb2tUSThBVkE9PSIsInZhbHVlIjoiV28ybFk2Y25wU2UzVDFoMXJaem5hT2ZyRFZ4cnE1Y2VjZWsySVgzVlF3QkhYUGFncC9TUGRxT1MxNWtyS0JsZE5hTElDZVUxNGJPTXZCM0ZVMXY2SU8veStFNHZVZUpJdDhNNWNlSVM1eVZFZEN3b2hINXlNbng2NUZIdXJoSVoiLCJtYWMiOiIyZjgxMGJjMWY3ODRhNTU5MGM2MWNkMjU1OWI5ZmU3MTQ5ZDdhMGY1YTZiN2U2NTc1OWFmYThjNDcyZTU1YzRlIn0%3D; laravel_session=eyJpdiI6IjI3aS80ZExyZW83R3NnbmE5QTVvaWc9PSIsInZhbHVlIjoiOXJWR1BNQ2N4WkdoUzhjNkF1anJFSTVHa3FDbFNiaEZueUIzL3BVTkx5NENyTmNhMHV5N2gxRzVwczZDdUdOUEJIT0Z4UHhLRGc1VnFpVjl6eHF3UVRUbVNsWGFJY1lidFo5bkF5dDdBamVzSDVzZW1DbkluUmdxOXcwYzZvVnYiLCJtYWMiOiJlMzY2NjAzYWU4NzhkOTc4NDgyYjk0YzMxZGIzYTRiY2FiYWJhNDZmM2ZiMjUyZTA0Mjk4NWNkYzBkNjkxZmQ1In0%3D' \
--data '{
"offset" : 0,
"limit" : 5,
"orderBy" : ["id", "desc"]
}'
La petición de arriba devuelve un JSON estructurado de la siguiente manera
{
"success": true,
"code": 200,
"results": [
{
"id": 1024,
"category": "stock",
"name": "Almacén Regional Norte",
"initials": "ARN",
"status": "1",
"responsible_id": 105,
"creator_id": 22,
"localization_id": 45,
"client_id": 880,
"created_at": "2026-05-11T09:15:00.000000Z"
},
{
"id": 205,
"category": "stock_parts",
"name": "Repuestos Maquinaria Pesada",
"initials": "RMP",
"status": "1",
"responsible_id": 413,
"creator_id": 22,
"localization_id": 12,
"client_id": 1762,
"created_at": "2026-04-20T11:30:45.000000Z"
},
{
"id": 88,
"category": "category",
"name": "Herramientas Eléctricas",
"initials": "HEL",
"status": "1",
"responsible_id": null,
"creator_id": 15,
"localization_id": null,
"client_id": null,
"created_at": "2023-10-05T14:20:10.000000Z"
},
{
"id": 90,
"category": "category_parts",
"name": "Insumos Químicos",
"initials": "IQU",
"status": "0",
"responsible_id": null,
"creator_id": null,
"localization_id": null,
"client_id": null,
"created_at": "2022-01-12T08:00:00.000000Z"
},
{
"id": 3001,
"category": "stock",
"name": "Depósito de Seguridad",
"initials": "DEP-SEC",
"status": "1",
"responsible_id": 22,
"creator_id": null,
"localization_id": 93,
"client_id": null,
"created_at": "2021-08-15T17:42:38.000000Z"
}
]
}