Add a new image to a product
POST
/2024-09/products/{product}/images
curl \
--request POST 'https://app.merchanthq.com/api/2024-09/products/{product}/images' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"url":"https://example.com/product-image.jpg"}'
Request examples
{
"url": "https://example.com/product-image.jpg"
}
Response examples (201)
{
"data": {
"id": "1e7f0a0f-b5a9-4d1a-a2d5-d0e0c2b1c3d4",
"product_id": "1e7f0a0f-b5a9-4d1a-a2d5-d0e0c2b1c3d4",
"public_url": "https://cdn.merchanthq.com/products/1e7f0a0f-b5a9-4d1a-a2d5-d0e0c2b1c3d4/image1.jpg",
"created_at": "2025-01-10T10:37:11Z",
"updated_at": "2025-01-10T10:37:11Z"
}
}
Response examples (401)
{
"message": "Unauthorized"
}
Response examples (403)
{
"message": "This action is unauthorized."
}
Response examples (404)
{
"message": "Not found"
}