Skip to main content
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

string
required
Device authentication token to identify and map the session

Path Parameters

string
required
Domain of the merchant website (e.g., staging.luma.gift)

Request Body

string
required
The unique identifier of the addon to remove
string
For partial removal: specific line item ID to remove the addon from
string
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:

array
Updated selections array with the specified addon removed
object
Recalculated total cost of remaining addons
object
Updated cart total reflecting the removal

Code Examples

Removal Examples by Tier

Remove Cart-Level Addon

Remove shipping protection from the entire order:
Before removal:
After removal:

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:
This removes the parent addon and all its selected child addons (e.g., white glove service, assembly).

Common Scenarios

To change from one addon to another (e.g., switching warranty types):

Error Responses

Invalid request format or missing addon_id
Cart does not exist
Addon not found in current selections

Important Considerations

Removal Behavior:
  • Removing a parent addon also removes all child selections
  • Item-level addons are removed from ALL items unless deselected_line_item_id is specified
  • Use deselected_line_item_id to remove from specific items only
  • Required addons cannot be removed without consequences

Impact on Cart State

When an addon is removed:
  1. Pricing Updates
    • Addon cost removed from totals
    • Tax recalculated if applicable
    • Shipping costs may change (for delivery-related addons)
  2. Offer Availability
    • Removed addon returns to offers array
    • May become available for re-selection
    • Eligibility rules still apply
  3. 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:
  1. Confirmation: Consider showing a confirmation dialog for high-value addons
  2. Visual Feedback: Update UI immediately after removal
  3. Price Display: Show savings when addon is removed
  4. Undo Option: Consider offering a quick “undo” to re-add
  5. Clear Messaging: Explain what will be removed (especially for hierarchical addons)

Example UI Flow