curl --request GET \
--url https://api.example.com/api/products{
"success": true,
"data": [
{
"id": 123,
"nombre": "<string>",
"descripcion": "<string>",
"precio": 123,
"precioOriginal": 123,
"stock": 123,
"foto": "<string>",
"isFeatured": true,
"peso": 123,
"alto": 123,
"ancho": 123,
"profundidad": 123,
"categoriaId": 123,
"marcaId": 123,
"createdAt": {},
"updatedAt": {}
}
],
"meta": {
"page": 123,
"limit": 123,
"total": 123,
"totalPages": 123
}
}Retrieve a paginated list of products with optional filtering and sorting
curl --request GET \
--url https://api.example.com/api/products{
"success": true,
"data": [
{
"id": 123,
"nombre": "<string>",
"descripcion": "<string>",
"precio": 123,
"precioOriginal": 123,
"stock": 123,
"foto": "<string>",
"isFeatured": true,
"peso": 123,
"alto": 123,
"ancho": 123,
"profundidad": 123,
"categoriaId": 123,
"marcaId": 123,
"createdAt": {},
"updatedAt": {}
}
],
"meta": {
"page": 123,
"limit": 123,
"total": 123,
"totalPages": 123
}
}GET /api/products
brandId and marcaId)curl -X GET "https://api.pcfix.com/api/products?page=1&limit=20&categoryId=5&order=newest"
{
"success": true,
"data": [
{
"id": 1,
"nombre": "Laptop Gaming XYZ",
"descripcion": "High-performance gaming laptop with RTX graphics",
"precio": "1299.99",
"precioOriginal": "1499.99",
"stock": 15,
"foto": "https://cdn.pcfix.com/products/laptop-xyz.jpg",
"isFeatured": true,
"peso": "2.5",
"alto": 30,
"ancho": 40,
"profundidad": 3,
"categoriaId": 5,
"marcaId": 2,
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T14:45:00Z"
}
],
"meta": {
"page": 1,
"limit": 20,
"total": 150,
"totalPages": 8
}
}
{
"success": false,
"error": "Error message description"
}