Re-price a cart for an identified customer

Call this once a shopper identifies themselves after items are already in the cart, so lines are re-priced for that customer and the updated cart is returned. It is also the call to make whenever you just need the cart's prices refreshed. Lines of type PHYSICAL_ADDON, PHYSICAL, VOUCHER, NETS_VOUCHER and DONATION are left exactly as they are, since they carry a shopper-entered price or other data that only their own add routes can set; every other line is removed and re-added rather than updated in place, so its lineId changes, and a line whose product no longer resolves is dropped instead of being re-added. Always re-read the returned cart's line ids before calling PATCH or DELETE on /api/cart/lines — never reuse ids captured before this call.

Headers

x-entriastringRequired
Identifies which store this request is for. Required on every store-scoped route. It is not authentication and not a secret — it grants no privileges and is safe to send from a browser. You receive the value once your Entria backend has been created and configured. Missing header returns 400; an unknown store returns 404.

Query parameters

identitystringOptional

An opaque token identifying the customer, obtained elsewhere in your integration and passed through unchanged. Include it to get that customer’s pricing; omit it to reprice at standard prices.

Request

This endpoint expects an object.
cartIdstringRequired

Response

The cart with its lines re-priced and new totals. PHYSICAL_ADDON, PHYSICAL, VOUCHER, NETS_VOUCHER and DONATION lines are returned untouched; every other line has been removed and re-added with a new lineId, and a line whose product no longer resolves is simply absent — treat these returned line ids as the only current ones and drop any captured before this call.
cartobject

Errors

400
Bad Request Error
404
Not Found Error
500
Internal Server Error