Mostrar Producto
Obtiene el detalle completo de un producto (propio o de dropshipping) incluyendo variantes, imágenes y metadatos. La API detecta automáticamente el tipo.
Endpoint
GET /api/v1/combined-products/{companyId}/{productId}
Producción
https://api.aveonline.co/aveila/public/api/v1/combined-products/{companyId}/{productId}
QA
https://apiqa.aveonline.co/aveila/public/api/v1/combined-products/{companyId}/{productId}
Autenticación
Enviar encabezado:
Authorization: {token}
Path Parameters
Parámetro | Tipo | Requerido | Descripción |
---|---|---|---|
companyId | integer | Sí | ID de la empresa |
productId | integer | Sí | ID del producto |
Detección Automática del Tipo
info
El servicio primero busca en productos propios (tabla products).
Si no existe, consulta productos de dropshipping (tabla product_dropshipping).
El campo "type" en la respuesta será "own" o "dropshipping".
Respuesta Exitosa (200)
Dependiendo del tipo de producto se devuelven campos distintos.
Producto Propio (type = own)
{
"id": 1,
"name": "Zapatos Nike Stellar",
"ref": "NIKE001",
"description": "Zapatos deportivos de alta calidad",
"full_description": "Zapatos deportivos Nike Stellar con tecnología avanzada...",
"price": 150000,
"cost": 80000,
"declared_value": 120000,
"min_price": 130000,
"max_price": 200000,
"marketplace_price": 160000,
"quantity": 50,
"min_quantity": 5,
"active": true,
"status": 1,
"image": "https://example.com/product-image.jpg",
"images": [
{
"id": 1,
"url": "https://example.com/image1.jpg",
"file_path": "images/product1.jpg",
"type": 1
}
],
"video_url": "https://example.com/video.mp4",
"company_id": 1,
"company_name": "Mi Empresa",
"category_id": 5,
"category_name": "Calzado",
"ready_time": 3,
"size": "42",
"color": "Azul",
"presentation": "Par",
"weight": 500.5,
"height": 15.5,
"length": 30.2,
"width": 12.8,
"volume": 5930.4,
"location": "Estante A-1",
"client_location": "Oficina principal",
"tags": "deportivo,nike,calzado",
"brand": "Nike",
"return_conditions": "30 días para devolución",
"allow_negative_inventory": false,
"activation_type": 1,
"product_type": 1,
"type": "own",
"variants": [
{
"id": 2,
"name": "Zapatos Nike Stellar - Talla 42",
"ref": "NIKE001-42",
"price": 155000,
"quantity": 10,
"image": "https://example.com/variant-image.jpg",
"images": [
{
"id": 3,
"url": "https://example.com/variant-image.jpg",
"file_path": "images/variant.jpg",
"type": 1
}
],
"size": "42",
"color": "Azul",
"active": true,
"status": 1
}
],
"warehouses": [
{
"id": 1,
"name": "Bodega Principal",
"city": "Bogotá",
"quantity": 50
}
],
"sold_units": 125,
"created_at": "2024-01-15 10:30:00",
"updated_at": "2024-01-20 14:45:00"
}
Producto Dropshipping (type = dropshipping)
{
"id": 1,
"name": "Zapatos Nike Stellar",
"ref": null,
"description": "Zapatos deportivos de alta calidad",
"full_description": "Zapatos deportivos Nike Stellar con tecnología avanzada...",
"price": 150000,
"dropshipper_price": 140000,
"winning_percentage": 25.5,
"winning_amount": 35000,
"quantity": 50,
"active": true,
"status": 1,
"is_available_in_provider": true,
"image": "https://example.com/product-image.jpg",
"images": [
{
"id": 1,
"url": "https://example.com/image1.jpg",
"file_path": "images/product1.jpg",
"type": 2
}
],
"video_url": "https://example.com/video.mp4",
"company_id": 1,
"category_id": 5,
"category_name": "Calzado",
"supplier_id": 10,
"supplier_name": "Proveedor ABC",
"authorization_status": 1,
"type": "dropshipping",
"variants": [
{
"id": 2,
"name": "Zapatos Nike Stellar - Talla 42",
"price": 155000,
"quantity": 10,
"image": "https://example.com/variant-image.jpg",
"images": [
{
"id": 3,
"url": "https://example.com/variant-image.jpg",
"file_path": "images/variant.jpg",
"type": 2
}
],
"video_url": "https://example.com/variant-video.mp4",
"active": true,
"status": 1,
"is_available_in_provider": true,
"category_name": "Calzado"
}
],
"references": [
{
"id": 1,
"reference": "REF-001",
"type": 2
}
],
"product_info": {
"id": 298,
"ref": "PROD-298",
"name": "Zapatos Nike Stellar Original",
"full_description": "Descripción detallada del producto original...",
"ready_time": 2,
"shipping_conditions": "Envío gratis por compras superiores a $100.000",
"warranty": "Garantía de 6 meses",
"warranty_time": 180,
"return_conditions": "30 días para devolución",
"min_price": 120000,
"max_price": 200000,
"images": [
{
"id": 5,
"url": "https://example.com/original-image.jpg",
"file_path": "images/original.jpg",
"type": 1
}
]
},
"sold_units": 125,
"created_at": "2024-01-15 10:30:00",
"updated_at": "2024-01-20 14:45:00"
}
Errores
400 Bad Request
{
"message": "Tipo de producto inválido. Debe ser \"own\" o \"dropshipping\"."
}
404 Not Found
{
"message": "No se ha encontrado el producto."
}
Ejemplos
Curl (Producción)
curl -X GET \
"https://api.aveonline.co/aveila/public/api/v1/combined-products/1/123" \
-H "Authorization: {token}"
Curl (QA)
curl -X GET \
"https://apiqa.aveonline.co/aveila/public/api/v1/combined-products/1/123" \
-H "Authorization: {token}"
Notas
- type diferencia el modelo: own vs dropshipping
- Campos de costos, dimensiones, bodegas solo en productos propios
- Campos de proveedor, autorización, product_info y references solo en dropshipping
- variants siempre presente si existen variantes
- images puede diferir en type (1 propio, 2 dropshipping)
tip
Use siempre la misma ruta. No necesita especificar tipo de producto.