Add Carrefour product to cart
Automatically add Carrefour product to cart on carrefour.fr. Add a Carrefour.fr product to this browser's cart from its barcode number or product link, with an optional offer id (Carrefour's or a marketplace seller's, from List Carrefour product offers) and a quantity from 1 to 10, and return the cart afterwards. Without an offer id, the offer the product page shows first is added. Works as a guest. Nothing is paid or ordered. An unknown product, an unknown or unavailable offer, or a quantity above the offer's limit fails with an error.
Inputs
product requiredBarcode number of the product, or a carrefour.fr/p/... link.
offer_id optionalOffer to buy from, from List Carrefour product offers. Leave out for the offer the product page shows first.
quantity optionalOutput
added requiredcount requiredlines requiredtotal requiredofferId requiredproductId requiredFAQ
Remove Carrefour product from cart
Remove a product's line from this browser's Carrefour.fr cart by barcode number, whatever its quantity, and return the cart left. Takes the line's review_hash from List Carrefour cart items: when it is missing or the line changed since, nothing is removed and the error gives the line as it is now and its hash. When the product is in the cart from several offers, pass the offer id. A product not in the cart returns removed false.
List Carrefour cart items
List the items in the Carrefour.fr cart of this browser (guest or signed in): grocery, home-delivered and marketplace lines, each with its line id, barcode number, offer id, name, seller, quantity, unit price and line price in euros and its review_hash (pass it to Remove Carrefour product from cart), plus the item count and total. An empty cart returns an empty list.
List Carrefour product offers
List every offer Carrefour.fr shows for one product, from its barcode number or product link: Carrefour's own offers and each marketplace seller's, with offer id, seller name and id, price in euros, shipping price and days, availability, purchase limit and the seller's rating. Pass an offer id to Add Carrefour product to cart to buy from that seller. An unknown barcode number fails with an error that says so.
