Addon Management
Add Addon
Applies addon services to your cart
POST
Add Addon
Overview
The Add Addon endpoint enables customers to select value-added services offered by the merchant. Addons can apply at different scopes:Cart-Level
Applies to entire order (e.g., shipping protection)
Item-Level
Applies to specific items (e.g., protection plans)
Group-Level
Applies to item groups (e.g., service bundles)
Authentication
Device authentication token to identify and map the session
Path Parameters
Domain of the merchant website (e.g.,
staging.luma.gift)Request Body
Array containing a single addon selection. Only one addon should be modified per request to map to UI events like checkbox or radio button clicks.Selection Object Properties:
addon_id(string, required): Unique identifier for the addon to selectselected_line_item_ids(array, optional): For item-level addons: array of line item IDs to apply the addon toselected_child_ids(array, optional): For hierarchical addons: array of child addon IDs to include
Response
Returns the complete shopping cart with updated addon selections and recalculated pricing.Key Response Fields:
All available addon options based on cart contents
Currently selected addons with pricing details
Total cost of all selected addons
API schema version
Code Examples by Tier
Cart-Level Addon (Shipping Protection)
Item-Level Addon (Extended Warranty)
Apply extended warranty to specific items with per-item pricing:Group-Level Addon
Apply service to a predefined group of items:Hierarchical Addon (Protection Plans)
Select a parent addon with child options:Advanced Examples
Adding Multiple Addons
To add multiple addons to a cart, make separate API calls for each addon:Each addon selection requires a separate API call. This design maps to individual UI events like checkbox or radio button clicks, ensuring proper tracking and state management.
Complex Addon Selection
Some addons support hierarchical selections with child options:Understanding Addon Pricing
- Cart-Level
- Group-Level
- Item-Level
Single price for entire order
Error Responses
400 Bad Request
400 Bad Request
Invalid request format or missing required parameters
404 Not Found
404 Not Found
Cart does not exist
422 Unprocessable Entity
422 Unprocessable Entity
Addon constraints violated
Addon Eligibility Rules
Addons are offered based on merchant rules:
- Item eligibility and categories
- Business logic and thresholds
- Merchant configuration
- Product-specific requirements
Common Constraints
Required Addons
Some addons must be selected before checkout
Exclusive Selection
Only one addon from a group can be selected
Best Practices
Related Endpoints
- Remove Addon - Remove addon selections
- Get Cart - View current addon state
- Overview - Learn about the addon system
Add Addon