Rupa Rawi - Revou Group Project
  1. product
Rupa Rawi - Revou Group Project
  • auth
    • register user
      POST
    • login
      POST
    • refresh token
      POST
  • user
    • address
      • create address
      • get all address
      • update address
      • delete address
    • payment method
      • get all payment methods
      • delete payment method
      • update payment method
      • create payment method
    • update own profile
      PUT
    • get own profile
      GET
    • get public profile
      GET
  • product
    • category
      • get categories tree
      • get categories detail
    • wishlist
      • add item to wishlist
      • remove item to wishlist
      • get wishlist
    • promotions
      • get promotion detail (public)
      • get active promotions (public)
    • get product details (public)
      GET
    • get product list (public)
      GET
    • get public vendor products
      GET
  • admin
    • category
      • create category
      • update category
      • soft delete category
      • create subcategory
    • vendor management
      • get all vendors
      • vendor application review
    • promotions
      • get all promotions
      • create promotion
      • update promotion
    • get admin logs
      GET
  • vendor
    • product
      • soft delete product
        DELETE
      • create product
        POST
      • update product
        PUT
      • get vendor products
        GET
    • vendor apply
      POST
    • get vendor profile
      GET
    • update vendor profile
      PUT
    • vendor stats
      GET
    • Vendor recent orders
      GET
  • order
    • cart
      • add item to cart
      • update item in cart
      • delete item in cart
      • get cart
    • update order status
    • get order
    • get all orders
    • pre-checkout calculation
    • order checkout
  • article
    • delete article
    • create article
    • get article
    • get article detail
    • update article
  • product review
    • create review product
    • get product reviews by product id
    • get product review detail
    • update product review detail
    • delete product review
  • testimony
    • create testimonial
    • update testimonial
    • get testimonial
    • delete testimonial
  1. product

update product

Developing
PUT
products/<int:product_id>
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'products/<int:product_id>' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6ZmFsc2UsImlhdCI6MTc0NjEwNDM3NCwianRpIjoiMWMxYzE3MjctYzY1My00ZDU5LWExYWEtYzg3ZTc2YWY1OWYxIiwidHlwZSI6ImFjY2VzcyIsInN1YiI6IjE3IiwibmJmIjoxNzQ2MTA0Mzc0LCJjc3JmIjoiNjIzZmRkZjktYTRlOS00MDljLWIzMDctMDNjNTNhMWY4N2VhIiwidXNlcm5hbWUiOiJlY29fc2VsbGVyMTAiLCJlbWFpbCI6InNlbGxlcjEwQGV4YW1wbGUuY29tIn0.oLWt7uRKMqTufvWnPA3FrXEUFswzsVl9kBKOjQO7qDI' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "updated product",
    "description": "updated product description",
    "price": 25.99,
    "category_id": 1,
    "tags": ["updated-eco-friendly", "updated-handmade"],
    "sustainability_attributes": ["updated-organic", "updated-carbon-neutral"],
    "stock_quantity": 150,
    "min_order_quantity": 3,
    "is_active": true,
    "primary_image_url" : "https://example.com/primary-image.jpg",
    "images" : ["https://example.com/image.jpg", "https://example.com/image2.jpg"]
}'
Response Response Example
{
  "message": "Product updated successfully",
  "product": {
    "average_rating": 0.0,
    "category_id": 1,
    "created_at": "Thu, 01 May 2025 13:01:40 GMT",
    "description": "updated product description",
    "id": 8,
    "images": "[{'image_url': 'https://example.com/image.jpg', 'is_primary': False}, {'image_url': 'https://example.com/image2.jpg', 'is_primary': False}, {'image_url': 'https://example.com/primary-image.jpg', 'is_primary': True}]",
    "min_order_quantity": 3,
    "name": "updated product",
    "price": 25.99,
    "review_count": 0,
    "stock_quantity": 150,
    "sustainability_attributes": "['updated-organic', 'updated-carbon-neutral']",
    "tags": "['updated-eco-friendly', 'updated-handmade']",
    "updated_at": "Thu, 01 May 2025 13:59:49 GMT",
    "vendor_id": 17
  },
  "success": true
}

Request

Header Params
Authorization
string 
required
Example:
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6ZmFsc2UsImlhdCI6MTc0NjEwNDM3NCwianRpIjoiMWMxYzE3MjctYzY1My00ZDU5LWExYWEtYzg3ZTc2YWY1OWYxIiwidHlwZSI6ImFjY2VzcyIsInN1YiI6IjE3IiwibmJmIjoxNzQ2MTA0Mzc0LCJjc3JmIjoiNjIzZmRkZjktYTRlOS00MDljLWIzMDctMDNjNTNhMWY4N2VhIiwidXNlcm5hbWUiOiJlY29fc2VsbGVyMTAiLCJlbWFpbCI6InNlbGxlcjEwQGV4YW1wbGUuY29tIn0.oLWt7uRKMqTufvWnPA3FrXEUFswzsVl9kBKOjQO7qDI
Body Params application/json
name
string 
optional
description
string 
optional
price
number 
optional
category_id
integer 
optional
tags
array[string]
optional
sustainability_attributes
array[string]
optional
stock_quantity
integer 
optional
min_order_quantity
integer 
optional
is_active
boolean 
optional
primary_image_url
string 
optional
images
array[string]
optional
Examples

Responses

🟢200Success
application/json
Body
message
string 
required
product
object 
required
average_rating
integer 
required
category_id
integer 
required
created_at
string 
required
description
string 
required
id
integer 
required
images
string 
required
min_order_quantity
integer 
required
name
string 
required
price
number 
required
review_count
integer 
required
stock_quantity
integer 
required
sustainability_attributes
string 
required
tags
string 
required
updated_at
string 
required
vendor_id
integer 
required
success
boolean 
required
Modified at 2025-05-01 14:07:43
Previous
create product
Next
get vendor products
Built with