Documentation is still being updated. Some content maybe unfinished.
A valid request URL is required to generate request examples{
"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>"
}Updates the quantity of a specific item in the customer’s cart.
curl --request POST \
--url {protocol}://{host}/wp-json/cocart/v1/item \
--header 'Content-Type: application/json' \
--data '
{
"quantity": "<string>",
"cart_item_key": "<string>",
"return_cart": false
}
'{
"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>"
}Cart item updated successfully.
Unique identifier for the item within the cart.
Unique identifier for the product.
Unique identifier for the variation.
Chosen attributes (for variations).
Show child attributes
Quantity of this item in the cart.
Hash of cart item data.
Line tax data.
Show child attributes
Line subtotal (the price of the product before coupon discounts have been applied).
Line subtotal tax.
Line total (the price of the product after coupon discounts have been applied).
Line total tax.
Product name.
Product title.
Current product price.
Product image URL. (Returns if thumb is true)
Was this page helpful?