Kramank Reference Data API (Product A) (0.1.0)

Download OpenAPI specification:

License: Proprietary

Kramank (क्रमांक, "serial number") India reference-data lookups served by the shared gateway: IFSC, pincode, GSTIN, PAN, and HSN/SAC. The kramank.dev domain is planned but not yet purchased — see the server URL below for where this API actually lives today.

GSTIN and PAN endpoints perform FORMAT validation only. A valid: true result means the input matches the published GSTIN/PAN structure and (for GSTIN) checksum rules — it does not confirm the GSTIN or PAN is real, active, or currently registered with any government system.

Every endpoint below except /v1/health requires an API key, sent via either the Authorization: Bearer <key> header or the X-API-Key header. All errors use the shape documented under ApiError.

Health check

Public liveness check. Does not require an API key and is not metered.

Responses

Response samples

Content type
application/json
{
  • "version": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Look up an IFSC's bank, branch, address, MICR, and payment-network flags

Unlike the GSTIN/PAN endpoints, this is a reference-data lookup backed by an imported dataset (see scripts/import-ifsc.ts), so a malformed input and a well-formed-but-unknown input are distinct failure modes with distinct status codes.

Authorizations:
BearerAuthApiKeyHeader
path Parameters
code
required
string

The IFSC to look up, e.g. HDFC0001234.

Responses

Response samples

Content type
application/json
{
  • "ifsc": "string",
  • "bank": "string",
  • "branch": "string",
  • "address": "string",
  • "micr": "string",
  • "upi": true,
  • "neft": true,
  • "rtgs": true,
  • "imps": true
}

Look up a pincode's post offices, each with its own district and state

Beta — data is from a community mirror, not the official current data.gov.in export, which is unreachable at present (see docs/PROJECT-PLAN.md decisions log). The mirror claims a 2019 vintage, but its GitHub repo's last commit is 2017-01-31, so the data is no better evidenced than January 2017 — every response's dataAsOf field reports that evidenced date. District names may predate district reorganizations since then — for example, Andhra Pradesh's 2022 district reorganization split/renamed several districts that this dataset still reports under their pre-2022 names. The official source is retried monthly; the importer's SOURCE_COLUMNS mapping is designed so swapping to it needs no schema or endpoint change.

Like /v1/ifsc/{code}, this is a reference-data lookup backed by an imported dataset (see scripts/import-pincode.ts), not a pure format validator — a malformed input and a well-formed-but-unknown input are distinct failure modes with distinct status codes. One pincode maps to many post offices, and district/state are reported per post office rather than once per pincode: a real minority of pincodes span more than one district (rarely, more than one state) across their post offices, so there is no single correct pincode-level district/state to return.

Authorizations:
BearerAuthApiKeyHeader
path Parameters
pin
required
string

The 6-digit pincode to look up, e.g. 110001.

Responses

Response samples

Content type
application/json
{
  • "pincode": "string",
  • "dataAsOf": "string",
  • "postOffices": [
    ]
}

Validate a GSTIN (format only) and decode its state, category, and embedded PAN

FORMAT validation only; see the top-level description. A malformed GSTIN (bad checksum, unrecognized state code, unrecognized structure, ...) is still a 200 with valid: false — validation failure is a successful answer, not a client error. 400 is reserved for input that isn't a candidate at all: empty, or far beyond any plausible GSTIN length.

Authorizations:
BearerAuthApiKeyHeader
path Parameters
gstin
required
string

The 15-character GSTIN to validate.

Responses

Response samples

Content type
application/json
{
  • "valid": true,
  • "formatOnly": true,
  • "input": "string",
  • "errors": [
    ],
  • "warnings": [
    ],
  • "note": "string",
  • "stateCode": "string",
  • "state": "string",
  • "stateCodeStatus": "active",
  • "category": "REGULAR",
  • "pan": "string",
  • "panEntityTypeCode": "string",
  • "panEntityType": "string",
  • "tan": "string",
  • "entityCode": "string"
}

Validate a PAN (format only) and decode its entity type

FORMAT validation only; see the top-level description. A malformed PAN (wrong length, unrecognized structure, unrecognized entity-type character) is still a 200 with valid: false — validation failure is a successful answer, not a client error. 400 is reserved for input that isn't a candidate at all: empty, or far beyond any plausible PAN length.

Authorizations:
BearerAuthApiKeyHeader
path Parameters
pan
required
string

The 10-character PAN to validate, e.g. AAPFU0939F.

Responses

Response samples

Content type
application/json
{
  • "valid": true,
  • "formatOnly": true,
  • "input": "string",
  • "errors": [
    ],
  • "warnings": [
    ],
  • "note": "string",
  • "entityTypeCode": "string",
  • "entityType": "string"
}

Look up an HSN/SAC code's description and current GST rate entries

Not yet implemented — deliberately deferred past the Week 5 Product A launch. This is the highest-risk dataset in the product (a wrong tax rate matters more than anything else), so the launch ships without it rather than with unverified rates; the hsn_codes code master is imported and the rate parser is built ahead of launch, but rate verification happens progressively afterward — see docs/PROJECT-PLAN.md decisions log (2026-09-29 entries) for the full design, sourcing, and verification plan. Unlike the other four endpoints, this is a reference-data lookup rather than a format validator, so its response shape isn't drawn from packages/validators. Returns every currently-in-force matching rate/exemption entry, not a single rate, since GST rates are often notified with conditions a single number would hide.

Authorizations:
BearerAuthApiKeyHeader
path Parameters
code
required
string

The HSN or SAC code to look up.

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "residual": true,
  • "rate": 0,
  • "entries": [
    ],
  • "warnings": [
    ]
}