> ## Content Index
> Fetch the complete content index at: https://blog.affiliate.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Wishlist API: Let Shoppers Save Gifts and See When the Price Drops
- URL: https://blog.affiliate.com/wishlist-api/
- Published: 2026-11-17T21:00:00.000Z
- Updated: 2026-12-03T03:01:38.000Z
- Description: A wishlist is only useful if it remembers what a gift cost when it was saved. This guide shows how the Price History API turns a saved price into a drop alert, with an interactive wishlist you can try.
- Author: Dylan Bertalli

Every gift list has the same weak spot: a shopper saves an item in October and has no idea in November whether the price moved. A Wishlist API closes that gap by remembering what the item cost when it was saved and comparing it with what it costs now. The Affiliate.com Price History API supplies the daily record behind that comparison for any product with a barcode, across every store that sells it. The demo below uses prices last pulled December 2, 2026. Save a gift and see how its price moved.

## What a wishlist has to remember

A wishlist looks like a list of products, but the useful part is a small record attached to each one. It needs three facts: which product the shopper saved, what the price was at that moment, and the date. Everything a wishlist can say later, such as “down $17” or “back to the price you saved”, is a comparison between that record and today’s price.

The product identity should be a barcode. A barcode names one exact product no matter which store sells it, so a wishlist item survives a shopper switching stores, and a store changing its own product titles. The saved price should be the lowest in-stock price on the day of the save, because that is the price the shopper could actually have paid. Saving a store’s list price, or the price of a store that was out of stock, makes every later comparison look better or worse than it was.

Once those three facts are stored, the page needs one request per saved item to learn what happened since. The Price History API returns the daily series for a barcode, so the page can answer three questions: what does it cost now, has it ever been below the saved price, and on what day did that first happen.

## Who builds with a wishlist API

Retail and gifting apps are the obvious home for a wishlist, and shopper accounts rarely stop at one list. Seasonal lists, birthday lists and registries all need the same record. Publishers add a lighter version to gift guides, where a reader can save a few picks and come back to see whether any of them moved.

