Skip to content

service_jtl — Overview

Inbound / JTL integration service. Responsible for integrating with JTL API, Plenty, and Google Sheets to create inbounds, check stock, run bundle cleanups, and provide credential management and cron scheduling.

Directories:

  • endpoints/ — Per-router reference pages for API endpoints (google, jtl, plenty, sheets).
  • services/ — Internal implementation docs (JTL manager, Plenty manager, Google OAuth helpers, Sheets manager, Cron job manager).

Contents

Endpoint reference

Service implementation docs

Primary API prefix: /api/v1/jtl

Important notes:

  • Authentication: JWT auth middleware protects most endpoints; PUBLIC_ENDPOINTS (including OAuth callbacks and /ws) are exempted.
  • Cron scheduler: CronJobManager persists cron definitions and restores them on startup using APScheduler (Berlin timezone).
  • WebSocket: a /ws endpoint exists for live notifications and callbacks.
  • Rate limiting: a simple in-process RateLimiter is used (configurable). For production scale, replace with a distributed rate limiter.