Add H&M France product to cart
Automatically add H&M France product to cart on hm.com. Add one size of an H&M France product (hm.com/fr_fr) to the guest cart of this browser, with a quantity from 1 to 10, and return the cart as the site holds it afterwards: each line with variant id, product id, name, brand, size, color, quantity, unit price and line price in euros, plus the item count and the items subtotal. Pass the variant id (product id plus size code, from Search or Get H&M France product). Given only a product id or a link, it fails with the list of sizes and their variant ids. A size that is out of stock fails with an error. Nothing is paid or ordered.
Inputs
product requiredVariant id (13 digits: product id plus size code, for example 0685816001003 for size M), as returned by Search H&M France products or Get H&M France product. A product id or a product link is refused with the list of its variants.
quantity optionalNumber of units to add.
Default: 1Output
name requiredadded requiredcount requiredlines requiredtotal requiredofferId requiredproductId requiredFAQ
Search H&M France products
Search the H&M France shop (hm.com/fr_fr, prices in euros) by free text and return one page of results of about 36 products: id, name, price, colors, sizes with their variant ids and stock, image and link, plus the total count, the page count and the filters the site offers. Page through with page; stop when has_next_page is false. Pass a product id to Get H&M France product, or a variant id (product id plus size code) to Add H&M France product to cart.
Remove H&M France product from cart
Remove a product from the H&M France guest cart of this browser (hm.com/fr_fr), whatever its quantity, and return what is left: each line with variant id, product id, name, brand, size, color, quantity, unit price and line price in euros, plus the item count and the items subtotal. Pass a variant id (product id plus size code) to remove that size, or a product id to remove every size of it. A product that is not in the cart is reported with removed false and the cart unchanged, not as a failure.
List H&M France cart items
List the items in the H&M France cart of this browser (hm.com/fr_fr), as the site holds it: for each line the variant id, product id, name, brand, size, color, quantity, unit price and line price in euros, plus the item count and the items subtotal (delivery not included). The cart is the guest cart of the browser, so no sign-in is needed. An empty cart returns an empty list and a zero count.
