One entry class, many resources
Import a single class from the package root:list, get, create, update, delete where supported). Detailed method signatures live in the per-domain reference pages: Transactions, Commissions, Affiliates, Contents, and Terms.
Shared HTTP client
When you constructLomadee, the SDK:
- Resolves
environmentto'production'unless you pass'staging' - Creates one Axios instance with your
authKeyon thex-auth-keyheader - Applies a fixed 10 second request timeout to that instance
- Wires resource clients to the appropriate Lomadee services for the selected environment
- Override base URLs or per-service hosts
- Attach Axios interceptors through the SDK
- Change the timeout on the shared client
- Enable automatic retries inside the SDK
Authentication model
Partner integrations authenticate with theauthKey issued during onboarding. The SDK sends it on every request as x-auth-key.
This is separate from the Affiliate API, which is a public REST product for the affiliate network and uses x-api-key. The two credentials are not interchangeable, and the SDK is not a wrapper around the Affiliate API OpenAPI surface.
TypeScript modules and domain types
The package is ESM-only. Useimport syntax and ensure your bundler or runtime resolves "type": "module" (or TypeScript moduleResolution: "NodeNext").
Exports are split intentionally:
Advanced resource implementation classes (uncommon—prefer
new Lomadee(...) on the root import):
Import domain types when typing variables, validators, or mappers in your code:
Resource overview
The table below describes what each client is for, not internal routing details. Use the linked reference pages for method-level documentation.
Discover resources progressively: start with Quickstart and
terms.latest(), then open the reference page for the domain you integrate next.
Errors and responses
Failed HTTP calls reject with Axios errors unchanged. The SDK does not normalize status codes or response bodies into a partner-facing error catalog. Return typing varies by resource: some methods useSdkResponse<T> or concrete domain types; transactions list/get/create/update return Promise<unknown> in the current SDK—see the Transactions reference.
Plan application-level handling early (Error handling) rather than expecting the SDK to classify failures for you.
Mental model vs. the Affiliate API
Choose one product per integration path. Mixing credentials or documentation across the two leads to auth failures and incorrect endpoint assumptions.
Continue learning
Quickstart
Install the package and verify connectivity
Environments and secrets
Configure staging, production, and secret storage
Transactions
Order operations reference
Terms
Terms and acceptances reference