App Logo
hp.com

Remove a product from the HP cart

Automatically remove a product from the HP cart on hp.com. Remove a line from the HP US store (hp.com/us-en/shop) cart of this browser, by its line id or by the product's HP part number (from List the items in the HP cart), and return the whole cart afterwards with removed true. A product that is not in the cart is not an error: nothing changes and removed is false. Works as a guest, with no account. Nothing is paid or ordered.

Inputs

line_id optional

Cart line id (lineId of List the items in the HP cart).

product_id optional

HP part number of the product to remove, for example 7P8K6AV_1. Used when no line_id is given.

Output

count required

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

lines required
total required

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

removed required

True when a line was removed, false when the product was not in the cart.

FAQ

Remove a line from the HP US store (hp.com/us-en/shop) cart of this browser, by its line id or by the product's HP part number (from List the items in the HP cart), and return the whole cart afterwards with removed true. A product that is not in the cart is not an error: nothing changes and removed is false. Works as a guest, with no account. Nothing is paid or ordered.
Ask an AI agent connected to Reduck to run reduck/hp.com/remove_from_cart, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/hp.com/remove_from_cart
You do not need one. "Remove a product from 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: line_id, product_id.
It returns count, lines, total, removed.
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/remove_from_cart, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/hp.com/remove_from_cart
It is one of Reduck's official scripts.

Start building not clicking