Get Auchan product offers
Automatically get Auchan product offers on auchan.fr. List every offer for one product of the Auchan France store (auchan.fr): Auchan has a marketplace, so one product can be sold by several sellers. For each offer: the offer id and seller id (to pass to Add a product to the Auchan cart), the seller name, the seller type, the price and the price before discount in euros, the delivery channel, the delivery promise and its price as the site writes them, and whether it is the offer the site shows first. A product sold only by the Auchan store gives one offer, with the store's price when a store is chosen: pass a postcode and the script chooses the nearest drive or Click & Collect store the site lists for it, as a guest. A product id or link that the store does not have fails with a message that says so.
Inputs
product requiredThe product id or reference from Search Auchan products, or an auchan.fr product link.
postcode optionalFrench postcode (5 digits). When given, the script chooses the nearest drive or Click & Collect store Auchan lists for it.
Output
url requiredname requiredoffers requiredproductId requiredstore optionalFAQ
Remove a product from the Auchan cart
Remove a product from the Auchan France (auchan.fr) cart of this browser by its product id, whatever its quantity, and return what is left in the cart: each line with its line id, product id, offer id, name, seller, quantity, unit price and line price in euros, plus the item count and the cart total. Give the offer id or the line id from List Auchan cart items to remove one seller's line only when the product is in the cart from several sellers. Works as a guest, with no account. A product that is not in the cart gives removed false, and nothing is changed.
Add a product to the Auchan cart
Add a product of the Auchan France store (auchan.fr) to the cart of this browser, from its product id, reference or link, with a quantity from 1 to 99, and return the cart afterwards: each line with its line id, product id, offer id, name, seller, quantity, unit price and line price in euros, plus the item count and the cart total. Works as a guest, with no account; lines already in the cart stay and are listed too. Grocery products need a store: pass a postcode and the script chooses the nearest drive or Click & Collect store Auchan lists for it, or keep the store this browser chose before. For a product that marketplace sellers sell, pass the offer id from Get Auchan product offers to buy from that seller; without it, the offer the site shows first is added. Nothing is paid or ordered, and no delivery slot is booked. An unknown product, a link that is not an Auchan product page, a quantity out of range, an offer the product does not have, and a product the site does not sell now fail with a message that says so.
List Auchan cart items
List the items in the Auchan France (auchan.fr) cart of this browser, as the site holds it: for each line its line id, product id, offer id, name with the brand, seller (the drive or Click & Collect store, or the marketplace seller), quantity, unit price and line price in euros, plus the number of items and the cart total. The cart is the guest cart of the browser, so no sign-in is needed; its prices are those of the store this browser chose. An empty cart returns an empty list and a zero count.
