List the items in the Gap cart
Automatically list the items in the Gap cart on gap.com. List the items in the Gap US (gap.com) shopping bag of this browser, as the site holds it. For each line: its line id (to pass to Remove a product from the Gap cart), product id, offer id (the sku), name, seller, quantity, unit price and line price in US dollars after the offers Gap applies in the bag. Gap can show units of one size on several lines, for example when an offer prices them differently. Also returns the number of units and the estimated total, before tax and shipping. The bag is the guest bag of the browser, so no sign-in is needed. An empty bag returns an empty list and a zero count.
Inputs
None
Output
count requiredlines requiredtotal requiredFAQ
Get Gap product
Get one product of the Gap US store (gap.com) from its id or its product page link: the product id, name, brand, description and detail lines, rating and rating count, the fits (for example Regular, Tall, Petite) and size labels, every color with its id, name, price, regular price, stock status and image, and every size variant with its offerId (the sku), color, fit, size, price, regular price in US dollars and stock. Pass offerId and productId to Add a product to the Gap cart. A product page can hold several colors that Gap names differently: name is the name of the color the page shows (selectedColorId), and each color has its own title. An id or link that Gap does not know fails with a message that says so.
Remove a product from the Gap cart
Remove lines from the Gap US (gap.com) shopping bag of this browser and return the bag as the site holds it afterwards. Give lineId to remove one line, or offerId to remove every line of that size. Both come from List the items in the Gap cart. Returns removed (true when lines were removed, false when no line matched, and then nothing is changed), the number of units, the estimated total before tax and shipping, and each line left with its line id, product id, offer id, name, seller, quantity, unit price and line price in US dollars. Works as a guest, with no account.
Add a product to the Gap cart
Add a size of a Gap US (gap.com) product to the shopping bag of this browser, for shipping, and return the bag as the site holds it afterwards. Give the product id or link and the offerId of the size, both from Get Gap product, and a quantity from 1 to 5. Returns the product id, offer id, name, the number of units added, and the bag: the number of units, the estimated total before tax and shipping, and each line with its line id, product id, offer id, name, seller, quantity, unit price and line price in US dollars. Gap can show units of one size on several lines, for example when an offer prices them differently. Works as a guest, with no account: lines already in the bag stay and are listed too. Nothing is paid or ordered. A product that Gap does not know, a missing or unknown offerId, an out of stock size, or a quantity out of range fails with a message that says so, and adds nothing.
