Update item quantity in cart
Description
This service updates the quantity of a specific item already in the cart for a given mileage activity.
Request
Restrictions
This service requires an authenticated user. The logged-in consumer or operator must have the necessary permissions enabled for this service.
Endpoint
PUT https://<server-url>/api/v4/mileage/{activity_code}/cart/items/{item_code}Path Parameters
activity_code
String
The unique code for the mileage activity.
item_code
String
The unique code of the item in the cart to update.
Parameters
touchpoint
Query / Header
The identifier for the touchpoint. Use Thalamus-Touchpoint for the header.
token
Query / Header
The authentication token for the API session. Use Thalamus-Token for the header.
Full URL Example
Request Body
The body of the request must specify the new quantity for the item.
quantity
Integer
The new number of units for the item. A quantity of 0 will remove the item from the cart.
JSON
Response
✅ Successful Response: 201 Created
201 CreatedThe item's quantity was successfully updated. The response returns the updated session context, reflecting the new cartTotal and accountBalance in the personStatus object.
JSON
❌ Unsuccessful Response: 400 Bad Request
400 Bad RequestReturned if the item is invalid (e.g., requested quantity exceeds stock) or the consumer has insufficient points for the new total.
JSON
❌ Unsuccessful Response: 404 Not Found
404 Not FoundReturned if the specified activity_code or item_code does not exist in the cart.
JSON
Last updated
Was this helpful?
