TypeScript SDK
@simplohq/sdk — Simplo's official TypeScript SDK, not yet published. Today, integrate directly against the REST API using the OpenAPI contract.
Once published, Simplo’s official SDK will be open source (MIT license), at
github.com/SimploHQ/simplo-node-sdk, as the @simplohq/sdk package. SDKs
are meant as official complements to the REST API, never the only path:
the OpenAPI contract is the source of
truth and the SDKs wrap it. .NET and Java SDKs are on the roadmap, generated
from the same contract — in the meantime, any language can integrate
directly against the API or with a client generated from the spec.
Features (planned for launch)
Section titled “Features (planned for launch)”- Zero runtime dependencies — global
fetch, runs on Node ≥ 18.17, Deno, Bun and Cloudflare Workers. - Typed DTEs — the SII’s 12 document types and the full status lifecycle as strict TypeScript unions; request/response types mirror the API’s format.
- Auto-idempotency —
dtes.emitgenerates anIdempotency-Keyper call, so a retried emission can never create a duplicate invoice. - Auto-retries — 429/5xx/network failures are retried with exponential
backoff, jitter and
Retry-Aftersupport; non-idempotent requests are never blindly retried. - Auto-pagination —
for awaitover any listing walks every page for you. - Webhook verification — implements the Standard Webhooks signature contract (HMAC-SHA256, constant-time comparison, timestamp tolerance) that webhook delivery will carry once it goes live.
- Agent-ready docs —
AGENTS.md,llms.txtand markdown-only docs in the repo, designed to be read by coding agents.
Usage tour (planned — not functional yet)
Section titled “Usage tour (planned — not functional yet)”// Follow a document to its SII verdictconst current = await simplo.dtes.retrieve(dte.id);current.estado; // 'procesando' | 'aceptado' | 'rechazado' | ...current.tracking?.track_id; // SII tracking ID
// Downloadsconst pdf = await simplo.dtes.pdf(dte.id, { cedible: true }); // ArrayBufferconst xml = await simplo.dtes.xml(dte.id); // signed XML
// Auto-paginationfor await (const doc of await simplo.dtes.list({ estado: 'aceptado' })) { console.log(doc.folio, doc.monto_total);}
// Folios (CAF) and certificateawait simplo.folios.upload({ tipo_dte: 33, caf_xml });await simplo.company.certificate.status(); // { has_certificado, fecha_vencimiento, ... }
// Webhooksconst hook = await simplo.webhooks.create({ url: 'https://tu-app.example/webhooks/simplo', events: ['dte.accepted', 'dte.rejected'],});const event = await simplo.webhooks.verify(rawBody, headers, hook.secret!);Errors are typed by status (ValidationError, RateLimitError, …) with
code, requestId and field-level details — see
Errors.
Examples (repo still private)
Section titled “Examples (repo still private)”Once the repo goes public, it will ship runnable examples:
examples/express— minimal Express endpoint that emits an invoice and returns the PDF.examples/nextjs— Next.js App Router route handler.
Today, the curl equivalent is in the Quickstart.
Requirements (once published)
Section titled “Requirements (once published)”- Node.js ≥ 18.17 (or Deno / Bun / edge runtimes with global
fetch) - TypeScript ≥ 5.0 if you consume the types (optional — plain JS works)
- A Simplo account with its API key (self-serve sandbox — see Quickstart)
Integrate today, without waiting on the SDK
Section titled “Integrate today, without waiting on the SDK”- Quickstart — your first emission via curl (or your language’s HTTP client) against the REST API
- For coding agents — the integration playbook, REST-first
- OpenAPI contract — generate a client in your language from the spec