App Logo
hp.com

Add a product to the HP cart

Automatically add a product to the HP cart on hp.com. Add a fixed HP model (product class STO) of the HP US store (hp.com/us-en/shop) to the cart of this browser, by its link or HP part number, with a quantity from 1 to 10, and return the whole cart afterwards: each line with its line id, product id (the HP part number), offer id (always null), name, seller (always HP), quantity, unit price and line price in US dollars, plus the item count and the products total before tax and shipping. Works as a guest, with no account: lines already in the cart stay and are listed too. Nothing is paid or ordered. A customizable model (CTO), an out of stock product, an unknown part number and a link that is not an HP product page fail with an error that says so.

Inputs

url optional

HP US store product link (https://www.hp.com/us-en/shop/pdp/...), as Search HP products returns it.

quantity optional

Number of units to add, 1 to 10.

Default: 1
product_id optional

HP part number, for example 7P8K6AV_1 (product_id of Search HP products). Used when no url is given.

Output

name required
added required

Units added by this call.

count required

Number of units in the cart after the add, all lines together.

lines required
total required

Total of the products in US dollars, before tax and shipping.

offerId required

Always null: HP sells its products itself.

productId required

HP part number of the product added.

FAQ

Add a fixed HP model (product class STO) of the HP US store (hp.com/us-en/shop) to the cart of this browser, by its link or HP part number, with a quantity from 1 to 10, and return the whole cart afterwards: each line with its line id, product id (the HP part number), offer id (always null), name, seller (always HP), quantity, unit price and line price in US dollars, plus the item count and the products total before tax and shipping. Works as a guest, with no account: lines already in the cart stay and are listed too. Nothing is paid or ordered. A customizable model (CTO), an out of stock product, an unknown part number and a link that is not an HP product page fail with an error that says so.
Ask an AI agent connected to Reduck to run reduck/hp.com/add_to_cart, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/hp.com/add_to_cart
You do not need one. "Add a product to the HP cart" drives the real hp.com pages in a browser, so it works whether or not hp.com offers an API for this.
Optional: url, quantity, product_id.
It returns name, added, count, lines, total, offerId, productId.
No. It only uses pages of hp.com that are reachable without signing in.
It makes changes on hp.com, like sending, posting, booking or buying something.
Ask an AI agent connected to Reduck to run reduck/hp.com/add_to_cart, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/hp.com/add_to_cart
It is one of Reduck's official scripts.

Start building not clicking