Returns a light-weight snapshot with the top-level item count and the rounded total. Use it to show the cart badge or confirm how much the guest should pay. If the cart does not exist the API calmly returns zeros instead of throwing an error.
Request
Authorization
Add parameter in header
X-Access-Token
Example:
X-Access-Token: ********************
Query Params
Responses
🟢200OK
application/json
Current totals for the cart.
Body
🟠401Unauthorized
🟠403Forbidden
Request Request Example
Shell
JavaScript
Java
Swift
curl--location-g--request GET '/api/method/public/online-ordering/get-cart-totals?cart_id' \
--header'X-Access-Token: <api-key>'