TradeIn
Trade-in approval and rejection for order items
Approves trade-in request for a specific order item. This is part of the trade-in flow where customers can exchange their old products for discounts on new purchases.
Trade-In Feature Overview: Trade-in allows customers to:
Select a product to trade-in during checkout
Answer questions about the item's condition
Receive a calculated offer price
Complete order with trade-in discount
Approve or reject the final trade-in valuation via email link
This endpoint is called when the user clicks the approval link in the trade-in email.
Access Control:
User must be authenticated
Order item must belong to user's order
Order item must have trade-in inquiry data
Order item must NOT already be in review status (not already approved or rejected)
Review Status: Item is considered "in review" if it has already been:
Approved - Cannot approve again
Rejected - Cannot approve after rejection
If either status exists, returns 404 (cannot change review decision).
Side Effects:
Sends confirmation to backend system
Updates order item with approved status
Sends trade-in confirmation email to user
Error Handling: Returns 404 if:
Order item doesn't exist
Order item doesn't belong to user
Order item is already in review (approved or rejected)
Backend request fails
User must own the order containing the item. Item must not already have a review status.
Session cookie for authentication
Order item ID. Must belong to an order owned by the authenticated user. Order item must have trade-in inquiry data in attributes.
Session cookie in format sessionid=<value>.
May use site-specific cookie name (e.g., osessionid).
Trade-in approved successfully. Order item updated with confirmed flag, backend notified, email sent.
No content
Authentication required
Order item not found, not owned by user, already reviewed, or backend request failed
No content
Rejects trade-in request for a specific order item. This is part of the trade-in flow where customers can exchange their old products for discounts on new purchases.
Trade-In Feature Overview: Trade-in allows customers to:
Select a product to trade-in during checkout
Answer questions about the item's condition
Receive a calculated offer price
Complete order with trade-in discount
Approve or reject the final trade-in valuation via email link
This endpoint is called when the user clicks the rejection link in the trade-in email.
Access Control:
User must be authenticated
Order item must belong to user's order
Order item must have trade-in inquiry data
Order item must NOT already be in review status (not already approved or rejected)
Review Status: Item is considered "in review" if it has already been:
Approved - Cannot reject after approval
Rejected - Cannot reject again
If either status exists, returns 404 (cannot change review decision).
Side Effects:
Sends rejection to backend system
Updates order item with rejected status
Sends trade-in rejection email to user
Error Handling: Returns 404 if:
Order item doesn't exist
Order item doesn't belong to user
Order item is already in review (approved or rejected)
Backend request fails
User must own the order containing the item. Item must not already have a review status.
Session cookie for authentication
Order item ID. Must belong to an order owned by the authenticated user. Order item must have trade-in inquiry data in attributes.
Session cookie in format sessionid=<value>.
May use site-specific cookie name (e.g., osessionid).
Trade-in rejected successfully. Order item updated with rejected flag, backend notified, email sent.
No content
Authentication required
Order item not found, not owned by user, already reviewed, or backend request failed
No content
Last updated
Was this helpful?

