1. Cart
Salla Platform Docs
  • Languages
  • Notify
  • Event
  • Storage
  • Configuration
  • Forms
  • Helpers
  • Overview
  • Auth
    • Login
    • Logout
    • Verify
    • Resend
    • Register
    • Refresh
  • Cart
    • Latest
    • Delete Item
    • Delete Image
    • Add Coupon
    • Remove Coupon
    • Get Upload Image
    • Get Quick Order Settings
    • Create Quick Order
    • Order Status
    • Get Current Cart Id
    • Price Quote
    • Quick Add
    • Add Item
    • Details
  • Wishlist
    • Add
    • Remove
    • Toggle
  • Loyalty
    • Get Program
    • Exchange
    • Reset
  • Comment
    • Add Comment
    • Fetch
    • Get Page Comments
    • Get Product Comments
  • Metadata
    • Metadata Details
  • Profile
    • Update profile
    • Update contact
  • Product
    • Get price
    • Fetch Options
    • Product availability
    • Categories
    • Offer details
    • Search products
    • Get Gift Details
    • Add Gift To Cart
    • Upload Gift Image
    • Get Product Details
    • Fetch
    • Size Guides
  • Booking
    • Add
  • Rating
    • Order
    • Store
    • Products
    • Shipping
  • Currency
    • Change
    • List
  • Order
    • Create cart from order
    • Cancel
    • Send invoice
    • Show order
  • Component
    • Reviews
    • Menus
Merchant
Merchant
  • Merchant API
  • Embedded SDK
  • Salla OAuth 2.0
Storefront
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Ecommerce Events
  • Component Bundle
  • Checkout APIs
  • Change Log
App Functions
Partner APIs
Partner APIs
  • App API
  • Shipments & Fulfillment APIs
  • Salla AWB
  • Recurring Payments API
  • Billing System Salla partners
  • Communication Apps
Dev Tools
Dev Tools
  • Partners Agent Kit
  • Salla Apps Playbook
  • Salla CLI
Merchant
Merchant
  • Merchant API
  • Embedded SDK
  • Salla OAuth 2.0
Storefront
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Ecommerce Events
  • Component Bundle
  • Checkout APIs
  • Change Log
App Functions
Partner APIs
Partner APIs
  • App API
  • Shipments & Fulfillment APIs
  • Salla AWB
  • Recurring Payments API
  • Billing System Salla partners
  • Communication Apps
Dev Tools
Dev Tools
  • Partners Agent Kit
  • Salla Apps Playbook
  • Salla CLI
Salla - Opensource
Salla - Developers Community
  1. Cart

Add Item

This addItem endpoint adds an item from the merchant's store to the customer's shopping cart. The customer may select the item, type in the quantity he wants to order, and click on the "add to cart" button. This sends the product to the shopping cart, and then the customer may continue to shop for other items.
TIP
The add item endpoint has been implemented in the Add Product Web Component, and it's ready for use.

Payload#

AddItemPayload

Response#

Success
Error
cart.addItem.success

Usage#

The method addItem adds an item into the cart, the developer may call the method addItem as follows:

Simple Product#

Variable product#

Events#

This endpoint may trigger two events, the onItemAdded and onItemAddedFailed events.

onItemAdded#

This event is triggered when adding an item to the cart is done without having any errors coming back from the backend.

onItemAddedFailed#

This event is triggered when adding an item to the cart is not completed and an error has occurred. For example, the id of the product to be added to the cart was not found.
Modified at 2026-07-09 11:27:26
Previous
Quick Add
Next
Details