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

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

array
required
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 select
  • selected_line_item_ids (array, optional): For item-level addons: array of line item IDs to apply the addon to
  • selected_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:

array
All available addon options based on cart contents
array
Currently selected addons with pricing details
object
Total cost of all selected addons
string
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

Single price for entire order

Error Responses

Invalid request format or missing required parameters
Cart does not exist
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

Implementation Tips:
  1. Always check eligible_line_item_ids before applying addons
  2. Make one API call per addon selection (don’t batch multiple addons)
  3. For hierarchical addons, select appropriate child IDs
  4. Handle group addons by including all related line items
  5. Update UI immediately after each addon selection
  6. Show clear pricing breakdown for transparency
  7. For radio button groups, remove the previous selection before adding the new one