GET
Listar imágenes de un producto
Scope:
inventory:products.readhttps://api.holded.com/api/v2/products/{productId}/imagesRetrieves the list of all images associated with a product. Each image includes its URL, available sizes (original, large, medium, small, thumbnail), position in the gallery, and description.
Parámetros
Parámetros de ruta
productId
stringobligatorioID del producto (ObjectId hexadecimal de 24 caracteres)
Petición
python
import requests
url = "https://api.holded.com/api/v2/products/{productId}/images"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())Respuestas
Respuesta
json
{
"items": [
{
"id": "507f1f77bcf86cd799439011",
"position": 1,
"description": "string",
"url": "string",
"sizes": {
"original": {
"url": "...",
"width": "...",
"height": "..."
},
"large": {
"url": "...",
"width": "...",
"height": "..."
},
"medium": {
"url": "...",
"width": "...",
"height": "..."
},
"small": {
"url": "...",
"width": "...",
"height": "..."
},
"thumbnail": {
"url": "...",
"width": "...",
"height": "..."
}
}
}
]
}Respuestas exitosas
200Lista de imágenes del productoapplication/jsonobject
items[]object[]
Array of product images
idstringrequired
Unique identifier of the image
positionintegerrequired
Position of the image in the product gallery (1-indexed)
descriptionstring | nullrequired
Alt text or description of the image
urlstring | nullrequired
Primary image URL (original size or raw URL)
sizesobjectrequired
Available image sizes with URLs and dimensions
Respuestas de error
401API key inválida o no proporcionadaapplication/json403Permisos insuficientesapplication/json404Producto no encontradoapplication/json429Límite de solicitudes excedidoapplication/json