Cashback and rewards products use a wishlist as a reason to return. A message that says a saved item is now cheaper is a better prompt than a generic reminder, and it can be written from data instead of guessed. Our walkthrough of [building wishlists and collections](https://blog.affiliate.com/building-wishlists-and-collections-with-affiliate-com-product-data/) covers the saved-list side in more depth. This article adds the price watching.

AI shopping assistants can use the same record. An assistant that is asked “did my saved headphones get cheaper?” should answer from the stored price and the current history rather than from memory, and the comparison above is small enough to run inside a tool call.

## Try the wishlist

This wishlist runs on real results from the Price History API for popular gifts. The page holds a rotating set that is rebuilt every week, and it shows four of them in a different mix on most visits. The demo pretends each gift was saved 30 days ago, which is a simulation, because a shopper in the demo has no account. Save a gift to see the price it had that day, the price now and the first day it dropped below the saved price. The request below is the exact call that returns the history, and the second tab shows the short check a page runs on the response.

## How a saved gift becomes a price check

The request is one barcode. The Price History API accepts exactly one barcode in each request, so a wishlist with five items makes five requests, which is easy to run in parallel or in a nightly job. Each response contains one entry for every store that sells that barcode, and each entry carries the same fields. A wishlist needs only a handful of them.

| Field              | What it gives a wishlist                                                                                                             |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| series             | One point per observed day: date, regular price, final price, whether it was on sale and the availability.                           |
| final\_price       | The price a shopper pays that day. The wishlist compares the lowest of these across stores with the saved price.                     |
| availability       | InStock, OutOfStock or Unknown for the day. Only InStock points count, so an alert never points at a store that cannot ship.         |
| product.image\_url | A picture of the listing, used here for the gift cards. Ask for it with include\_product.                                            |
| stats              | A summary per store with the current, lowest and highest price. Send include\_series as false when only the current price is needed. |
| target\_ids        | One barcode per request. Every store that carries it is included, so the same gift at different stores lands in one response.        |

One call covers up to 90 calendar days, and history reaches back 365 days. A day without a point means the price was not observed that day, so a wishlist should skip it rather than treat it as zero. The saved price in the demo is the nearest observed day on or before the save date for that reason.

## Turning a saved price into a drop alert

The alert is one function. It collapses every store’s series into one price per day after the save date, then compares today with the saved price. The same logic produces every row in the demo above.

```
// saved: { barcode, price, date } stored when the shopper taps Save
// listings: the data array of the price-history response
function checkWishlistItem(saved, listings) {
  const best = {};
  for (const l of listings)
    for (const p of l.series)
      if (p.availability === "InStock" && p.date >= saved.date &&
          (best[p.date] === undefined || p.final_price < best[p.date]))
        best[p.date] = p.final_price;
  const days = Object.keys(best).sort();
  const now = best[days[days.length - 1]];
  return {
    now,
    change: +(now - saved.price).toFixed(2), // negative means cheaper
    dropped: now < saved.price,
    firstDrop: days.find(d => best[d] < saved.price)
  };
}
```

Two choices here are worth making deliberately. The function reports the first day under the saved price as well as today’s price, because a shopper who missed a drop that lasted a week deserves to hear that it happened. And it uses only days on or after the save date, so history from before the shopper cared never changes the answer.

A wishlist can also fire when the price returns to the saved price after rising, or when a gift reaches its lowest price in the window. Both are small variations of the same comparison. Our post on [telling readers whether a Black Friday deal is real](https://blog.affiliate.com/price-history-api-black-friday-deal-real/) uses the same series to test a claimed discount.

## What the November 10, 2026 pull shows

We ran the same request for the eight gifts in that day’s set on November 10, 2026 and treated each as saved 30 days earlier. Two of the eight were cheaper than at the save date, five were more expensive and one had not changed. The largest drop was on the Dyson Airwrap multi-styler, $50.00 lower at $599.00\. The Breville Bambino Plus espresso machine went the other way and cost $99.84 more than at the save date, which is a good example of why a wishlist should report a rise as plainly as a drop.

| Gift                                   | Saved 30 days earlier | Today   | Change        |
| -------------------------------------- | --------------------- | ------- | ------------- |
| Breville Bambino Plus espresso machine | $399.95               | $499.79 | $99.84 higher |
| Marshall Acton III speaker             | $189.99               | $259.00 | $69.01 higher |
| Nintendo Switch Sports game            | $49.99                | $49.99  | No change     |
| Garmin Venu 3S watch                   | $279.99               | $379.00 | $99.01 higher |
| Wacom One 14 pen display               | $249.95               | $299.95 | $50.00 higher |
| Dyson Airwrap multi-styler             | $649.00               | $599.00 | $50.00 lower  |
| JBL Flip 7 speaker                     | $119.95               | $129.95 | $10.00 higher |
| Nintendo Switch OLED console           | $375.25               | $359.10 | $16.15 lower  |

This table is fixed to November 10, 2026\. The demo above is rebuilt every week with a different set of gifts, so both its products and its numbers will change as Black Friday approaches. Treat the table as a record of one day and the demo as the live version of the same check.

A handful of gifts is a small sample and not a market study. Each figure describes one product across the stores that report history for it, in US dollars. It says nothing about products outside the list.

## What to check before you ship a wishlist

A wishlist earns trust when its statements are plain facts, so a few habits are worth building in before holiday traffic arrives.

**Store the saved price, not just the item.** A page that stores only the product cannot say what changed. Keep the barcode, the lowest in-stock price and the date together in one row.

**State what was observed.** “Lower than the day you saved it” is a fact from the series. Words such as steal or deal are a judgment the data does not need. Show a rise as plainly as a drop, as the findings above do.

**Confirm stock before you notify.** The comparison already ignores out-of-stock days, but a page should check availability again before it sends a shopper to a store. [Handling out-of-stock and price-changed offers](https://blog.affiliate.com/how-shopping-agents-should-handle-out-of-stock-and-price-changed-offers/) lays out how an agent can do that.

**Match on the barcode.** Two colors or two bundles of the same model are different products with different barcodes, and mixing them makes a price look like it moved when it did not. [Barcode search](https://blog.affiliate.com/barcode-search-sku-mpn-id-and-barcode/) explains why the barcode comes first.

## Getting started in three steps

Moving from the demo to a wishlist of your own takes three steps, and the request panel above already contains the second one.

| Step                    | What to do                                                                                                                                                                                                        |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1\. Get a key           | Request an API key from Affiliate.com. Every request sends it as a Bearer token in the Authorization header, which is why the demo never needs one.                                                               |
| 2\. Save a record       | When a shopper saves a gift, store its barcode, the lowest in-stock price today and the date. One request to https://api.affiliate.com/v1/products/price-history gives you the price.                             |
| 3\. Check on a schedule | Once a day, request the history for each saved barcode and run the check above. Send the message when the price is under the saved price, and keep the time you last checked so the page can say how fresh it is. |

## Keeping a wishlist page current

Prices move daily during the holidays, so a wishlist that updates weekly will be wrong most of the time. The demo above is refreshed every week and shows the date it was last pulled, so readers can see how old the figures are. A page of your own can do the same: pull on a schedule, store the result and print the time beside it. [How often product pages should be updated](https://blog.affiliate.com/how-often-should-product-pages-be-updated-a-plain-english-guide-to-keeping-content-fresh/) discusses how often is often enough.

Gift lists also benefit from planning before the rush. [Planning holiday content with product data](https://blog.affiliate.com/planning-holiday-content-with-product-data-what-to-check-before-gift-guide-season/) lists what to check on a gift guide, and [comparing regular price with final price](https://blog.affiliate.com/compare-regular-price-vs-final-price-via-api/) shows how to test a discount claim against the list price. A wishlist joins the two: it keeps a record from the day a gift is saved, so a claim made later can be checked against it.

One API call 

One request per saved gift, one alert per drop

- ✓A daily price record for every store that sells a barcode
- ✓The lowest in-stock price, ready to compare with a saved price
- ✓Up to 90 days per call, and 365 days of history
[Get API access →](https://www.affiliate.com/contact?ref=blog.affiliate.com) 

Request

```
{
  "target_type": "barcode",
  "target_ids": [
    "195949688522"
  ],
  "currency": "USD",
  "include_series": true,
  "per_page": 25
}
```