Skip to main content
POST
Error

Body

application/json
id
string
required

Unique identifier for the product or variation ID.

quantity
string
default:1
required

Quantity of this item to add to the cart.

variation
object

Variable attributes that identify the variation of the item.

item_data
object

Additional item data passed to make item unique.

email
string<email>

Set the customers billing email address.

phone
string

Set the customers billing phone number.

price
string

Overrides the general or sale price with a custom price for the item if set.

return_item
boolean
default:false

Returns the item details once added.

Response

Item added to cart successfully.

Returns a full updated cart response.

cart_hash
string

Unique cart hash.

cart_key
string

Unique cart key for the customer.

currency
object
customer
object
items
object

Cart items indexed by item key.

item_count
integer

Total number of items in cart.

items_weight
number

Total weight of all items.

coupons
object[]

Applied coupons.

needs_payment
boolean

Whether the cart needs payment.

needs_shipping
boolean

Whether the cart needs shipping.

shipping
object
fees
object[]

Cart fees.

taxes
object[]

Cart taxes.

totals
object
removed_items
object[]

Recently removed items that can be restored.

cross_sells
object[]

Cross-sell products.

notices
object

Cart notices and messages.

extensions
object

Additional data from extensions.