Skip to main content
POST
/
add-item
{
  "key": "<string>",
  "product_id": 123,
  "variation_id": 123,
  "variation": {},
  "quantity": 123,
  "data_hash": "<string>",
  "line_tax_data": {
    "subtotal": [
      123
    ],
    "total": [
      123
    ]
  },
  "line_subtotal": 123,
  "line_subtotal_tax": 123,
  "line_total": 123,
  "line_tax": 123,
  "product_name": "<string>",
  "product_title": "<string>",
  "product_price": "<string>",
  "product_image": "<string>"
}

Body

application/json
quantity
string
default:1
required

The quantity amount of the item to add to cart.

product_id
string

Unique identifier for the product.

variation_id
integer

Unique identifier for the variation.

variation
object

The variation attributes that identity the variation of the item.

cart_item_data
object

Additional item data passed to make item unique.

return_cart
boolean
default:false

Returns the cart once item is added.

Response

Item added to cart successfully.

key
string

Unique identifier for the item within the cart.

product_id
integer

Unique identifier for the product.

variation_id
integer

Unique identifier for the variation.

variation

Chosen attributes (for variations).

quantity
integer

Quantity of this item in the cart.

data_hash
string

Hash of cart item data.

line_tax_data
object

Line tax data.

line_subtotal
number

Line subtotal (the price of the product before coupon discounts have been applied).

line_subtotal_tax
number

Line subtotal tax.

line_total
number

Line total (the price of the product after coupon discounts have been applied).

line_tax
number

Line total tax.

product_name
string

Product name.

product_title
string

Product title.

product_price
string

Current product price.

product_image
string

Product image URL. (Returns if thumb is true)

I