Visit Main Site
Join Partner Program
Login
     
Introduction
Authentication
Documentation
Category
GET
POST
PUT
DELETE
Products
GET
POST
PUT
DELETE
Carts
GET
POST
PATCH
DELETE
Variations
GET
POST
PUT
DELETE
Currency
GET
POST
PUT
DELETE
Tax
Tax Profile
GET
POST
PUT
DELETE
Tax Rule
GET
POST
PUT
DELETE
Tax Code
GET
POST
PUT
DELETE
Tax Zone
GET
POST
PUT
DELETE
Discount
GET
POST
PUT
DELETE
Shipping
Shipping Profile
GET
POST
PUT
DELETE
Shipping Rate
GET
POST
PUT
DELETE
Shipping Rules
GET
POST
PUT
DELETE
Customer
GET
POST
PUT
DELETE
Orders
GET
POST
PATCH
Blog
GET
POST
PUT
DELETE
Settings
GET
» Products DELETE API Documentation

Deleting a Product

Endpoint: DELETE /admin/products/{product_id}

Purpose

Deletes a specific product from the system based on its unique product ID. This action permanently removes the product, including all associated data such as pricing, inventory, and SEO configurations. It is typically used for removing obsolete, duplicate, or invalid product entries from the catalog.

Path Parameters

ParameterTypeDescription
product_idIntegerThe unique identifier of the product.

Query Parameters

No query parameters for this endpoint.

Use Case

An admin decides to remove a discontinued product or clear out products that were mistakenly created. This endpoint ensures such clean-up operations can be performed efficiently through the admin interface or automated scripts.

Request Body

No data is required for the request body.

Response

Returns a 204 No Content status, indicating that the product was successfully deleted. There is no response body, confirming the operation completed without errors or further data.

DELETE
https://{your_site_domain}/api/v4/admin/products/{product_id}
Try It Out

Deleting Product Images

Endpoints: DELETE /admin/products/{product_id}/images/{image_id}

Purpose

This endpoint allows administrators to permanently remove specific images associated with a product. It deletes both the original image and any generated thumbnail versions from the system storage while maintaining the integrity of the remaining product data.

Path Parameters

ParameterTypeDescription
product_idIntegerThe unique identifier of the product containing the image
image_idIntegerThe unique identifier of the specific image to be deleted

Query Parameters

No query parameters for this endpoint.

Use Case

Administrators use this endpoint when they need to remove outdated, incorrect, or unwanted product images while keeping the product record intact. Typical scenarios include deleting temporary placeholder images after adding final product photos, removing duplicate images, or cleaning up old product versions. The function targets specific images without affecting other media assets or product information, making it precise for media management operations.

Request Body

No data is required for the request body.

Response

The endpoint returns a 204 No Content status upon successful deletion, indicating the image was removed without returning any data. The absence of content in the response confirms the operation was completed successfully while maintaining security by not exposing internal file system information.

DELETE
https://{your_site_domain}/api/v4/admin/products/{product_id}/images/{image_id}
Try It Out
Terms and Conditions
Privacy Policy

© 2024 WebCommander | All Rights Reserved

contact@webcommander.com
1300 797 571

WebCommander
About Us
Features
Pricing
Compare
Partners
Contact Us
Resource
Find a Partner
Help Centre
Community
Blog
Solutions
Inventory Management
Omnichannel Sales
Ecommerce Automation
B2B Ecommerce
Headless Commerce
Website Design and Performance