Skip to main content

Live Example

Overview

Every product link belongs to a merchant host (e.g. nike.com). The merchants.list endpoint lets you browse all merchants enabled for your application - useful for building merchant-selection UIs, validating product links, or understanding your catalog coverage.

Prerequisites

import HenrySDK from '@henrylabs/sdk';

const henry = new HenrySDK({
	apiKey: process.env.HENRY_SDK_API_KEY!,
});

List merchants

Call merchants.list to retrieve all merchants available to your app.
const { data: merchants } = await henry.merchants.list({
	limit: 40,
});

for (const merchant of merchants) {
	console.log(merchant.name, merchant.host);
	// → "Nike" "nike.com"
}

Filter merchants

1

Filter by host

Look up a specific merchant by domain:
const { data } = await henry.merchants.list({
  host: 'nike.com',
});

const nike = data[0];
console.log(nike.name, nike.description);
console.log(nike.categories);   // ["fashion_and_accessories", "sports_and_outdoor"]
console.log(nike.website.urls); // [{ value: "https://nike.com", type: "landing" }]
console.log(nike.logo.urls);    // [{ value: "https://..." }]
2

Filter by name

Partial-match search on merchant display name:
const { data } = await henry.merchants.list({
  name: 'nike', // case-insensitive partial match
});
3

Filter by category

Find all merchants in one or more categories:
const { data } = await henry.merchants.list({
  categories: ['fashion_and_accessories', 'sports_and_outdoor'],
  limit: 100,
});

console.log(data.map(m => m.name));
// → ["Nike", "Adidas", "New Balance", ...]

Filter reference

ParameterTypeDefaultDescription
limitnumber20Results per page (1–100)
cursorstring-Pagination cursor from previous response
hoststring-Exact domain match (e.g. "nike.com")
namestring-Partial name match (e.g. "nike")
categoriesstring[]-Filter by one or more merchant categories

Available categories

automotive, baby_and_kids, ecommerce, electronics_and_gadgets, fashion_and_accessories, finance, food, health_and_beauty, home_and_living, lifestyle_and_entertainment, other, sports_and_outdoor, travel, education

Error handling

ErrorCause
401 UnauthorizedInvalid API key
400 Bad RequestInvalid limit or malformed categories
Empty data arrayNo merchants match the filters

Next steps

Product Discovery

Search products from a specific merchant using the merchant filter

Universal Cart

Add product links from supported merchants to a cart