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_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); // ["apparel", "footwear"]
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: ['footwear', 'apparel'],
  limit: 100,
});

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

Filter reference

ParameterTypeDefaultDescription
limitnumber40Results 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

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