Authorization: Bearer ********************curl --location --request PUT '/desktop/products/update/23880' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"product_id": 23880,
"name": "Smart Watches",
"unit": "Pieces",
"pieces": 1,
"variant": "single",
"created_at": "2025-03-11T21:41:43.271Z",
"supplier_id": null,
"variant_types": [
{
"cost_price": 100,
"selling_price": 200,
"quantity": 10,
"unit": "Pieces",
"pieces": 1,
"created_at": "2025-03-11T21:41:43.271Z"
}
]
}'{
"success": true,
"message": "Product updated successfully!",
"data": {
"id": "19989",
"user_id": "1718",
"business_id": "2242",
"supplier_id": "915",
"app_id": "111",
"name": "Shoes",
"product_type": "purchase",
"quantity": 10,
"quantity_sold": 0,
"pieces_sold": 0,
"cost_price": 12000,
"selling_price": 18000,
"pieces": 15,
"color": "black",
"size": "36,37,38",
"variant": "single",
"unit": "Cartons",
"app_created_at": "2024-05-19T23:09:59.570+01:00",
"raw": "",
"deleted_at": null,
"created_at": "2024-05-19T23:09:59.571+01:00",
"updated_at": "2024-05-22T09:50:37.386+01:00",
"app_updated_at": "2024-05-22T09:50:35.342+01:00",
"created_by": "1718"
}
}