Addon Management
Remove Addon
Removes addon services from your cart by addon identifier
POST
Remove Addon
Overview
The Remove Addon endpoint allows customers to remove previously selected addon services from their cart. This endpoint handles removal of addons at any scope (cart, item, or group level) and automatically recalculates cart totals.Key Features:
- Remove addon selections by ID
- Supports partial removal from specific items
- Automatically recalculates pricing
- Maintains other addon selections
Authentication
Device authentication token to identify and map the session
Path Parameters
Domain of the merchant website (e.g.,
staging.luma.gift)Request Body
The unique identifier of the addon to remove
For partial removal: specific line item ID to remove the addon from
For hierarchical addons: specific child addon ID to remove
Response
Returns the complete shopping cart with the addon removed and pricing recalculated.Key Response Updates:
Updated selections array with the specified addon removed
Recalculated total cost of remaining addons
Updated cart total reflecting the removal
Code Examples
Removal Examples by Tier
Remove Cart-Level Addon
Remove shipping protection from the entire order:Remove Item-Level Addon
Remove extended warranty from specific items:When removing an item-level addon without specifying
deselected_line_item_id, it’s removed from all items for which it was selected. Use deselected_line_item_id to remove specific items only.Remove Hierarchical Addon
Remove a parent addon with child selections:Common Scenarios
- Change Selection
- Clear All Addons
- Remove Before Checkout
To change from one addon to another (e.g., switching warranty types):
Error Responses
400 Bad Request
400 Bad Request
Invalid request format or missing addon_id
404 Not Found
404 Not Found
Cart does not exist
422 Unprocessable Entity
422 Unprocessable Entity
Addon not found in current selections
Important Considerations
Impact on Cart State
When an addon is removed:- Pricing Updates
- Addon cost removed from totals
- Tax recalculated if applicable
- Shipping costs may change (for delivery-related addons)
- Offer Availability
- Removed addon returns to offers array
- May become available for re-selection
- Eligibility rules still apply
- Related Addons
- Child addons are removed with parent
- Dependent addons may become unavailable
- Group constraints are re-evaluated
UI Implementation Guide
Best Practices for Remove Actions:
- Confirmation: Consider showing a confirmation dialog for high-value addons
- Visual Feedback: Update UI immediately after removal
- Price Display: Show savings when addon is removed
- Undo Option: Consider offering a quick “undo” to re-add
- Clear Messaging: Explain what will be removed (especially for hierarchical addons)
Example UI Flow
Related Endpoints
Remove Addon