TradeIn

Trade-in approval and rejection for order items

Approve trade-in for order item

get

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:

  1. Select a product to trade-in during checkout

  2. Answer questions about the item's condition

  3. Receive a calculated offer price

  4. Complete order with trade-in discount

  5. 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:

  1. Sends confirmation to backend system

  2. Updates order item with approved status

  3. 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.

Authorizations
sessionidstringRequired

Session cookie for authentication

Path parameters
pkintegerRequired

Order item ID. Must belong to an order owned by the authenticated user. Order item must have trade-in inquiry data in attributes.

Header parameters
CookiestringOptional

Session cookie in format sessionid=<value>. May use site-specific cookie name (e.g., osessionid).

Responses
chevron-right
200

Trade-in approved successfully. Order item updated with confirmed flag, backend notified, email sent.

No content

get
/users/order_item/{pk}/tradein_approved/

No content

Reject trade-in for order item

get

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:

  1. Select a product to trade-in during checkout

  2. Answer questions about the item's condition

  3. Receive a calculated offer price

  4. Complete order with trade-in discount

  5. 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:

  1. Sends rejection to backend system

  2. Updates order item with rejected status

  3. 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.

Authorizations
sessionidstringRequired

Session cookie for authentication

Path parameters
pkintegerRequired

Order item ID. Must belong to an order owned by the authenticated user. Order item must have trade-in inquiry data in attributes.

Header parameters
CookiestringOptional

Session cookie in format sessionid=<value>. May use site-specific cookie name (e.g., osessionid).

Responses
chevron-right
200

Trade-in rejected successfully. Order item updated with rejected flag, backend notified, email sent.

No content

get
/users/order_item/{pk}/tradein_rejected/

No content

Last updated

Was this helpful?