Skip to main content
GET
/
cart
/
items
/
count
Count cart items
curl --request GET \
  --url {protocol}://{host}/wp-json/cocart/v2/cart/items/count
5

Documentation Index

Fetch the complete documentation index at: https://docs.cocartapi.com/llms.txt

Use this file to discover all available pages before exploring further.

This endpoint will be deprecated in the future. Recommend getting the items count from the main cart endpoint.

Query Parameters

return
enum<string>

Return count as a string or array format.

Available options:
numeric

Response

Cart item count retrieved successfully.

Number of items in the cart.

Example:

5