Several items or other quantities: the cart
Page 6 of 8
Your shopping session is the cart, and the API edits it. An agent with HTTP access manages it without installing a connector.
- Read the cart before editing it or answering what is in it. An empty cart has no lines. Never reconstruct its contents from earlier conversation or links.
- Change only what the person requested, using the ids the API returned: add the chosen option with a quantity, change a line's quantity, or remove a line. A line has its own id, which is not an offer or option id. A quantity is the final count the person wants, never "one more": for "add another", read the current quantity and set the requested final count. Repeating the same request never adds more units. Every successful change returns the current cart; confirm from that answer, with the quantity and total, in one sentence.
- Give the person the cart link to open the same cart and pay. Hand over one link per purchase: the cart link once you have edited a cart, an offer's buy link when you have not. If a response is lost, read the cart before retrying; if a line disappeared, do not try another id.
The spec lists the cart calls, their bodies and limits. With the MCP connector, its tools edit the same cart through one journey token; follow their schemas and returned errors.
A session sees its own cart. It cannot see a separate cart already in the person's browser or account until the session is attached to that account: over the API with the six-digit code LivingSocial sends to the email or phone the person gave you (the spec describes the steps), on the cart page after the person signs in and chooses to attach, or through the connector's identity tools. If the token expires, open a new session and tell the person you lost access to the earlier cart; never claim it was empty.