Gift Registry API: Build a Registry From Real Products

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.

Affiliate.com Gift Registry API: Build a Registry From Real Products graphic

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 registryWho keeps itExamples
The list and its ownersYour applicationRegistry name, owner, event date, privacy, the items on it.
Purchase statusYour applicationWhich guest marked an item as bought, and the quantity still wanted.
What a product isAffiliate.comName, brand, picture and barcode.
Where it is soldAffiliate.comEvery store that sells the barcode, with a link to its product page.
Price and stockAffiliate.comToday’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.

WhenRequestWhy
A person looks for a product to addPOST /v1/products with a name searchReturns matching products with their barcodes, so the person can choose the right one.
An item is addedNothing to fetchSave the barcode. It identifies the product in every store, so it is the key for the item.
The registry is shownPOST /v1/products/price-history for each barcodeReturns every store with price, stock and range, which is the whole row.
A guest follows an itemUse the store link from that responseThe guest goes to a store that has the item in stock, at the price you showed.
A link or barcode needs checkingPOST /v1/tools/convert/url-to-barcodeTurns 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 covers the identifiers, and MCP or REST covers the two ways of connecting.

What to store, and what to fetch

Store in your databaseFetch when the registry is shown
The barcodeThe product name, brand and picture
The quantity wanted and any noteEvery store that sells it
Who added it and whenToday’s price, regular price and discount in each store
Whether a guest has marked it as boughtWhether 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 goes through the cases, and comparing regular price and final price 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.

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.

ProductStoresIn stockCheapest in stockHighest in stockGap
Le Creuset Signature round Dutch oven54$419.95$420.000%
Instant Pot Duo Crisp multi-cooker55$197.99$219.9911%
Lodge 8-inch cast iron skillet1211$17.90$17.991%
Shark Rocket stick vacuum1211$199.99$199.990%
YETI Rambler 30 oz tumbler76$40.00$40.000%
KitchenAid Artisan Plus stand mixer55$599.95$599.990%

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

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

Getting started in three steps

StepWhat to do
1. Get a keyRequest 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 barcodeWhen someone adds an item, store its barcode and your own fields. Do not store the price.
3. Fetch when you show itMake 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 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 →
Request
{
  "target_type": "barcode",
  "target_ids": [
    "75536300504"
  ],
  "currency": "USD",
  "include_series": false,
  "include_stats": true,
  "include_product": true,
  "per_page": 25
}