1. Create a cart
create_cart returns an empty cart. The id is used by every later call.
account: "platform" uses the signed-in AgentMall Walmart account and clears its shared cart. Omit account for a shopper browser, then call sign_in with encrypted credentials.
2. Search
search_catalog returns up to 10 products. Prices are integer minor units (cents for USD).
3. Add to cart
update_cart replaces the cart contents. The response includes the live line items and totals from the merchant.
url must already point to the chosen size or colour. If the product has options, call get_product first to get the variants list, then use the variant’s id and url.
4. Open checkout
create_checkout opens the checkout page and reads it. Nothing is placed.
5. Set address and shipping
update_checkout writes the address and selects shipping. The response includes updated totals with tax.
6. Add payment
ev: ciphertext, collected through the console’s card collection page. Never send a raw card number.
7. Place the order
Show the review to the shopper. When they approve:complete_checkout places the order. One approval, one merchant commit.
8. Verify the order
get_order reads the order. No session needed.
What to watch for
- Check titles after searching. Search results are real listings and relevance varies.
- Show totals before asking for payment. Tax depends on the address.
- Use the latest
review_hashfrom the most recent checkout response. A stale hash returnsreview_changed. - Never retry after
commit_unknown. Callget_orderand wait. See Handling checkout errors.