Loading...

Add your products

The finished storefront runs on an ordinary product catalogue — 37 records, one per product. First step: get yours into a list.

One record per product

Each product is a record named by its title — the name is what search-as-you-type completes, so give it the words a shopper would type, not an internal code (keep the SKU as its own field). Around it go the fields a shop needs: a description to search, a brand, category, colour, price, rating and in-stock flag to filter on (next step), and an image and buy link just for display. No embedding model is needed for this lesson — filters and counts don't use one.

Sign in to the console, choose Create List and name it products, then use the list's Import button to upload your catalogue as a JSON, NDJSON or CSV file — the fields are created from your data. Here's the finished example's list:

The products list in the console: one record per product with title, description, brand, category, colour, price, rating, in-stock, image and buy-link fields

Or load it from code — the same import is one request:

POST https://api.searchstack.dev/search-result/Demo/products/with-fields
X-API-Key: {your key}
Content-Type: application/json

[
  {
    "name": "Apex Velocity Road Running Shoe", "sku": "sku-1002",
    "description": "Responsive foam cushioning for daily runs.",
    "brand": "Apex", "category": "Footwear", "color": "Blue",
    "price": 129.0, "rating": 4.5, "in_stock": true,
    "image_url": "https://…", "buy_url": "https://…"
  }
]

Go deeper: Lists, importing records, and field roles in the reference.

Top