Get cart items count
GET
/cms/customer/cart/items_count
const url = 'https://api.example.com/cms/customer/cart/items_count?id=example';const options = {method: 'GET', headers: {'API-Key': '<API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.example.com/cms/customer/cart/items_count?id=example' \ --header 'API-Key: <API-Key>'GET /customer/cart/items_count Get the total number of items in the cart
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”id
required
string
Cart ID as returned by POST /cms/customer/cart ({cartId}-{key})
Responses
Section titled “Responses”Items count
Media typeapplication/json
object
items_count
integer
Example generated
{ "items_count": 1}Missing or malformed cart ID