Ver producto
GET /api/items/record/{item_id}
Autenticación: Bearer del usuario del tenant (Authorization: Bearer <api_token>).
Devuelve un producto con stock (almacén del usuario), almacenes y presentaciones.
Quién puede usarlo: cualquier usuario autenticado (administrador o vendedor).
Formato de respuesta: heredado sin envoltura: devuelve directamente el objeto o arreglo (sin success). Devuelve {data: {...}}.
Errores:
- Si el id no existe responde HTTP 404 con
success: falseymessageRegistro no encontrado.
Parámetros
| Parámetro | Dónde | Obligatorio | Ejemplo | Descripción |
|---|---|---|---|---|
item_id |
ruta | sí | 1 |
Respuestas
200 — Producto
{
"data": {
"id": 31,
"full_description": "P0001 - GASEOSA COCA COLA 500ML - BEBIDAS - COCA COLA",
"unit_type_id": "NIU",
"unit_type_description": "Unidad",
"description": "GASEOSA COCA COLA 500ML",
"name": "Gaseosa personal",
"second_name": null,
"barcode": "7751271001234",
"internal_id": "P0001",
"item_code": "50202301",
"currency_type_id": "PEN",
"currency_type_symbol": "S/",
"sale_affectation_igv_type_id": "10",
"has_igv": true,
"sale_unit_price": 2.5,
"show_sale_unit_price": "S/ 2.50",
"image_url": "https://empresa.dominio/storage/uploads/items/gaseosa-coca-cola-500ml-31.jpg",
"purchase_affectation_igv_type_id": "10",
"purchase_unit_price": "1.80",
"category_id": 7,
"active": true,
"stock": 120,
"stock_min": 10,
"favorite": 0,
"has_isc": false,
"system_isc_type_id": null,
"percentage_isc": "0.00",
"warehouses": [
{
"warehouse_description": "Almacén Oficina Principal",
"stock": 120,
"warehouse_id": 1,
"establishment_id": 1
}
],
"item_unit_types": [
{
"id": 5,
"description": "Paquete x 12",
"unit_type_id": "PK",
"quantity_unit": "12.0000",
"price1": "28.00",
"price2": "27.00",
"price3": "26.00",
"price_default": 1
}
]
}
}
404 — Id inexistente
{
"success": false,
"message": "Registro no encontrado."
}
Pruébalo
Prueba este endpoint con tu empresa y tu token: elige la URL en Servers, pega el token en Authorize y haz clic en Try it out.