Every e-stamp is issued for one state and one article, and every mistake about either of them costs money or a document. The lookup routes in this step are how your product learns which states can issue an e-stamp today, what each state asks for, which kinds of document a state supports, and, where a state wants it, which district and sub-registrar office the stamp belongs to. They are all reads, they all sit under the estamp.read scope, and none of them is metered. They are also where most of the data your form displays comes from, which makes them worth understanding properly. This is step three of the eight-step e-Stamp flow.
This page covers each route and what it returns, the odd fact that instruments and articles are the same list, how fresh each kind of data is, how to build a cascading form on top of it, how to search and rank thousands of options for a human, how to handle deprecated or changing data, and how to test across states without testing every state by hand. It is written for developers, with notes for the compliance owner at the points where a choice is a legal decision and not an engineering one.
The six lookup routes at a glance
Everything in this step is a GET under estamp.read, with a rate limit of 60 requests per 60 seconds per endpoint.
| Route | What it returns | When you need it |
|---|---|---|
GET /v1/estamp/states | The active e-Stamp states, sorted by name | Populating the first dropdown |
GET /v1/estamp/states/:stateCode | One state with its availability flags and limits | Deciding which inputs to show and whether to continue |
GET /v1/estamp/states/:stateCode/instruments | The state's article catalogue | Populating the article dropdown |
GET /v1/estamp/instruments/:instrumentCode/articles | The same catalogue, with a state code in the path | Compatibility with the reference's naming |
GET /v1/estamp/states/:stateCode/requirements | Documentary and data requirements for the state | Collecting state-specific details |
GET /v1/estamp/states/:stateCode/districts and .../districts/:districtCode/sros | Districts, then sub-registrar offices | States that require an SRO |
The base URL is https://api-b2b.stampmitra.in. Authenticate with Authorization: Bearer <key> or x-api-key: <key>. A key without estamp.read gets 403, and an organisation that is not entitled to e-Stamp gets 400 on every one of these routes, as the catalogue page explains.
export STAMPMITRA_API_KEY="sk_test_xxxxxxxxxxxx"
export BASE="https://api-b2b.stampmitra.in"
curl -s "$BASE/v1/estamp/states" -H "Authorization: Bearer $STAMPMITRA_API_KEY"
curl -s "$BASE/v1/estamp/states/MH" -H "Authorization: Bearer $STAMPMITRA_API_KEY"
curl -s "$BASE/v1/estamp/states/MH/instruments" -H "Authorization: Bearer $STAMPMITRA_API_KEY"States: what the list and the detail give you
The list returns the states that are currently active for e-Stamp, ordered by name. A state that the issuing side has stopped offering is not in the list. Each entry carries at least a code and a name, and the code is what every other route takes as :stateCode. Do not invent codes from state names, and do not copy a code from an old document. Read them from this response.
The detail route is where the useful facts are. For one state it returns:
| Field | Type | What it tells you |
|---|---|---|
code, name | string | Identity of the state |
isActive | boolean | Whether the state is currently active in the catalogue |
eStampAvailable | boolean | Whether e-stamps can be issued here |
traditionalAvailable | boolean | Whether physical stamp papers are available here |
minAmount, maxAmount | decimal string or null | The state-level range for the duty amount, where one applies |
sroRequired | boolean | Whether district and SRO must accompany a quote and an order |
cessRequired | boolean | Whether a cess amount is expected on stamp lines |
propertyAreaRequired | boolean | Whether the stamp line needs a property area |
fatherHusbandNameRequired | boolean or null | Whether the state asks for a father's or husband's name |
firstPartyAddressRequired | boolean or null | Whether the first party's address is needed |
panCardImageRequired | boolean or null | Whether a PAN card image is required |
instrumentCount | integer | How many articles the state offers |
{
"code": "MH",
"name": "Maharashtra",
"isActive": true,
"eStampAvailable": true,
"traditionalAvailable": true,
"minAmount": "100.00",
"maxAmount": "500000.00",
"sroRequired": true,
"cessRequired": false,
"propertyAreaRequired": true,
"fatherHusbandNameRequired": false,
"firstPartyAddressRequired": true,
"panCardImageRequired": false,
"instrumentCount": 42
}The values above are illustrative and say nothing about any state's actual rules. The shape is what matters. Three of the flags can be null as well as true or false, which means "not known", not "no". Treat null as "unknown", show nothing extra, and rely on the validation response if the state turns out to require it.
A state with eStampAvailable: false cannot issue an e-stamp, and your product should say so at the first dropdown rather than at the last screen. If traditionalAvailable is true and the e-stamp is not, you have a different product to offer, since the order contract has a category field that accepts e_stamp or traditional_stamp. Whether you sell traditional stamps through your product is a business decision. The point is to make it an explicit one.
Articles: the catalogue of what you can stamp
GET /v1/estamp/states/:stateCode/instruments returns the state's articles, ordered by description, with deprecated ones left out. An article entry carries these fields:
| Field | What it tells you |
|---|---|
code | The article code, unique within the state. This is the value you send as articleCode |
description | A human-readable name for the kind of instrument |
popular | A flag marking commonly used articles, useful for ranking |
minimumAmount | The minimum duty amount for this article |
allowedAmounts | An optional list of the exact amounts that can be bought, when the article is restricted to fixed denominations |
isSecondPartyNA | Whether a second party is not applicable for this article |
The same list is returned by the compatibility route GET /v1/estamp/instruments/:instrumentCode/articles, where the path parameter is a state code. The reference documents the oddity plainly: there is no separate instrument entity distinct from an article, and there is no sub-breakdown below the state-scoped list. Build your interface with two levels, state then article, and do not wait for a third.
[
{ "code": "ART1", "description": "Agreement or memorandum of agreement", "popular": true, "minimumAmount": "100.00", "allowedAmounts": [100, 200, 500, 1000], "isSecondPartyNA": false },
{ "code": "ART2", "description": "Affidavit", "popular": true, "minimumAmount": "100.00", "allowedAmounts": null, "isSecondPartyNA": true }
]The entries are illustrative. Article codes, descriptions and amounts differ by state, and an article code from one state means nothing in another. Scope every article choice to its state, store the pair, and never carry an article code across states.
Three fields deserve attention in your design. allowedAmounts, when present, is the strongest hint for your amount control: render a dropdown of exactly those values, since anything else will be rejected. minimumAmount gives a floor when no list exists. And isSecondPartyNA tells you to hide the second-party input for that article instead of forcing the user to type "not applicable".
Why classification is your decision, not the API's
The catalogue gives you a list of articles. It does not tell you which one fits your document. That choice is a legal classification, and it can change the duty. The platform's service terms put the responsibility on the developer: select the document category and article that accurately correspond to the transaction, and do not knowingly choose an incorrect article to reduce statutory charges. They also allow StampMitra to reject or require correction of a transaction whose details look inconsistent.
Design for that. Offer your users a short, curated list of document types you support, each mapped to an article per state in reviewed configuration owned by someone with legal training. Show the article's description next to your friendly name so that a reviewer can see what was chosen. Where a user is unsure, route them to a person or to qualified counsel instead of guessing in code. A free-text search across the whole catalogue is useful for a back-office operator and risky for an end customer who may pick whatever sounds cheapest.
Districts and SROs
When sroRequired is true, the quote and the order need a district and a sub-registrar office. The district list returns entries with a code and a name. The SRO list for a district returns entries with a label and a value, and the value is what you send as sroValue in the quote and as sro on the stamp line.
curl -s "$BASE/v1/estamp/states/MH/districts" -H "Authorization: Bearer $STAMPMITRA_API_KEY"
curl -s "$BASE/v1/estamp/states/MH/districts/PUNE/sros" -H "Authorization: Bearer $STAMPMITRA_API_KEY"An unknown state or an unknown district returns 404. This is not the same as an empty list. If a district has no SROs on file you will get an empty array, and a district code that does not exist returns 404 with a message naming it. Handle both: a 404 means your cached lists are stale or a code was tampered with, and an empty list means you should show a message and offer an alternative, because the quote will fail for a state that requires an SRO you cannot provide.
Whether the SRO matters to the stamp is a state matter. The API simply refuses a quote that omits a required district or SRO, with a message that names the missing field, so the sequence of calls above is not optional for those states.
The requirements route
GET /v1/estamp/states/:stateCode/requirements returns the state code and a fields list that describes documentary and data requirements for that state, synced from the issuing side. It is the dynamic complement to the boolean flags: required, optional and conditional fields, whether a second party is needed, amount-dependent rules, and property or identity details. When no requirements have been synced for a state, the route returns 404 with a message saying so. That is a normal state of affairs, not an error to alarm anyone about. Treat it as "no additional requirements known", rely on the flags, and let server-side validation catch the rest.
Because the shape of each requirement belongs to the issuing side, save a real response per state you support, write your renderer to fall back to a plain text input for requirement types it does not recognise, and log what it did not recognise. The schema page explains how this layer fits with the generic quote fields and the state flags.
How fresh is each kind of data?
The data behind these routes is synced from the issuing side on different clocks. Knowing the clocks tells you how to cache.
| Data | How it is refreshed | Caching advice |
|---|---|---|
State availability flags (isActive, eStampAvailable, traditionalAvailable) | A dedicated availability sync roughly every five minutes | Cache for a few minutes, never for hours |
| Full catalogue (articles, amounts, districts, SROs, requirements) | A fuller sync, run daily | Cache for hours, refresh at least daily |
| Manual overrides | An administrator can pin a state active or inactive, in which case the syncs leave it alone until the override is cleared | Treat the API's current answer as the truth, whatever the cause |
Two consequences follow. A state can switch from available to unavailable between the moment your user chooses it and the moment they submit, so check the state detail again just before the order and not only at the start of the form. And a long-lived cache of the state list can show a state that has gone away, so keep its lifetime short and refresh it on a trigger as well as on a timer.
The duty calculation accepts a masterDataVersion and returns masterDataVersionStale and masterDataVersion in its response. Carry the version you last read and compare: when the response says your version is stale, refresh your catalogue caches and ask the user to reconfirm any dropdown that might have changed.
Building the cascade
The chain is state, then article, then (where required) district, then SRO. Each change upstream clears everything downstream. The reducer in the schema page shows a framework-free version. Here is the fetching layer that feeds it.
// Node 18+; run on your server and expose your own endpoints to the UI
const BASE = "https://api-b2b.stampmitra.in";
const headers = { Authorization: `Bearer ${process.env.STAMPMITRA_API_KEY}` };
async function get(path) {
const res = await fetch(`${BASE}${path}`, { headers });
const body = await res.json();
if (!res.ok) throw Object.assign(new Error(body.error?.message), { status: res.status, requestId: body.error?.requestId });
return body;
}
const memo = new Map(); // path -> { at, value }
async function cached(path, ttlMs) {
const hit = memo.get(path);
if (hit && Date.now() - hit.at < ttlMs) return hit.value;
const value = await get(path);
memo.set(path, { at: Date.now(), value });
return value;
}
export const states = () => cached("/v1/estamp/states", 5 * 60_000);
export const stateDetail = (code) => cached(`/v1/estamp/states/${encodeURIComponent(code)}`, 5 * 60_000);
export const articles = (code) => cached(`/v1/estamp/states/${encodeURIComponent(code)}/instruments`, 6 * 3600_000);
export const districts = (code) => cached(`/v1/estamp/states/${encodeURIComponent(code)}/districts`, 6 * 3600_000);
export const sros = (code, district) =>
cached(`/v1/estamp/states/${encodeURIComponent(code)}/districts/${encodeURIComponent(district)}/sros`, 6 * 3600_000);import os, time, requests
BASE = "https://api-b2b.stampmitra.in"
H = {"Authorization": f"Bearer {os.environ['STAMPMITRA_API_KEY']}"}
_memo: dict[str, tuple[float, object]] = {}
def cached(path: str, ttl: float):
hit = _memo.get(path)
if hit and time.time() - hit[0] < ttl:
return hit[1]
r = requests.get(f"{BASE}{path}", headers=H, timeout=15)
body = r.json()
if not r.ok:
err = body["error"]
raise RuntimeError(f"{r.status_code} {err['code']} req={err['requestId']}")
_memo[path] = (time.time(), body)
return body
def usable_articles(state_code: str):
detail = cached(f"/v1/estamp/states/{state_code}", 300)
if not detail.get("eStampAvailable"):
return [] # say so at the first dropdown, not the last screen
return cached(f"/v1/estamp/states/{state_code}/instruments", 6 * 3600)The TTLs encode the table above: minutes for state data, hours for the catalogue. If you serve many users, put this layer in front of the API rather than letting every page view call StampMitra, since the rate limit is 60 requests per 60 seconds per endpoint and the data is identical for everyone.
Helping a person choose among many articles
A state's catalogue can run to dozens of articles, and an alphabetical list of legal descriptions is not a usable interface. A few techniques make it manageable without turning classification into a guess.
- Curate first. For a given product, a short list of the articles you support is the primary control. Everything else goes behind an "other document types" link for staff only.
- Rank with
popular. Where you do show the whole list, putpopularentries first. - Search the description, not the code. Users do not know article codes. Offer typeahead over
descriptionwith a minimum of two characters and highlight the match. - Show the constraint next to the choice. If an article carries
allowedAmounts, show the allowed amounts under the option so the user knows what they are choosing between before they get to the amount field. - Explain, do not decide. Add a one-line plain-language note per curated article, written and reviewed by someone qualified, and keep it in your configuration, not in code.
Avoid ranking by apparent cost. An interface that nudges users toward the cheapest article is exactly the behaviour the service terms prohibit.
Deprecated, changing and missing data
The catalogue is living data. Articles and districts are deprecated when the issuing side stops returning them, and the lists leave deprecated entries out. States can be deactivated. Requirements can appear for a state that had none. Your product should assume each of these will happen.
- A saved draft refers to an article that is gone. When the user resumes, re-read the article list and compare. If the code is missing, keep the draft, tell the user the document type needs to be chosen again, and do not silently substitute.
- A state goes inactive between steps. Recheck the state detail before validating an order. If it is no longer available, preserve the draft and explain.
- A new requirement appears. Your renderer's generic fallback shows it, and your nightly fixture comparison flags it for a person to review.
- A district has no SROs. Show a clear message and offer to contact support. Do not let the user proceed to a quote that will fail.
Store, with every order, the state code, the article code and the masterDataVersion in effect when the order was created. When something looks wrong months later, that triple is how you reconstruct what the user saw.
The amount fields: minimum, maximum and allowed values
Four amount-related fields appear across the state and article responses, and they interact. Reading them correctly saves you from the most common 400 on the next step.
| Field | Where | Meaning |
|---|---|---|
minAmount, maxAmount | State detail | The state-level range for the duty amount, where the state defines one |
minimumAmount | Each article | The smallest duty amount for that article |
allowedAmounts | Each article, optional | The exact amounts that can be bought, when the article is limited to fixed denominations |
Behind these fields sits a precedence that the duty calculation applies. In broad terms, an explicit per-article configuration wins over a per-state configuration, which wins over a list supplied by the issuing side for the article, which wins over a plain range between a minimum and a maximum. You do not need to reproduce that logic. You need to know its consequence: the effective rule for an article is either a fixed list of denominations or a range, and the response tells you which by whether allowedAmounts is present.
In the fixed-list case, only the listed amounts can be bought. Some configurations allow a total to be built from a small number of papers, but orders created through this API treat each stamp line as one physical stamp, so for API orders you should plan on single denominations. An amount that is not on the list is rejected with a message listing what is allowed. In the range case, any amount between the effective minimum and maximum is accepted, subject to any minimum that a duty rule imposes. An amount outside the range is rejected with a message that names the limit.
Your amount control follows directly. If allowedAmounts exists, render a dropdown. If not, render a number field bounded below by the larger of the article's minimumAmount and the state's minAmount, and above by the state's maxAmount when it is set. Show the bounds as help text, and still expect the server to have the last word, since a duty rule configured for the state can raise the effective minimum for a specific selection. The duty calculation page covers the exact messages and the requiredDuty field.
Mirror the catalogue or call it live?
At small scale you can call the lookups live behind a cache and be done. At larger scale a team has to choose between reading through to the API and keeping its own copy of the reference data. Both are reasonable, and the choice has consequences.
| Approach | How it works | Strengths | Weaknesses |
|---|---|---|---|
| Read-through cache | Your server calls the API on a miss and caches by path with a TTL | Simple, always close to current, nothing to migrate | Depends on the API being up on a cold cache, and spends rate limit on misses |
| Nightly mirror | A job copies states, articles, districts and SROs into your database | Fast, works through API outages, easy to join with your own tables | Can go stale between runs, and you own the sync code |
| Hybrid | A mirror for the slow data (articles, districts, SROs) and a short cache for state flags | Fast where data is stable, fresh where it moves every few minutes | Two mechanisms to maintain |
The hybrid matches the clocks in the freshness table: state availability moves every few minutes, the catalogue daily. Whichever you pick, make staleness visible. Store a fetched_at with each mirrored row, expose it in an admin view, and alert if the mirror is older than a day. Never join a mirrored article to an order without also storing the state code and the article code on the order itself, because the mirror will be refreshed and rows may be deprecated.
If you mirror, treat the sync as a diff job. Compare the new data with the old, log additions, removals and changes, and post the summary to a channel your legal reviewer reads. The day an article disappears from a state you sell in, you want to hear about it from a log line and not from a customer.
Rate limits, pre-warming and bursts
The routes allow 60 requests per 60 seconds per endpoint, which is generous for interactive use and tight for a batch job that walks every state. A few habits keep you inside the limit.
- Never fan out per page view. One shared cache serves all users. Ten thousand page views should cost a handful of API calls.
- Pre-warm on deploy. After a release, load the state list and the details of the states you sell in, so the first user does not pay the latency.
- Stagger refresh jobs. If a nightly job fetches articles for forty states, space the calls out instead of firing them together. Forty calls on one endpoint inside a minute is under the limit, but a retry storm on top of it is not.
- Back off on 429. Wait, double the wait on each repeat, add jitter, and fall back to cached data meanwhile.
- Do not poll. The catalogue does not push changes and does not need polling every few seconds. A timer measured in minutes for state flags and hours for the rest is enough.
Since the data is the same for every organisation using the lookups, you gain nothing by calling more often than the freshness clocks justify.
Names, language and display
State and article names arrive in English. For a Hindi or regional-language interface, keep a translation table keyed by the state code and the article code, falling back to the English description for anything untranslated. Do not translate at runtime with a generic service. Legal vocabulary is exactly where a literal translation misleads, and the translation of an article description belongs in the same reviewed configuration as your mapping from friendly names to articles.
Two display rules help. Always show the state name alongside any article, since the same description can exist in several states with different codes. And never display the raw code to an end user as if it were meaningful; use it as a key.
A review workflow for the article mapping
If your product offers a curated list of document types, the mapping from each type to an article in each state is the most legally sensitive data you own. Treat it like code with a reviewer.
- Keep it in version control as a reviewed configuration file or table, with one row per document type per state: the article code, the date reviewed, the reviewer and a link to the source the reviewer used.
- Require a second pair of eyes for changes. The author and the approver should be different people, and at least one should have legal training.
- Validate mechanically. A CI job loads the mapping and checks every article code against the production catalogue for its state (the sandbox catalogue is only a sample). A code that no longer exists fails the build.
- Review on a schedule. Re-confirm the mapping on a fixed cadence, such as every quarter, and whenever the nightly diff reports a change in a state you sell in.
- Log the decision per order. Store the mapping version used for each order, so that an old order can be reconciled with the rule in force at the time.
This costs a small amount of process and removes the situation in which nobody can say who decided that a document type maps to a given article.
Watching the lookups in production
A handful of signals tell you the lookup layer is healthy.
- Cache hit ratio for each route. A falling ratio often means something is bypassing the shared cache.
- 404 counts by route. A rise on the state detail or districts route points to stale lists or tampered input. A steady trickle on the requirements route is normal.
- 429 counts. Any sustained number means a fan-out bug.
- Mirror age, if you mirror. Alert past one day.
- Availability changes. Emit an event when a state you sell in flips
eStampAvailableorisActive, so someone can warn customers before they find out themselves.
Errors and how to react
All errors use { "error": { "code", "message", "requestId" } }.
| Status | Code | When | What to do |
|---|---|---|---|
| 400 | BAD_REQUEST | The organisation is not entitled to e-Stamp | Check the catalogue and your production access status |
| 401 | UNAUTHORIZED | Missing or invalid key | Fix the key |
| 403 | FORBIDDEN | Valid key without estamp.read | Add the scope |
| 404 | NOT_FOUND | Unknown state or district, or requirements not synced | Refresh your lists, or treat requirements as none |
| 429 | TOO_MANY_REQUESTS | More than 60 requests in 60 seconds on one endpoint | Back off and rely on the cache |
| 502 | INTERNAL_ERROR | Upstream unreachable | Retry with backoff, serve cached lists for a bounded time |
All six routes are reads, so retries are safe and none is charged. A 404 on the requirements route needs a different reaction from a 404 on the state detail: the first is an expected "nothing on file", the second means the state code is wrong.
Sandbox and production
Sandbox serves a small sample catalogue, so you can build the whole state to article to duty flow without any live data. It is sample data and not the production rules: production amounts, availability and requirements come from the live catalogue and can differ, and the sandbox and production lists will not match. Sandbox keys never debit a wallet and nothing reaches the issuing side. Catalogue reads count toward the sandbox limits like every other e-Stamp sandbox request (10 requests a minute and 200 a day per organisation, and 50 a day per IP address, resetting at midnight IST), so cache the lists in your tests instead of reading them again on every run.
| State | Code | Sandbox behaviour |
|---|---|---|
| Delhi | DL | Available, no district or SRO needed |
| Gujarat | GJ | Available, no district or SRO needed |
| Karnataka | KA | Available, needs districtCode and sroValue (districts BLR and MYS), cess applies |
| Maharashtra | MH | Available, no SRO needed, property area expected |
| Uttar Pradesh | UP | Not available for e-Stamp, so you can test the dead end |
| Article | Description | Rule |
|---|---|---|
ART1 | Agreement or memorandum of agreement | Only 100, 200, 500 or 1000, second party required |
ART2 | Affidavit | From 100, no second party |
ART3 | Indemnity bond | Only 100, 500, 1000 or 5000 |
ART4 | Power of attorney | From 200 |
5 | The code the published duty example uses | From 100 |
Each state returns the same articles, and the instruments route and the articles route return the same list, as they do in production. Karnataka has sub-registrar offices (SRO-21 and SRO-22 under BLR, SRO-31 under MYS), and Maharashtra has districts and offices too, so the cascade can be tested. Districts and offices are sample names. The sandbox has no synced requirements beyond the flags: the requirements route lists the fields the flags imply.
Because the catalogue is a sample, do not use it to validate your production article mapping. Validate that mapping against the production catalogue, in your go-live rehearsal, and keep the sandbox for shapes, cascades and error paths. Production needs an approved production access request. The sandbox versus production guide covers the switch.
Because even the sandbox data can be extended, treat the lookups as read-only reference data in your tests: do not assert that a specific state has a specific number of articles. Assert shapes and relationships instead.
Testing across states without testing every state
You cannot hand-test every state, and you should not need to. Pick a small matrix that covers the behaviours, not the geography.
| Scenario | What to look for |
|---|---|
A state with sroRequired: true | District and SRO appear, are mandatory, and the cascade resets correctly |
A state with sroRequired: false | District and SRO are hidden and not sent |
A state with propertyAreaRequired: true | The property area appears on the order form |
A state with eStampAvailable: false | The product stops at the first dropdown with a clear message |
An article with allowedAmounts | The amount control is a dropdown of exactly those values |
An article with isSecondPartyNA: true | The second-party input is hidden |
| A state with no requirements on file | The 404 is handled as "none known" |
| A state or district that disappears from the list mid-session | The draft is preserved and the user is asked to choose again |
Run the matrix nightly against the sandbox, with fixtures for shapes and assertions for behaviour, and run the production-catalogue checks from the step above against production on a schedule you control. When the catalogue changes in a way that breaks a scenario, you want a failed job the next morning, not a support ticket.
Worked example: an HR platform stamps employment documents
An HR platform stamps offer letters, bonds and indemnity undertakings for employers across states.
At startup the platform loads the state list and the state details, and caches them for five minutes. It computes the intersection of "states where the employer has offices" and "states with eStampAvailable: true". When an employer in an unavailable state opens the flow, the platform shows "e-stamping is not available in this state right now" with an option to request a physical stamp, and logs the event.
For an employer in an available state, the platform loads the article list for the state, applies its curated mapping, and shows three friendly choices: "Employment agreement", "Service bond" and "Indemnity undertaking". Behind each choice sits an article code per state, maintained by the platform's legal reviewer. The description of the mapped article is shown in small type under the choice. The reviewer, not the engineer, owns the mapping file.
Where the state needs an SRO, the platform loads districts and SROs and shows them as selects. For one state the SRO list for a district is empty. The platform shows "We cannot complete this online for that district yet. Our team will contact you", creates a follow-up task, and keeps the draft.
When the employer picks the bond, the article has allowedAmounts and the platform renders them as a dropdown. Just before the order, it re-reads the state detail. In one run the state has gone inactive in the last few minutes. The platform keeps the draft, explains, and schedules a retry. It also stores the state code, article code and masterDataVersion on the draft, so that nothing about the choice is ambiguous later.
Common mistakes
- Building a three-level tree. Instruments and articles are one list.
- Carrying an article code across states. Codes belong to a state.
- Caching state flags for hours. Availability refreshes every few minutes.
- Ignoring null flags. Null means unknown, not false.
- Letting users pick the cheapest article. Classification is a legal choice.
- Treating every 404 alike. Requirements-not-synced is expected, unknown-state is a bug.
- Skipping the recheck before the order. A state can go inactive mid-session.
- Forgetting
isSecondPartyNA. Forcing a second party where none applies produces rejections. - Hardcoding denominations. Read
allowedAmounts.
Where this fits in the flow
The lookups are step three of eight. Before them come the catalogue and the schema. After them come the duty and value calculation, the parties, the order, the payment and the order status and document access. The explainer on how duty is calculated by state covers the legal background to articles and measures, the overview guide shows all eight steps with a rental example, and the e-Stamp API reference lists the routes in tabular form.
StampMitra is a private LegalTech platform operated by Bani Global Industries LLP. It is not a government body or a law firm, and nothing here is legal advice. Which article applies to a document is a classification you or your counsel must decide.
Sources
- StampMitra e-Stamp API reference, state, instrument and article lookup, checked 2026-10-29.
- StampMitra authentication reference for keys, scopes and the error envelope, checked 2026-10-29.
- StampMitra Verification, e-Stamp and e-Sign Service Terms, sections 11 to 14, checked 2026-10-29.
- StampMitra pricing, checked 2026-10-29.
Frequently asked questions
Which routes list e-stamp states and articles?
GET /v1/estamp/states lists active states, GET /v1/estamp/states/:stateCode gives one state with its flags, and GET /v1/estamp/states/:stateCode/instruments lists its articles. All need the estamp.read scope and are not metered.
What is the difference between instruments and articles in the API?
There is none. The instruments route and the articles route return the same state-scoped article list, and the articles route takes a state code in its instrumentCode slot. Build a two-level selector: state, then article.
How do I know whether a state requires an SRO?
Read sroRequired on the state detail. If true, load districts and then sub-registrar offices, and send districtCode and sroValue to the duty calculation and district and sro on the order line. The API rejects a quote that omits them.
What does a null flag on the state detail mean?
For fatherHusbandNameRequired, firstPartyAddressRequired and panCardImageRequired, null means the requirement is not known, not that it is false. Show nothing extra and rely on server-side validation if the state turns out to need it.
How often does the state data change?
State availability flags are refreshed by a sync roughly every five minutes, and the fuller catalogue of articles, districts and SROs daily. Cache state data for minutes, the rest for hours, and recheck the state just before creating an order.
Which article should I choose for my document?
The API cannot decide that for you. Choosing the article is a legal classification and the service terms put it on the developer. Map document types to articles in reviewed configuration owned by someone with legal training, and ask counsel when unsure.
What are allowedAmounts on an article?
An optional list of the exact duty amounts that can be bought for that article when it is limited to fixed denominations. When present, render a dropdown of those values, since any other amount is rejected with a message listing the options.
What does isSecondPartyNA mean?
It tells you a second party is not applicable for that article. Hide the second-party input for it instead of making users type a placeholder, since forcing a second party where none applies can cause the order to be rejected.
Why does the requirements route return 404?
No requirements have been synced for that state yet. It is a normal condition, not a failure. Treat it as no additional requirements known, rely on the state flags and let validation on the order catch anything else.
Are the lookups the same in sandbox and production?
The shapes are the same, the data is not. Sandbox serves a small sample catalogue, so it is a good place to build and test every state flag and cascade at no cost. Validate your article mapping against production, and do not assert exact article counts.
Can I copy the catalogue into my own database?
Yes, as a mirror refreshed by a job. Store fetched_at on rows, alert when the mirror is over a day old, and still record the state code, article code and master data version on each order so old orders stay explainable.