---
title: "GET /cart/{cart_id}/counter"
method: GET
path: "/cart/{cart_id}/counter"
---

# GET /cart/{cart_id}/counter

`GET /cart/{cart_id}/counter`

## Request

- Base URL: `https://developers.whmcs.com/api/v2`
- URL: `https://developers.whmcs.com/api/v2/cart/{cart_id}/counter`
- Auth: none declared

Get the total number of items in the cart.

## Path parameters

- `cart_id` string, required

## Response `200`

Success

- object
  - `data` object, required
    - `counter` integer, required: The total number of items in the cart (which is not the same as the number of products/services entities in the cart) because a product's addon can be considered a separate item even if the addon is a part of the product entity.

## Other responses

- `404`: Entity Not Found
- `default`: General Error

---

[API](https://skmtc.dev/whmcs/apis/whmcs-api.md) - [All operations](https://skmtc.dev/whmcs/apis/whmcs-api/llms.txt) - [OpenAPI document](https://skmtc.dev/whmcs/apis/whmcs-api/revisions/bd3848ddbc3f?raw)
