Add a product to the Holland & Barrett cart
Automatically add a product to the Holland & Barrett cart on hollandandbarrett.com. Add a product of Holland & Barrett UK (hollandandbarrett.com, the United Kingdom store) to the basket of this browser, from its Holland & Barrett product id or product page link, with a quantity, as the product page's add to basket button does. Each size of a product has its own product id (see sizes in Get Holland & Barrett product). Returns the product id, its sku (offerId) and name, the units added, and the basket after the add: each line with its product id, sku, name, seller, quantity, unit price and line price in pounds (GBP), the item count, the total and the currency. Works as a guest, with no account: lines already in the basket stay. Nothing is ordered or paid. An unknown product, a product page with no add button, or an add the site refuses fails with an error that says so.
Inputs
product requiredA Holland & Barrett product id as Search Holland & Barrett products returns it, for example 6100005252, or a hollandandbarrett.com product page link.
quantity optionalHow many units to add.
Default: 1Output
name requiredadded requiredUnits this run added.
count requiredUnits in the basket after the add.
lines requiredtotal requiredTotal of the basket with promotions applied, delivery not included.
offerId requiredThe sku of the product added.
currency requiredproductId requiredFAQ
Remove a product from the Holland & Barrett cart
Remove a product from the basket of this browser on Holland & Barrett UK (hollandandbarrett.com, the United Kingdom store), from its Holland & Barrett product id or product page link, whatever its quantity, with the basket page's own quantity button. Returns removed and the basket after it: each line with its product id, sku, name, seller, quantity, unit price and line price in pounds (GBP), the item count, the total and the currency. A product that is not in the basket gives removed false and the basket unchanged, not an error. Works as a guest, with no account.
List Holland & Barrett cart items
List the basket of this browser on Holland & Barrett UK (hollandandbarrett.com, the United Kingdom store): each line with its product id, sku (as line id and offer id), name, seller (Holland & Barrett or a marketplace seller), quantity, unit price and line price in pounds (GBP), plus the item count, the basket total with promotions applied (delivery not included) and the currency. Works as a guest, with no account. A browser that never had a basket gives an empty one.
Get Holland & Barrett product
Get one product of Holland & Barrett UK (hollandandbarrett.com, the United Kingdom store) from its Holland & Barrett product id or product page link: sku, name, brand, link, category, description (as the site's HTML), images, price and earlier price in pounds (GBP), discount percent, price per unit, promotions, availability and stock status, whether a marketplace seller sells it, rating and review count, and the other sizes of the product (each a product of its own, with its id, label, price and availability). An id that is not a Holland & Barrett product fails with an error that says so.
