< Back to What I Built
CARGOS SDK
Visit Site →

CARGOS SDK

An open-source TypeScript SDK for reporting car-rental contracts to the Italian State Police CARGOS service — typed, validated, and ready for batch submissions.

A typed client for CARGOS

Italian car-rental companies are required to report rental contracts to the Polizia di Stato through CARGOS. The official service has a strict, security-sensitive API surface; this SDK wraps it in a practical TypeScript client that fits into modern rental software.

Safer contract submissions

The package models drivers, vehicles, agencies, and contracts with strong types, then validates the data before it reaches the API. Token refresh, AES-256-CBC encryption, and structured error handling are managed inside the client.

Built for real workloads

Large submissions are automatically split into CARGOS-compatible batches. The SDK also bundles official coding tables with offline lookup helpers, while still allowing fresh tables to be downloaded at runtime.

Open source and installable

Published on npm as cargos-sdk and released under the MIT license. Install it with pnpm add cargos-sdk.