> ## 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.

# Gift Registry API: Build a Registry From Real Products
- URL: https://blog.affiliate.com/gift-registry-api/
- Published: 2026-11-13T22:01:06.000Z
- Updated: 2026-11-13T22:01:06.000Z
- Description: A registry is a list your app keeps. The products, prices and stock behind it come from an API. This guide shows what to store, what to fetch and how to keep a registry accurate, with a demo that builds one from real products.
- Author: Dylan Bertalli

A gift registry is a list of products that other people buy from. The list is yours to build, but everything on it comes from somewhere else: what the product is, what it costs, where it is sold and whether it is available today. A gift registry API is the part that answers those questions. It is also what many teams mean by a product list API, a way to attach real product data to a list your application keeps. This guide explains which parts of a registry the API handles, what to store and what to fetch, and lets you build a registry from real products. The demo below uses prices last pulled November 13, 2026.

## What a gift registry API does, and what it does not

It helps to be exact about the split, because it decides what you build. The API does not hold registries. It does not know who the list belongs to, who has bought what or which guests have seen it. Your application keeps all of that. What the API supplies is the product side: it finds products, identifies them, and reports the price and stock in every store that sells them.

| Part of a registry      | Who keeps it     | Examples                                                                            |
| ----------------------- | ---------------- | ----------------------------------------------------------------------------------- |
| The list and its owners | Your application | Registry name, owner, event date, privacy, the items on it.                         |
| Purchase status         | Your application | Which guest marked an item as bought, and the quantity still wanted.                |
| What a product is       | Affiliate.com    | Name, brand, picture and barcode.                                                   |
| Where it is sold        | Affiliate.com    | Every store that sells the barcode, with a link to its product page.                |
| Price and stock         | Affiliate.com    | Today’s price, regular price and availability in each store, with the recent range. |

That split is also why the data should stay out of your registry table. A price saved when someone added an item is out of date by the time a guest opens the list. The reliable pattern is to store the barcode and fetch the rest when the registry is shown.

## Build a registry from real products

The demo below is a small registry. Add products and each one shows the store with the lowest in-stock price, how many stores carry it and how far apart the in-stock prices are. Every figure comes from one real Price History API response for that product’s barcode. The page holds a rotating set of products that is rebuilt every night, and it offers four of them, a different four on most visits.

Notice what the registry row is made of. The product name and picture, the store, the price and the stock were all fetched. The only thing your database would hold for this row is the barcode, which is enough to ask the question again tomorrow.

## The requests a registry makes

A working registry needs only a few kinds of request, and one of them does most of the work.

| When                                | Request                                          | Why                                                                                        |
| ----------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| A person looks for a product to add | POST /v1/products with a name search             | Returns matching products with their barcodes, so the person can choose the right one.     |
| An item is added                    | Nothing to fetch                                 | Save the barcode. It identifies the product in every store, so it is the key for the item. |
| The registry is shown               | POST /v1/products/price-history for each barcode | Returns every store with price, stock and range, which is the whole row.                   |
| A guest follows an item             | Use the store link from that response            | The guest goes to a store that has the item in stock, at the price you showed.             |
| A link or barcode needs checking    | POST /v1/tools/convert/url-to-barcode            | Turns a pasted store link into the barcode, so a person can add an item from any store.    |

