商品画像の削除エンドポイントを公開しました

2026/07/01

任意の商品 ID と画像の表示位置 (position) を指定して、商品画像を削除できるエンドポイントを公開しました。

使用例

position 10の画像を削除する場合、以下のリクエストを送信します。

DELETE /v1/products/{product_id}/images/10

成功すると 204 No Content が返り、レスポンスボディはありません。 削除後に商品画像の取得 API を実行すると、該当の position が一覧から除外されていることが確認できます。

削除前

{
  "product": {
    "id": 192093253,
    "images": [
      { "position": 0, "url": "https://img.shop-pro.jp/.../product/192093253.png?cmsp_timestamp=..." },
      { "position": 2, "url": "https://img.shop-pro.jp/.../product/192093253_o2.png?cmsp_timestamp=..." },
      { "position": 10, "url": "https://img.shop-pro.jp/.../product/192093253_o10.png?cmsp_timestamp=..." },
      { "position": 11, "url": "https://img.shop-pro.jp/.../product/192093253_o11.png?cmsp_timestamp=..." }
    ]
  }
}

削除後

{
  "product": {
    "id": 192093253,
    "images": [
      { "position": 0, "url": "https://img.shop-pro.jp/.../product/192093253.png?cmsp_timestamp=..." },
      { "position": 2, "url": "https://img.shop-pro.jp/.../product/192093253_o2.png?cmsp_timestamp=..." },
      { "position": 11, "url": "https://img.shop-pro.jp/.../product/192093253_o11.png?cmsp_timestamp=..." }
    ]
  }
}

position 10 の画像が一覧から除外され、他の画像の position はそのまま維持されます。

備考

  • position の値によって削除対象が異なります
    • 0: メイン画像 (サムネイルも削除されます)
    • 1〜3: サブ画像
    • 4〜49: 追加画像
  • 必要スコープ: write_products

この API のエンドポイントなど詳細につきましては、カラーミーショップ API ドキュメントをご参照ください。