Appearance
Calculate full checkout totals (items + shipping + delivery + coupon + gifts + points), VAT-inclusive
POST
/rest/v1/checkout/totals
The quote a headless storefront prices against: every money term POST /rest/checkout/place-order charges, computed by the same collaborators, plus the loyalty redemption DECISION a client cannot derive on its own (#595). ORDER OF OPERATIONS (#568, legacy parity): the coupon is deducted from the gross item subtotal BEFORE the shipping cost is computed, so the free-shipping threshold (TRANS_COST_LIMIT) is evaluated against the REDUCED total — mirroring Adv_order_model::create_order(), which does $cart['cart_total_vat'] -= $order['coupon_value'] and only then calls transfer_cost_admin(). Two consequences worth surfacing in a storefront UI: a coupon can never EARN free shipping, and applying one CAN cost the customer free shipping they would otherwise have qualified for. POST /rest/checkout/place-order applies the identical ordering, so this quote matches the amount charged.
Parameters
Header Parameters
X-Cart-Token
Guest cart token (when not authenticated)
Type
string
Request Body
application/json
JSON "transportId": 0, "countryAlpha2": "string", "countyAlpha": "string", "postalCode": "string", "payWay": "delivery", "redeemPoints": false, "giftPackaging": false, "selectedGifts": [ { "giftId": 12, "productId": 340, "qty": 1 } ]
{
}
Responses
Checkout totals breakdown. All money figures are VAT-INCLUSIVE (gross): subtotal is the gross item subtotal and total is the gross grand total, i.e. the amount that will be charged. shippingCost, deliveryCost, couponDiscount, giftPackagingCost, giftDiscount and pointsCash are the amounts applied to that gross base. TWO fields are NOT terms of total and must never be summed into one: overweightCost, which is already inside shippingCost, and payableBeforePoints, which is total before the redemption. giftPackagingCost IS a real, additive term (#595) — unlike overweightCost it is charged on top, exactly as POST /rest/checkout/place-order charges it.
application/json
JSON "subtotal": 52.7, "itemCount": 3, "shippingCost": 3, "overweightCost": 0, "deliveryCost": 0, "couponDiscount": 5, "giftPackagingCost": 0, "giftDiscount": 0, "pointsSpend": 200, "pointsCash": 8, "payableBeforePoints": 58.7, "loyalty": { "pointSystemEnabled": true, "spendPoints": 518, "rewardCashPerUnit": 8, "balance": 1036, "redeemablePoints": 1036, "redeemableCash": 16, "canRedeem": true, "wouldExceed": false }, "total": 50.7
{
}