curl --request PUT \
--url https://api.example.com/api/product/user/update/{product_id} \
--header 'Content-Type: application/json' \
--data '
{
"quantity": 123,
"expiryDate": "<string>",
"notes": "<string>"
}
'{
"message": "<string>",
"productId": "<string>",
"quantity": 123,
"expiryDate": "<string>",
"notes": "<string>"
}Update quantity, expiry date, or notes for a product in the user’s inventory
curl --request PUT \
--url https://api.example.com/api/product/user/update/{product_id} \
--header 'Content-Type: application/json' \
--data '
{
"quantity": 123,
"expiryDate": "<string>",
"notes": "<string>"
}
'{
"message": "<string>",
"productId": "<string>",
"quantity": 123,
"expiryDate": "<string>",
"notes": "<string>"
}userId extracted from request.state.user.
curl -X PUT "https://api.expireeye.com/api/product/user/update/prod_123abc" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"quantity": 3,
"expiryDate": "2026-03-15T00:00:00.000Z",
"notes": "Moved to main refrigerator"
}'
curl -X PUT "https://api.expireeye.com/api/product/user/update/prod_456def" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"quantity": 2,
"expiryDate": "2026-03-10T00:00:00.000Z",
"notes": "Opened on March 4th"
}'
{
"detail": "Product with ID prod_999xyz does not exist in user inventory."
}
{
"detail": "Both quantity and expiryDate are required for update."
}
quantity and expiryDate must be provided together. You cannot update only one of these fields.
{
"detail": "No changes detected. Please provide new values for quantity or expiryDate."
}
quantity and expiryDate values are identical to the existing values.
quantity and expiryDate must be provided in the request body. The endpoint will reject requests that only include one of these fields.
updatedAt field is automatically set to the current UTC time when the update is successful.
notes field is optional and can be updated independently of quantity and expiryDatenotes is not provided in the request, the existing notes are preserved