Skip to main content
The Lomadee SDK (@thelomadee/sdk) is a TypeScript, ESM-only client for partner integrations. It lets your backend call Lomadee microservices with the credentials you receive during onboarding—without hand-rolling HTTP clients, auth headers, or per-service configuration.
The SDK carries your authKey. Use it only on the server (API routes, workers, backend services). Never bundle it into browser or mobile client code.

Who this is for

This documentation is written for external developers and integration partners building server-side automation against Lomadee partner services. Your Lomadee contact provisions an authKey scoped to your integration. Install @thelomadee/sdk from the public npm registry—no GitHub token is required. If you are building against the public affiliate network REST API (brands, campaigns, channels, public orders), use the Affiliate API instead. That API authenticates with x-api-key. The SDK authenticates with your partner authKey, sent as the partner x-auth-key header on every request.

What you get

One Lomadee instance exposes resource clients for the domains you integrate with. Request and response types are exported where the SDK defines them; some clients (notably transactions) return Promise<unknown> for certain methods—see each reference page. Each client maps to SDK methods and TypeScript types. Domain data shapes (request bodies, enums, response models) are importable from @thelomadee/sdk/domains when you need them outside a method call. The SDK ships as pure ESM ("type": "module"). Import it with standard import syntax in TypeScript or JavaScript projects configured for ESM.

How it fits your stack

You do not configure service URLs yourself—the SDK selects the correct hosts for production (default) or staging. All requests share one authenticated HTTP client with a 10 second timeout. There is no built-in retry, custom base URL option, or public interceptor API.

Next steps

Quickstart

Install from npm, configure your authKey, and call sdk.terms.latest() from your backend

Environments and secrets

Choose staging or production and store authKey safely in environment variables

How the SDK works

Understand the client layout, shared auth, and how resource clients map to services

Client reference

Configuration types, constructor options, and the root Lomadee class