Get a product image by ID
Scope: inventory:products.read https://api.alladdin.com/api/v2/products/{productId}/images/{imageId}
Retrieves a single image from a product by its image identifier.
The response includes the image URL, available sizes with dimensions, position, and description.
Parameters
Path parameters
productId string required
Product ID (24-char hex ObjectId)
imageId string required
Image ID (24-char hex ObjectId)
Request
import requests
url = "https://api.alladdin.com/api/v2/products/{productId}/images/{imageId}"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())Responses
Response
{
"id": "507f1f77bcf86cd799439011",
"position": 1,
"description": "string",
"url": "string",
"sizes": {
"original": {
"url": "string",
"width": 0,
"height": 0
},
"large": {
"url": "string",
"width": 0,
"height": 0
},
"medium": {
"url": "string",
"width": 0,
"height": 0
},
"small": {
"url": "string",
"width": 0,
"height": 0
},
"thumbnail": {
"url": "string",
"width": 0,
"height": 0
}
}
}Success responses
200 Product image found application/json object id string required
Unique identifier of the image
position integer required
Position of the image in the product gallery (1-indexed)
description string | null required
Alt text or description of the image
url string | null required
Primary image URL (original size or raw URL)
sizes object required
Available image sizes with URLs and dimensions
original object | null large object | null medium object | null small object | null thumbnail object | null
Error responses
401 Invalid or missing API key application/json 403 Insufficient permissions application/json 404 Product or image not found application/json 429 Rate limit exceeded application/json
