This documentation is a Work in Progress. There maybe content unfinished. Feedback is welcome.
curl --request POST \
--url {protocol}://{host}/wp-json/cocart/v1/item \
--header 'Content-Type: application/json' \
--data '{
"cart_item_key": "<string>",
"quantity": "<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>"
}
Updates the quantity of a specific item in the customer’s cart.
{
"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.
The response is of type object
.
Was this page helpful?