Skip to main content
This tutorial installs @thelomadee/sdk from the public npm registry and verifies your authKey with a read-only call to sdk.terms.latest().
Your authKey is provided during Lomadee partner onboarding. If you do not have it yet, contact your Lomadee integration contact before continuing.

Before you begin

  • A server-side TypeScript or JavaScript project with ESM enabled ("type": "module" in package.json, or "module": "NodeNext" in tsconfig.json)
  • Your partner authKey, stored as LOMADEE_AUTH_KEY (or equivalent) in your environment

Step 1 — Install the SDK

The package is public on npm. No .npmrc or GitHub token is required.

Step 2 — Create a client

Create a small script (for example check-sdk.ts) in your backend project:
check-sdk.ts
environment is optional and defaults to 'production' when omitted. Use the environment and credentials provided during your Lomadee onboarding.
Run this script on the server or in a local backend context where LOMADEE_AUTH_KEY is set. Do not expose the key to client-side code or logs.

Step 3 — Run the script

Execute with your preferred TypeScript runner, for example:
If authentication and network access are configured correctly, the script prints the latest terms version and file URL. That confirms your authKey works end-to-end through the SDK.

What to explore next

You now have a working Lomadee instance. From here: For public affiliate network endpoints (brands, campaigns, channels), continue to the Affiliate API—that product uses x-api-key, not the SDK’s partner authKey.