Skip to content

Add Line to Basket

POST /baskets/{id}/lines command bearer

Adds a product line to an existing basket, validating availability and applying any applicable promotions.


Overview

ID add-basket-line-api
Method POST
Path /baskets/{id}/lines
Classification command
Domain commerce
Capability basket-management
Service add-basket-item
Application ecommerce-platform — eCommerce Platform
Auth bearer

Request Body

Business Object basket-line
Description Line-level item entry within a basket.
Classification entity
Lifecycle added → updated → reserved → confirmed → removed

Response

Business Object basket
Description Commerce container holding intended purchases before order creation.
Lifecycle open → locked → converted → abandoned → merged

Events Emitted

Event Classification Object Description
basket-line-added created basket-line A product line was added to an active basket, updating the basket total and triggering promotion evaluation.

Scenarios using basket-management

Scenario Description
Buy Online, Pick Up In Store Customer browses and purchases online, then collects the order from a physical store. The canonical
Unified Omnichannel Checkout Customer completes a standard commerce checkout journey from basket through pricing, promotions, pay
Clienteling Sale A store associate uses a clienteling application to identify a known customer, review their purchase
Endless Aisle Store associate helps a customer order an item that is not physically stocked in the current store b
Exchange Anywhere Customer exchanges an item purchased in any channel at any supported touchpoint. The original item i
Reserve and Collect Customer reserves stock online for in-store collection without paying at the time of reservation. Th
Scan and Go Customer scans items using a mobile app while shopping, receives promotions and loyalty benefits in
Self-Checkout Customer scans and bags items at a self-checkout kiosk, receives applicable promotions, settles paym
Ship From Store An online order is fulfilled by shipping the goods directly from a physical store rather than a cent
Voucher Redemption Customer redeems a voucher or gift card during checkout in store or online. The flow covers voucher
API Method Path Type
Create Transaction POST /transactions command
Void Transaction POST /transactions/{id}/void action
Create Basket POST /baskets command
Checkout Basket POST /baskets/{id}/checkout action
Get Product GET /products/{id} query