Skip to main content
A TypeScript SDK for interacting with the Enad API.
Provides a clean, type-safe interface with all responses standardized to [data, error].

Installation

Usage examples

  1. Fetch a single product by SKU
  1. Fetch multiple products by SKUs
  1. Get category by slug

Clients

There is clients available:
  • ShopperClient: Deprecated. We will not add new features to the Shopper API; only bug fixes and security fixes will be made. Use https://graphql.enad.io instead. See Product search.
  • CustomerClient: For customer specific operations like getting user details, whishlist etc.

Modules

ShopperClient

The SDK is organized into modules that group related functionality. Each module exposes methods for interacting with specific parts of the Enad API.
  • products: Methods for fetching and searching products.
  • brands: Methods for fetching brand information.
  • categories: Methods for fetching product categories.
  • collections: Methods for fetching product collections.
  • facets: Methods for working with product facets.
  • redirects: Methods for handling URL redirects.
  • series: Methods for fetching product series.
  • tags: Methods for fetching product tags.
  • variants: Methods for fetching product variants.

CustomerClient

  • user: Methods for retrieving and managing user information.

Response Format

All SDK methods return a standardized tuple-style response, making it simple and predictable to handle results:
This design allows for easy destructuring and explicit naming, for example:
Because of the response contract:
  • data is guaranteed to be defined if error is null.
  • error is guaranteed to be defined if data is null.
This means you can safely use one or the other without additional null checks, and you don’t need try/catch blocks for simple error handling.