HomeGuidesAPI ReferenceChangelogDiscussions
HomeLog In
Guides

Delete Product Images

Function

To delete product images with open API
透過open API刪除主商品圖片/商品資訊圖片

URL

DELETE <<api_domain>>/v1/products/:id/delete_images

Request Parameters

ParameterTypeDescriptionExample
idStringProduct ID
主商品ID
ruby 5d355b2ce3880911bca30959
media_idsArrayImage ID of Main Product Photos or Additional Product Photos
主商品圖片 或是 商品資訊圖片 ID
ruby "media_ids": ["5d318cc2e388097897d07be4", "5d318cc5e388097897d07be8", "5d31921ce3880966a80ed0f2", "5d31921fe3880966a80ed0f5"]

JSON params example

{
	"media_ids": ["5d318cc2e388097897d07be4","5d318cc5e388097897d07be8","5d31921ce3880966a80ed0f2","5d31921fe3880966a80ed0f5"]
}

Response Example

{
    "result": "success"
}
{
    "error": "Cannot not find ImageID.",
    "code": "DeleteProductImageError",
    "caused_by": "5d318cc2e388097897d07be4, 5d318cc5e388097897d07be8, 5d31921ce3880966a80ed0f2, 5d31921fe3880966a80ed0f5"
}