Open-source SDKs and tooling for Turkish e-commerce marketplaces.
Type-safe TypeScript SDKs, curated OpenAPI specs, and integration utilities for Trendyol, Hepsiburada, n11, Amazon TR, Pazarama, Çiçeksepeti, and more.
Important
Unofficial & independent. Lonca is a community-maintained project. It is not an official SDK and is not affiliated with, endorsed by, or supported by Trendyol, Hepsiburada, or any other marketplace named here. All product names, logos, and trademarks are the property of their respective owners.
Warning
🚧 Alpha — APIs are not stable. Do not use in production. Minor versions may contain breaking changes until 1.0.0.
Three-stage roadmap:
- SDK + OpenAPI Spec Collection — Type-safe TypeScript SDKs and curated OpenAPI specs for Turkish marketplaces (current stage)
- API Drift Detection — A monitoring layer that proactively detects breaking changes in marketplace APIs
- Unified Marketplace API Gateway — A Plaid-style abstraction that puts every marketplace behind a single API
Turkish e-commerce marketplace APIs are fragmented, under-documented, and constantly shifting. Every e-commerce developer ends up rewriting the same integration code from scratch. Existing solutions are either closed-source vendor-locked (IdeaSoft, T-Soft) or simply don't support Turkish marketplaces (Zapier, Make, n8n).
Lonca aims to fill this gap with a community-maintained open standard.
📚 Docs & API reference: loncadev.github.io/lonca — guides, end-to-end flows, and full TypeDoc API reference. Built with Astro Starlight, regenerated on each push to main.
Need an SDK for another marketplace? Open a marketplace request.
pnpm add @lonca/trendyol @lonca/coreimport { createTrendyolClient } from '@lonca/trendyol';
import { paginate } from '@lonca/core';
const client = createTrendyolClient({
sellerId: 12345,
apiKey: process.env.TRENDYOL_API_KEY!,
apiSecret: process.env.TRENDYOL_API_SECRET!,
env: 'prod', // or 'stage'
});
// Iterate every product page-by-page.
for await (const product of paginate((p) => client.products.list(p))) {
for (const variant of product.variants) {
console.log(variant.barcode, product.title);
}
}See sdks/trendyol/README.md for the full surface (brands · categories · suppliers · products read+write+lifecycle · inventory · orders read+write+split+cargo+ops+returns · claims · webhooks + parseWebhookEvent · questions · invoices · finance · labels · testOrders · locations) and end-to-end walkthroughs for product creation, webhook handling, returns/claims, and settlement reconciliation.
pnpm add @lonca/coreimport { money, paginate, retry, RateLimitError, TokenBucketRateLimiter } from '@lonca/core';
const price = money(12550, 'TRY'); // 125.50 TRY (integer minor units)
const limiter = new TokenBucketRateLimiter({ capacity: 50, intervalMs: 60_000 });
await retry(
async () => {
await limiter.acquire();
// ...call a marketplace API
},
{ maxAttempts: 5 },
);See packages/core/README.md for the full surface.
Requirements:
- Node.js >= 22 (active LTS) — pinned to
24via.nvmrc - pnpm >= 10 (Corepack recommended)
git clone https://github.com/loncadev/lonca.git
cd lonca
pnpm installCommon commands:
pnpm typecheck # TypeScript
pnpm lint # ESLint
pnpm format # Prettier (write)
pnpm test # Vitest
pnpm build # Build all packages via Turborepo
pnpm dev # Parallel watch across packagesWork on a single package:
pnpm --filter @lonca/core testPull requests are welcome. Start with CONTRIBUTING.md and our Code of Conduct. For larger changes, open a Discussion first.
Do not file public issues for security vulnerabilities. Follow the disclosure process in SECURITY.md.
MIT — see LICENSE.