The same request works as an MCP tool, which matters if the registry sits behind an assistant that answers questions such as where a gift is cheapest. Our guide to [barcode search](https://blog.affiliate.com/barcode-search-sku-mpn-id-and-barcode/) covers the identifiers, and [MCP or REST](https://blog.affiliate.com/mcp-or-rest-api-connecting-your-ai-agent-to-affiliate-com-product-data/) covers the two ways of connecting.

## What to store, and what to fetch

| Store in your database                  | Fetch when the registry is shown                        |
| --------------------------------------- | ------------------------------------------------------- |
| The barcode                             | The product name, brand and picture                     |
| The quantity wanted and any note        | Every store that sells it                               |
| Who added it and when                   | Today’s price, regular price and discount in each store |
| Whether a guest has marked it as bought | Whether each store has it in stock                      |

Two habits follow. Keep the time you fetched a price and show it, so a reader knows how fresh it is. And do not store a price as a fact about the item. A short cache is fine, since the data behind the response changes over hours and not seconds, but the registry should always be able to ask again.

## Handling sold-out items and price changes

A registry lives for months, and items change while it does. A product goes out of stock at one store and stays available at another, a price drops during a sale, a store stops listing it. If the registry remembers only one store, each of these becomes a dead end for a guest. Because the response lists every store, a registry can pick the best one that has the item in stock at the moment it is shown, and say so when the first choice has run out.

Our guide on [handling out-of-stock and price-changed offers](https://blog.affiliate.com/how-shopping-agents-should-handle-out-of-stock-and-price-changed-offers/) goes through the cases, and [comparing regular price and final price](https://blog.affiliate.com/compare-regular-price-vs-final-price-via-api/) explains how to show a discount that is real. Registries that also let people save items privately can build on the ideas in [the Wishlist API guide](https://blog.affiliate.com/wishlist-api/).

## What the November 13, 2026 pull shows

Sorting out which store to send a guest to only matters if the stores differ, so we looked. On November 13, 2026 we pulled every store that sells each of the six products in that day’s set. One of the six products with two or more stores in stock had a gap of at least ten percent between the cheapest and the most expensive store. Four of the six products had at least one store that did not have them in stock. For those items a registry that remembered a single store could have sent a guest to the wrong place.

Added together at each product’s lowest in-stock price, the set cost $1475.78\. At each product’s highest in-stock price the same set cost $1497.96\. The difference is what choosing the store is worth to a guest on that day.

| Product                               | Stores | In stock | Cheapest in stock | Highest in stock | Gap |
| ------------------------------------- | ------ | -------- | ----------------- | ---------------- | --- |
| Le Creuset Signature round Dutch oven | 5      | 4        | $419.95           | $420.00          | 0%  |
| Instant Pot Duo Crisp multi-cooker    | 5      | 5        | $197.99           | $219.99          | 11% |
| Lodge 8-inch cast iron skillet        | 12     | 11       | $17.90            | $17.99           | 1%  |
| Shark Rocket stick vacuum             | 12     | 11       | $199.99           | $199.99          | 0%  |
| YETI Rambler 30 oz tumbler            | 7      | 6        | $40.00            | $40.00           | 0%  |
| KitchenAid Artisan Plus stand mixer   | 5      | 5        | $599.95           | $599.99          | 0%  |

This table is fixed to November 13, 2026\. The demo above is rebuilt every night from a rotating set of products, so its figures will change. Treat the table as a record of one day. A handful of products is a small sample and not a measure of any market. Each figure is a store’s current price in US dollars, and the gap is the difference between the cheapest and the most expensive in-stock store, as a percentage of the cheapest.

## Terms

| Term                  | What it means here                                                                                        |
| --------------------- | --------------------------------------------------------------------------------------------------------- |
| Registry              | A list of products that a person or couple wants, which other people can buy from.                        |
| Product list API      | An API that attaches product data to a list your application keeps. It does not store the list.           |
| Barcode               | A product’s UPC, EAN or GTIN. It identifies the product itself, whichever store sells it.                 |
| In stock              | The store reports the product as available today. A store can be out of stock and still list the product. |
| Lowest in-stock price | The cheapest price among the stores that have the product in stock now.                                   |

## Getting started in three steps

| Step                       | What to do                                                                                                                                                                                                                                                                                                                                                          |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1\. Get a key              | Request an API key from Affiliate.com. REST requests send it as a Bearer token in the Authorization header, and an MCP client uses the same key.                                                                                                                                                                                                                    |
| 2\. Save the barcode       | When someone adds an item, store its barcode and your own fields. Do not store the price.                                                                                                                                                                                                                                                                           |
| 3\. Fetch when you show it | Make one price history request per item when the registry is displayed. Pick the cheapest in-stock store, show the price and its time, and fall back to the next store if the first one runs out. [How often to refresh](https://blog.affiliate.com/how-often-should-product-pages-be-updated-a-plain-english-guide-to-keeping-content-fresh/) covers the schedule. |

One API call 

Real products for your registry

- ✓Every store that sells an item, in one request
- ✓Today’s price and stock, with the recent range
- ✓The same data as an MCP tool or a REST request
[Get API access →](https://www.affiliate.com/contact?ref=blog.affiliate.com) 

Request

```
{
  "target_type": "barcode",
  "target_ids": [
    "75536300504"
  ],
  "currency": "USD",
  "include_series": false,
  "include_stats": true,
  "include_product": true,
  "per_page": 25
}
```