API
JSON over HTTP from this PC (or the LAN when started with --lan). Rates are percentages (15 = 15%); money is INR with 2 decimals unless a currency is named.
Authentication
Send an API key issued in Admin → API keys: Authorization: Bearer exk_… or X-API-Key: exk_…. Keys are stored as SHA-256 hashes, can carry a monthly call limit and can be revoked.
Calls from this PC can be allowed without a key (Admin → Settings).
Endpoints
| Method | Path | Counts | Purpose |
|---|---|---|---|
| GET | /api/v1/search?q= | free | HSN by code prefix or words (25 results). Add &scope=export to include RoDTEP schedule lines. |
| GET | /api/v1/hsn/<8-digit> | 1 | Rates, preferential rates per agreement, policies, data-quality flag, anti-dumping warning |
| POST | /api/v1/calculate | 1 | Import duty stack and landed cost with the best FTA rate and an origin comparison |
| POST | /api/v1/calculate/batch | 1 per line | Up to 20 import lines: {"items": [ … ]} |
| POST | /api/v1/export/calculate | 1 | FOB, Drawback, RoDTEP, RoSCTL, IGST and realisation deadline for an export line |
| GET | /api/v1/fx?currency=&kind=&date= | free | CBIC customs exchange rate in force (kind = Import / Export) |
| GET | /api/v1/meta | free | Agreements, countries, data date |
| GET | /api/v1/usage | free | This key's calls per month |
Import calculation
POST /api/v1/calculate
{"hsn": "85171300", "country": "JPN", "goodsValue": 100000, "freight": 5000, "insurance": 1000,
"otherCharges": 500, "currency": "INR", "date": "2026-11-30"}
→ valuation.assessable_value 106500 · applied.landed_cost 125670 · mfn.landed_cost 146405.55 · pref_saving 20735.55
optional: exchangeRate, landing (1%), freightUnknown (20% of FOB), insuranceUnknown (1.125%)
Export calculation
POST /api/v1/export/calculate
{"hsn": "61091000", "destination": "ARE", "invoiceValue": 2200, "currency": "USD", "exchangeRate": 80,
"incoterm": "CIF", "freight": 150, "insurance": 50, "qty": 100, "unit": "NOS", "serialNo": "610901",
"exportType": "LUT"}
→ valuation.fob_inr 160000 · schemes.drawback.amount 1200 · schemes.rosctl.amount 4580 · total_incentives 5780
candidates lists schedule entries to choose from when the heading has several and no serialNo is sent.
optional: claimDrawback / claimRodtep / claimRosctl (default true), exportType LUT | IGST | FOC, date
Errors
Errors return {"error": {"code", "message"}}.
| 400 | invalid_hsn, missing_goods_value, missing_invoice_value, invalid_charge, invalid_incoterm, unknown_origin, unknown_destination, no_exchange_rate, invalid_batch, invalid_query |
| 401 | missing_api_key, invalid_api_key |
| 403 | key_disabled |
| 404 | hsn_not_found |
| 429 | quota_exceeded |
Limits
Batch: 20 lines. Search: 2-80 characters, 25 results. Monthly limits per key are set by the administrator.
Indicative calculations only - not legal or customs advice. Verify every rate on ICEGATE / the CBIC tariff before filing a Bill of Entry or Shipping Bill. Anti-dumping, safeguard and countervailing duties, TRQs and valuation adjustments are not included.