This documentation is a Work in Progress. There maybe content unfinished. Feedback is welcome.
{
"1c383cd30b7c298ab50293adfecb7b18": {
"key": "1c383cd30b7c298ab50293adfecb7b18",
"product_id": 35,
"variation_id": 0,
"variation": [],
"quantity": 6,
"data_hash": "b5c1d5ca8bae6d4896cf1807cdf763f0",
"line_tax_data": {
"subtotal": [],
"total": []
},
"line_subtotal": 108,
"line_subtotal_tax": 0,
"line_total": 108,
"line_tax": 0,
"data": {},
"product_name": "T-Shirt with Logo",
"product_title": "T-Shirt with Logo",
"product_price": "£18.00"
},
"70efdf2ec9b086079795c442636b55fb": {
"key": "70efdf2ec9b086079795c442636b55fb",
"product_id": 17,
"variation_id": 0,
"variation": [],
"quantity": 5,
"data_hash": "b5c1d5ca8bae6d4896cf1807cdf763f0",
"line_tax_data": {
"subtotal": [],
"total": []
},
"line_subtotal": 225,
"line_subtotal_tax": 0,
"line_total": 225,
"line_tax": 0,
"data": {},
"product_name": "Hoodie with Logo",
"product_title": "Hoodie with Logo",
"product_price": "£45.00"
}
}
Gets the cart items added by the customer.
curl --request GET \
--url {protocol}://{host}/wp-json/cocart/v1/get-cart
{
"1c383cd30b7c298ab50293adfecb7b18": {
"key": "1c383cd30b7c298ab50293adfecb7b18",
"product_id": 35,
"variation_id": 0,
"variation": [],
"quantity": 6,
"data_hash": "b5c1d5ca8bae6d4896cf1807cdf763f0",
"line_tax_data": {
"subtotal": [],
"total": []
},
"line_subtotal": 108,
"line_subtotal_tax": 0,
"line_total": 108,
"line_tax": 0,
"data": {},
"product_name": "T-Shirt with Logo",
"product_title": "T-Shirt with Logo",
"product_price": "£18.00"
},
"70efdf2ec9b086079795c442636b55fb": {
"key": "70efdf2ec9b086079795c442636b55fb",
"product_id": 17,
"variation_id": 0,
"variation": [],
"quantity": 5,
"data_hash": "b5c1d5ca8bae6d4896cf1807cdf763f0",
"line_tax_data": {
"subtotal": [],
"total": []
},
"line_subtotal": 225,
"line_subtotal_tax": 0,
"line_total": 225,
"line_tax": 0,
"data": {},
"product_name": "Hoodie with Logo",
"product_title": "Hoodie with Logo",
"product_price": "£45.00"
}
}
Unique identifier for the cart/customer.
Returns the URL of the product image thumbnail.
List of cart items.
A map of cart item keys to cart item objects. Each property key is a unique cart item key.
Was this page helpful?