SDK overview
The Cargo SDKs are thin, typed clients for the public API. They are generated from the same OpenAPI contract as the API Reference, so a method always maps to one endpoint.
| Language | Package | Requires |
|---|---|---|
| TypeScript | @rappi_cargo/cargo-core-api-sdk | Node.js 22+ |
| Python | cargo-core-api-sdk | Python 3.10+ |
What you get
- Typed requests and responses. Autocomplete and compile-time checks on every field.
- One error model. Every non-2xx response becomes a
CargoApiErrorwith the HTTP status and Cargo's machine-readablecode; network failures becomeCargoNetworkError. - Environments built in. Pick a country with one option instead of managing base URLs.
- Sensible defaults. 15 second timeout,
user-tokenheader handled for you. - Same shape in every language. Same clients, same method names (snake_case in Python).
Same call, both languages
- TypeScript
- Python
import { CargoClient } from "@rappi_cargo/cargo-core-api-sdk";
const client = new CargoClient({ apiKey: process.env.CARGO_API_KEY!, environment: "dev" });
const groups = await client.authorization.listPermissionGroups();
import os
from cargo_core_api_sdk import CargoClient
client = CargoClient(api_key=os.environ["CARGO_API_KEY"], environment="dev")
groups = client.authorization.list_permission_groups()
Clients
Both SDKs expose five clients on the root object:
| Client (TypeScript / Python) | Covers |
|---|---|
orderV3 / order_v3 | Validate, create, track, ready and cancel orders |
pickingPoints / picking_points | Stores, nearby search, checkin codes |
users | Users of your account |
authorization | Permission groups (roles) |
rt | Cash-order returns |
Versioning
The SDKs follow semantic versioning and are versioned independently of
each other and of the API. While they are on 0.x, a breaking change bumps the minor
version and an additive change bumps the patch version. From 1.0.0, breaking changes bump
the major version. Pin a version in your lockfile and read the changelog before upgrading.
Not covered by an SDK?
The API is plain HTTPS and JSON. Anything an SDK does, you can do with any HTTP client. See the API Reference.