App Logo
mi.com

Add to Xiaomi UK cart

TL;DR

Automatically add to Xiaomi UK cart on mi.com. Add one unit of a Xiaomi UK product to the cart of your browser and get the cart back, with prices in pounds.

About

Give it the variant's item id from Get Xiaomi UK product, when the product has more than one. It adds the product as the buy page's button does, and lines already in the cart stay. A sold-out variant or an unknown product fails with an error. Nothing is paid or ordered. No account is needed.

Inputs

product required

The product's slug (e.g. redmi-buds-5-pro) or a mi.com/uk product link.

item_id optional

The variant's item_id from Get Xiaomi UK product. Needed when the product has several variants.

Output

slug required
count required
lines required
item_id required
line_id required
quantity_in_cart required
total optional
currency optional
delivery optional
subtotal optional

FAQ

Add one unit of a Xiaomi UK (mi.com/uk) product to the shopping cart with the buy page's own Add to cart button, for the variant given by its item id (from Get Xiaomi UK product; not needed when the product has one variant), and return the cart afterwards: each line with its line id, item id, name, quantity, prices in pounds and a review_hash, plus the item count, subtotal, delivery and total. Works as a guest: lines already in the cart stay. Nothing is paid or ordered. A sold-out variant, an unknown product or item id fails with an error.
Ask an AI agent connected to Reduck to run reduck/mi.com/add_to_cart, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/mi.com/add_to_cart
You do not need one. "Add to Xiaomi UK cart" drives the real mi.com pages in a browser, so it works whether or not mi.com offers an API for this.
Required: product. Optional: item_id.
It returns slug, count, lines, total, item_id, line_id, currency, delivery, subtotal, quantity_in_cart.
No. It only uses pages of mi.com that are reachable without signing in.
It makes changes on mi.com, like sending, posting, booking or buying something.
Ask an AI agent connected to Reduck to run reduck/mi.com/add_to_cart, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/mi.com/add_to_cart
It is one of Reduck's official scripts.

Start building not clicking