Products
Remove Product

Remove Product

Remove data product by product id

Endpoint

Base URL
http://localhost:8080
Method and Endpoint
GET /api/sellers/current/stores/{store_id}/product
Headers
Authorization: Bearer access_token

Route Param

store_id : string (required)

Query Param

product_id : string (required)

Responses

You will get responses like this:

200 (success)

Response Body
{
  "message": "Product successfully deleted",
}

404 (not found)

If the store was not found in database

Response Body
{
  "error": "store not found"
}

404 (not found)

If the product was not found in database

Response Body
{
  "error": "product not found"
}

401 (unauthorized)

Response Body
{
  "error": "Invalid authorization header"
}

401 (unauthorized - expire token)

Response Body
{
  "error": "token is expired: token is expired by 2m19s"
}

500 (server error)

Response Body
{
  "error": "Internal server error"
}

500 (server error - failed)

If database get troble while update the product data

Response Body
{
  "error": "Failed to delete the product"
}