CD CargoDash Hub
API operational

Wallet & billing infrastructure for logistics services

CargoDash Hub is the control plane behind CargoDash products. It handles organisations and users, prepaid wallets, server-side priced metering, recharge payments, and per-customer service entitlements — exposed as one authenticated REST API.

Base URL https://hub-api.cargodash.in/api/v1 Copy

Capabilities

What the Hub does

Every endpoint is scoped to the caller's organisation, derived from the bearer token — there is no tenant parameter to send, and none is accepted.

◈

Prepaid wallets

Each customer holds a balance in a single currency. Every movement is written as an immutable transaction with the resulting balance and a status.

⊞

Metered billing

Partners report what was consumed and how much of it. Pricing is resolved server-side from the catalogue and the customer's negotiated rate — never sent by the caller.

⇄

Recharge & refunds

Razorpay-backed order creation and signature verification for top-ups, plus refunds that reference and are capped by the original charge.

◎

Service entitlements

Services and sub-services are assigned per customer with their own rates and status, so access and pricing are controlled centrally.

⚿

Role-based access

JWT authentication with three roles — Super Admin, Customer Admin and Customer User — enforced per route, alongside rate limits on sensitive endpoints.

▤

Dashboards & exports

Revenue trends, usage per customer and admin overviews, with transaction logs available as a downloadable export.

Quick start

Integrate in three calls

The partner flow: authenticate once, check the balance, then report usage.

1

Authenticate

Exchange your credentials for a bearer token. The token is valid for 10 days — store it and reuse it rather than logging in before each request. On 401, log in again and retry.

POST /api/v1/login
Content-Type: application/json

{ "username": "YOUR_USERNAME", "password": "YOUR_PASSWORD" }

→ 200  { "success": true, "token": "eyJhbGciOi...", "expiresIn": 864000 }
2

Check the balance

Takes no parameters — the wallet is resolved from your token, so one partner cannot address another's balance. Rate limited to 60 requests per minute per credential.

GET /api/v1/accounts/balance
Authorization: Bearer YOUR_TOKEN

→ 200  { "balance": "1250.00", "currency": "INR", "status": "Active" }
3

Report usage

State what was consumed, how much, and in which direction. Send your own client_reference so the call is idempotent and can be looked up later.

POST /api/v1/accounts/adjust-balance
Authorization: Bearer YOUR_TOKEN

{
  "client_reference": "ORDER-8891",
  "sub_service_id":   "12",
  "quantity":         5,
  "transaction_type": "Debit",
  "description":      "AWB lookup"
}

→ 201  { "transaction_id": "TXN228083272651", "balance_after": "70.00" }
Pricing is server-side. An amount field is rejected with a 400 — the price comes from the catalogue and your agreed rate. A Credit is a refund, so it must carry the parent_transaction_id of the charge it reverses.

Reference

Partner endpoints

The partner-facing surface. Administration, customer management and service catalogue endpoints are covered in the full documentation.

Method Path Purpose
POST /login Obtain a bearer token
GET /accounts/balance Current wallet balance and status
GET /accounts/transactions Transaction history, newest first, paginated and filterable
POST /accounts/adjust-balance Debit for usage, or credit a refund
POST /accounts/balance-and-rate Balance together with your rate for a sub-service
POST /create-order Start a wallet recharge
POST /verify-payment Confirm a recharge and credit the wallet

Conventions

What to expect

Consistent across every endpoint.

JSON throughout

Requests and responses are JSON (UTF-8). Successful responses carry success, message and data.

Bearer authentication

Send Authorization: Bearer <token>. A 401 means the token is missing, invalid or expired.

Validated input

Bad dates, out-of-range pagination or unknown categories return 400 with the field that failed — never a silent correction.

Rate limits

Polling endpoints are limited per credential, not per IP, so a shared egress address cannot exhaust another partner's quota. Excess returns 429.