# Parties API

> Attach first/second party (and witness) details to an e-Stamp order. Endpoint: `POST https://api-b2b.stampmitra.in/v1/estamp/orders/:orderId/parties`.

API fee: ₹5 per successful call, pay-as-you-go (lower on Growth and Scale). State procurement fee and stamp duty are quoted per order. Sandbox keys are free. Prices exclude 18% GST.

- HTML docs: https://developer.stampmitra.in/docs/estamp/estamp-parties
- Product page: https://developer.stampmitra.in/products/estamp-parties
- Pricing: https://developer.stampmitra.in/pricing
- Authentication: https://developer.stampmitra.in/docs/auth

## Attach/correct e-Stamp order party (customer) details

`POST https://api-b2b.stampmitra.in/v1/estamp/orders/:orderId/parties`

Required scope: `estamp.parties.write`

Attaches or corrects the customer/party details on an existing e-Stamp order. Requires the `estamp.parties.write` scope. Metered against your fulfilment wallet.

### Parameters

- `Authorization` (header, required): Bearer <api-key> (e.g. sk_test_... in sandbox, sk_live_... in production). The x-api-key header is also accepted.
- `orderId` (path, required): The e-Stamp order id.
- `customerName` (string, optional): Customer's full name.
- `partyName` (string, optional): Counter-party's full name.
- `customerMobile` (string, optional): Customer's mobile number.
- `customerEmail` (string, optional): Customer's email address.
- `partyAddress` (string, optional): Party's address.
- `partyPan` (string, optional): Party's PAN.

### Request example

```json
{
  "customerName": "Rahul Kumar",
  "customerMobile": "+919876543210",
  "customerEmail": "rahul@example.com"
}
```

# e-Stamp parties API: attach and correct party details on an order

> POST /v1/estamp/orders/:orderId/parties attaches or corrects contact details held for an order: customerName, customerMobile, customerEmail, partyAddress and partyPan. It models a single party, so partyName is only an alias of customerName. The second party is named on the stamp line, witnesses stay in your own workflow, and the call is metered.

An e-stamp has names on it, and the names have to be right. Ask three people on a product team where party details go in an e-Stamp integration and you will get three answers: on the stamp line, on the parties route, or in the agreement itself. All three are partly right, and the confusion is the main source of rejected orders and of corrections nobody can explain afterwards. This page sorts it out. It explains what the parties route does, what it deliberately does not, how it relates to the party fields on the order, how state requirements change what you collect, how to treat the personal data involved, and how to build a clean correction flow. It is step five of the [eight-step e-Stamp flow](/guides/e-stamp-api-india).

A heads-up that saves time: the route is smaller and more specific than its name suggests. It does not model every person in your agreement. It corrects the contact details held for an order, during the review stage, and it has a few behaviours that surprise people who assume otherwise. Those behaviours are verified here and called out where they matter.

## Three places party data lives

Keep these separate in your head and in your database.

| Place | What it holds | When you provide it |
|---|---|---|
| The stamp line on the order | The names of the first party and second party, who pays the duty, and related fields | At order creation, in `POST /v1/estamp/orders` |
| The parties route | Contact details held for the order: name, mobile, email, address and PAN text, corrected by you | After the order exists, to attach or correct |
| Your own agreement and workflow | Everyone who signs, including witnesses, signatories and authorised representatives | In your product, never sent to the stamp API |

The stamp line is what the order is validated and placed on. The parties route is a correction channel for contact-level details tied to the order record. Your agreement is yours: the stamping API has no concept of witnesses or of more than two named parties, and that is deliberate.

## The route at a glance

`POST /v1/estamp/orders/:orderId/parties` attaches or corrects party details on an existing e-Stamp order.

| Property | Value |
|---|---|
| Scope | `estamp.parties.write` |
| Rate limit | 30 requests per 60 seconds |
| Metered | Yes. Each successful call carries StampMitra's API fee, charged to your API credit wallet |
| Path parameter | `orderId`, the Core order id |
| Body | Any of `customerName`, `partyName`, `customerMobile`, `customerEmail`, `partyAddress`, `partyPan`, all optional strings |
| Idempotency key | Not used on this route |

The base URL is `https://api-b2b.stampmitra.in`. On the order creation response you will find both an `id` and an `orderId`. This route takes the `orderId` field, the Core order id. Check this in your first sandbox response rather than assuming, and store both identifiers.

```bash
export STAMPMITRA_API_KEY="sk_test_xxxxxxxxxxxx"
export BASE="https://api-b2b.stampmitra.in"

curl -s -X POST "$BASE/v1/estamp/orders/6a0e2b9a-5f1d-4c63-9c2e-0d4e7b1f3a55/parties" \
  -H "Authorization: Bearer $STAMPMITRA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "customerName": "Anita Rao", "customerMobile": "+919800000001", "customerEmail": "anita@example.com", "partyAddress": "Flat 4B, Example Heights, Pune" }'
```



## What the call actually does

It helps to know what happens behind the route, because the behaviour explains the rules about when to call it.

1. **It finds the order's active procurement request.** The route acts on the request that was created when you placed the order. If there is none that is still active, for example because the order was cancelled, the call is refused with a message that the operation does not apply to this order.
2. **It records your values as corrections.** The values you send are stored on the request's party record, marked as coming from a correction rather than from the original prefill, and a timeline entry notes which fields were changed.
3. **It mirrors some values to linked records.** The name, mobile number, email and address are also written to the customer and address records that the order points to, so the order and its customer record do not drift apart. The PAN text is stored only on the request's party record. It is not written to any identity or KYC record.
4. **It re-validates when that makes sense.** If the order is in `NEEDS_INFORMATION`, `VALIDATION_FAILED` or `WARNINGS`, the platform runs validation again straight after your correction. In any other state, the values are saved but no re-validation is attempted.
5. **It returns the stored party data.** The response is the updated party record.

Two practical consequences follow. First, the best moment to call the route is when the order is waiting for information or has failed validation, because that is when a correction can change the outcome. Second, treat a correction after placement as a record-keeping action, not a way to change a stamp that is already being generated.

## One party, not two: the `partyName` surprise

The route models a single party. `customerName` and `partyName` both write the same underlying name. If you send both, `customerName` wins. This means `partyName` does not set a counter-party. A product that sends the first party as `customerName` and the second party as `partyName` will find that the second name is ignored, which is a classic source of "I corrected it but nothing changed".

The right way to name the second party is on the stamp line, as `secondParty`, when you create the order. If the second party's name was wrong at creation and the order has not moved on, the practical route is to cancel the order, which is possible before it has been placed, and create it again with the right stamp line, using a new idempotency key because the body has changed. Do not try to correct a second party through this route.

| You want to change | Use |
|---|---|
| The first party's contact name, mobile, email or address on the order record | The parties route |
| The PAN text held against the order | The parties route, `partyPan` |
| The second party's name | Cancel and recreate the order with a corrected stamp line |
| Who pays the duty, the purpose, the property area | Cancel and recreate the order |
| A witness or additional signatory | Your own agreement workflow |

## The fields, one by one

| Field | Type | Where it lands | Notes |
|---|---|---|---|
| `customerName` | string | The party record and the linked customer record | Wins if `partyName` is also sent |
| `partyName` | string | The same name field as `customerName` | An alias, not a second party |
| `customerMobile` | string | The party record and the linked customer record | Send in a consistent format, with country code |
| `customerEmail` | string | The party record and the linked customer record | Used for communication about the order |
| `partyAddress` | string | The party record and the order's primary address line | A single flattened string; city, state and postal code on the address are not rewritten |
| `partyPan` | string | The party record only | Text only; not written to KYC records |

Every field is optional, but an empty body does nothing useful. Send the fields you mean to set, and do not send fields you do not want to change. Whether a field you omit is left as it is or cleared is not documented as a guarantee, so for corrections send the complete set of values you want recorded rather than relying on partial updates.

## The party fields on the stamp line

The stamp line, covered in the [order creation page](/products/estamp-orders), is where parties are first named.

| Field | Required | Meaning |
|---|---|---|
| `firstParty` | Yes | The first party to the instrument |
| `secondParty` | No | The second party, where the article uses one. Not applicable for articles flagged `isSecondPartyNA` |
| `stampDutyPayer` | No | Who pays the duty |
| `payerPhone` | No | The payer's phone number |
| `payerGender` | No | `MALE`, `FEMALE` or `OTHER` |
| `purpose` | No | The nature of the instrument, for example a rental agreement |

A contract note belongs here. The public order contract currently takes `firstParty` and `secondParty` as plain names. The issuing side models a party as an object with a `name` and optional `address`, `phone`, `fatherHusbandName` and `gender`. Those optional properties are exactly what the state flags `firstPartyAddressRequired` and `fatherHusbandNameRequired` ask for. If a state requires them, validate a sample order in sandbox, see what the validation says, and ask [developer support](/support) which form your account should use. Keep the accepted shape as a fixture so that a change shows up in your tests.

## State requirements that change what you collect

The state detail from the [lookup step](/products/estamp-state-instrument-article) tells you which extra party details a state wants.

| State flag | What it means for party data |
|---|---|
| `firstPartyAddressRequired` | The first party's address is needed |
| `fatherHusbandNameRequired` | The state asks for a father's or husband's name for the first party |
| `panCardImageRequired` | The state wants an image of the PAN card |
| `propertyAreaRequired` | The stamp line needs a property area |
| `sroRequired` | District and SRO must accompany the order |

A null on any of the first three means "not known". Collect the minimum, rely on the validation response, and be ready to ask the user for more. The API has no route for uploading a PAN card image. If a state requires one, the review stage will ask for it and you should work with [developer support](/support) to route it, rather than inventing an upload in your own product that the platform does not read.

The honest design is a form that collects what the flags say, then validates early. Run `POST /v1/estamp/orders/validate` before creating the order, so that missing party information shows up as a `NEEDS_INFORMATION` result with a message while the user is still on the screen, instead of as a pending order days later.

## Who counts as a party

Whether someone is a party to an instrument is a legal question. In general terms, a party is a person or entity whose rights or obligations the document creates or changes. The stamp line names the first party and, where the article uses one, the second party. Some practical points follow, and none of them is legal advice.

- **Individuals.** Use the name as it appears on the identity document the person will use elsewhere in the transaction. Initials, honorifics and spelling variants cause mismatches that surface later.
- **Companies and other entities.** Use the registered name of the entity, not a brand or the signatory's name. If you verify the entity first, the [GSTIN verification](/products/gstin) response gives you the registered name to copy.
- **Proprietorships and partnerships.** The legal form decides who the party is. If you are unsure, ask counsel instead of guessing in code.
- **Signing on someone's behalf.** An authorised representative signs for the party, but the party named on the stamp is generally the principal. The authority belongs in your agreement workflow.
- **More than two persons.** The stamp line names two. Additional co-owners, co-tenants or guarantors are described in the agreement text; whether the article or the state needs them named on the stamp is a question for counsel.

When your product is uncertain, say so to the user and offer help from a person. A confident wrong name is worse than a question.

## Names: normalisation and transliteration

Names are where small inconsistencies turn into large corrections. A few habits reduce them.

1. **Collect the name as one field per party, in the form it appears on the identity document**, not split across first, middle and last unless your own records need that.
2. **Trim and collapse whitespace.** Remove leading and trailing spaces and double spaces, and nothing else.
3. **Do not change case on the user's behalf in a way that alters meaning.** Display as typed; if you must normalise for comparison, do it on a copy.
4. **Be explicit about script.** If the identity document is in a regional script and the transliteration in English is what appears on the stamp, show the user the English form and ask them to confirm it.
5. **Keep the original and the submitted value.** If a correction is needed later, you can see what the user entered and what you sent.

Do not strip honorifics or initials unless the user has agreed. The person who reads the certificate will compare it with the signature and the identity documents.

## Verify before you stamp

Because the stamping API does not check identity, it is common to verify the parties first with the platform's verification APIs, which use the same key and the same conventions.

| You hold | Check | API |
|---|---|---|
| An individual's PAN | The PAN exists, its status, and a name match | [PAN verification](/products/pan) |
| A company's GSTIN | The registration, its status and the registered name | [GSTIN verification](/products/gstin) |

A verified name is the best input for `firstParty` or `secondParty`, since it removes spelling disagreements. Remember what a verification proves and what it does not: it shows that a number and a name agree with a record, not that the person in front of you owns it. The [PAN guide](/guides/pan-verification-api-india) and the [GSTIN guide](/guides/gstin-verification-api-india) go deeper. Under the service terms, StampMitra does not determine legal identity or the contractual relationship between parties unless a verification service expressly does so.

### Matching names after verification

Verification and stamping can disagree about a name without either being wrong. A PAN record may hold a name in capitals with the surname first, while the person signs with initials. Decide your rule in advance and apply it the same way every time.

1. Treat the verified registered name as the canonical text for the stamp line when the user agrees to it.
2. If the name-match score is low or the verdict is a mismatch, do not guess. Show the user both forms and let them choose, or send the case to a reviewer.
3. Store the verification reference next to the party row, so that anyone reading the order later can see where the name came from.
4. Never let a mismatch silently pass because stamping is the next step on the screen. A wrong name on a stamp is a correction at best and a new order at worst.

Verification calls are billed separately from stamping calls, so decide whether the check belongs before the quote, which spends a little earlier, or just before order creation, which spends only on orders that are going ahead. Most products verify when the user submits the party details and stamp only after the check passes.

## Personal data, consent and retention

Party details are personal data: names, phone numbers, email addresses, addresses and, where given, PAN text. India's Digital Personal Data Protection Act, 2023 sets the framework, and the practical habits below follow its general principles. They are not legal advice, and you should confirm your obligations with qualified counsel.

- **Collect only what the state's flags and the validation response require,** and say why when you ask.
- **Get and record consent** in the way your product's privacy notice describes, and keep the record.
- **Keep party data out of logs, analytics events and support tickets.** Log the order reference, the state, the `requestId` and which fields changed, not their values.
- **Limit who can see it.** The people who correct party details should be the people who need to.
- **Set a retention period** for drafts and for completed orders, and delete or anonymise when it ends, subject to any record-keeping duty you have.
- **Never put real identifiers in tests.** Use obviously fake sandbox data.

StampMitra's [developer privacy policy](/legal/developer-privacy-policy) and [data processing addendum](/legal/data-processing-addendum) describe how the platform handles data on its side.

## When to call the route

The right moment depends on the order's status, which you read from `GET /v1/estamp/orders/:id`.

| Order status | What the route does | Advice |
|---|---|---|
| `NEEDS_INFORMATION` | Saves your correction and re-validates | The ideal moment to send missing details |
| `VALIDATION_FAILED` | Saves and re-validates | Correct the cause named in the message |
| `WARNINGS` | Saves and re-validates | Use it if a warning is about party data |
| `PENDING_REVIEW`, `READY_TO_PLACE` | Saves, no automatic re-validation | Use sparingly, since a reviewer may already be looking at the order |
| Placed or later | Saves, no re-validation | Treat as record-keeping, not as a way to change the stamp |
| `CANCELLED` | Refused, since there is no active request | Create a new order instead |

Each successful call is charged, so do not call on every keystroke or on every blur event. Collect the corrections, show a review screen, and send them once. Because the route does not use an idempotency key, a timeout leaves you unsure whether the call was processed. A second identical call is harmless to the data, because it writes the same values, but it can be charged again, so retry only on clear transport failures and with backoff.

## A clean correction flow in code

```javascript
// Node 18+; server side only
const BASE = "https://api-b2b.stampmitra.in";
const headers = { Authorization: `Bearer ${process.env.STAMPMITRA_API_KEY}`, "Content-Type": "application/json" };

const CORRECTABLE = new Set(["NEEDS_INFORMATION", "VALIDATION_FAILED", "WARNINGS"]);

export async function correctParties({ orderId, coreOrderId, fields }) {
  // 1. Read the order so we only auto-correct when it can change the outcome
  const orderRes = await fetch(`${BASE}/v1/estamp/orders/${orderId}`, { headers });
  const order = await orderRes.json();
  if (!orderRes.ok) throw Object.assign(new Error(order.error?.message), { status: orderRes.status, requestId: order.error?.requestId });
  if (order.status === "CANCELLED") return { applied: false, reason: "order-cancelled" };

  // 2. Send the complete set of values we want recorded, as strings, with no empty values
  const body = Object.fromEntries(Object.entries(fields).filter(([, v]) => typeof v === "string" && v.trim() !== ""));
  const res = await fetch(`${BASE}/v1/estamp/orders/${coreOrderId}/parties`, { method: "POST", headers, body: JSON.stringify(body) });
  const out = await res.json();
  if (res.status === 429) return { applied: false, reason: "rate-limited" };
  if (!res.ok) throw Object.assign(new Error(out.error?.message), { status: res.status, requestId: out.error?.requestId });

  return { applied: true, revalidated: CORRECTABLE.has(order.status), stored: out };
}
```

```python
import os, requests

BASE = "https://api-b2b.stampmitra.in"
H = {"Authorization": f"Bearer {os.environ['STAMPMITRA_API_KEY']}"}
ALLOWED = {"customerName", "customerMobile", "customerEmail", "partyAddress", "partyPan"}

def correct_parties(core_order_id: str, fields: dict) -> dict:
    body = {k: v.strip() for k, v in fields.items() if k in ALLOWED and isinstance(v, str) and v.strip()}
    if not body:
        return {"applied": False, "reason": "nothing to send"}
    r = requests.post(f"{BASE}/v1/estamp/orders/{core_order_id}/parties", json=body, headers=H, timeout=20)
    data = r.json()
    if r.status_code == 429:
        return {"applied": False, "reason": "rate-limited"}
    if not r.ok:
        err = data["error"]
        raise RuntimeError(f"{r.status_code} {err['code']} {err['message']} req={err['requestId']}")
    return {"applied": True, "stored": data}
```

Notice the order of operations: read the order status first, then send the full set of values, then log what changed without logging values. The code never sends `partyName`, since it would only duplicate `customerName`.

## Edge cases worth designing for

Real parties do not arrive as tidy records. A short list of cases, each routed to a person instead of resolved in code, will save you from the worst surprises. None of this is legal advice.

- **A name that changed.** A party's name may differ between identity documents after marriage, a legal name change or a spelling correction. Ask which name the document should carry, and keep a note of what was chosen and why.
- **A party outside India.** Overseas addresses and foreign phone numbers may not fit the formats your form expects. Allow them, mark the record for review, and expect the reviewer to ask questions.
- **An entity that has changed form.** Companies convert, merge and rename. Use the name currently registered, and verify it rather than copying an old document.
- **A deceased party or an estate.** Someone acting for a person who has died is a matter for counsel before it is a matter for your form.
- **A minor or a person who needs a representative.** Who signs and in what capacity is a legal question. Offer a way to flag it and hand over to a human.
- **Joint owners and co-tenants.** The stamp line names two parties. How the agreement treats additional persons is a drafting question, and whether the state needs them on the stamp is for counsel.
- **A party who is also the payer, or is not.** `stampDutyPayer` exists for the case where the person paying the duty is not the first party. Collect it explicitly instead of assuming.

The pattern is the same each time: a clear flag in your form, a record of what the user said, and a person who decides.

## Running the `NEEDS_INFORMATION` queue

If your product creates many orders, some will come back asking for more. Treat that queue as an operations process with an owner, not as an occasional surprise.

1. **Detect early.** A job lists orders in `NEEDS_INFORMATION`, `VALIDATION_FAILED` and `WARNINGS` every few minutes, and creates one task per order if none is open.
2. **Read the message.** The status comes with errors and warnings that say which field is the problem. Copy them onto the task, with the `requestId` of the read.
3. **Ask the user once.** Send a clear, specific request: which detail, why it is needed, and how to provide it. Avoid asking for everything again.
4. **Apply the correction once.** When the user replies, apply it through the correction function and add a note to the task. Do not retry blindly on a timeout; read the order again first.
5. **Close or escalate.** If the order moves to `READY_TO_PLACE`, close the task. If the same message comes back, escalate to [developer support](/support) with the order references and the messages.
6. **Measure.** Track how many orders need information, which fields are missed most often, and how long the loop takes. The most-missed field is a form bug.

A useful target is to make this queue shrink over time. Each recurring cause points at a question your form should have asked earlier.

## Consent screens and what you tell the people involved

The people named on a stamp may not be your customer. A landlord who is your customer names a tenant who is not. Treat both with the same care.

- **Tell each party what you do with their details and why,** in plain language, at the moment you collect them or as soon after as is practical.
- **Do not reuse `customerEmail` and `customerMobile` for marketing.** The reason you hold them is the stamping transaction. Use them for messages about that transaction.
- **Give a way to ask for a correction or deletion** through your product, and honour it within the limits of any record-keeping duty you have.
- **Avoid showing one party the other's personal details** beyond what the document itself requires.
- **Write the consent record down:** who agreed, to what, when, and in which version of your notice.

Good copy is short and concrete. "We use your name, phone number and address to get a stamp for your agreement and to contact you about it" tells a person what they need to know.

## Errors and how to react

All errors use `{ "error": { "code", "message", "requestId" } }`. The `code` is derived from the HTTP status.

| Status | Code | When | What to do |
|---|---|---|---|
| 400 | `BAD_REQUEST` | The organisation is not entitled to e-Stamp, a field fails validation, or the order has no active request | Read the message, and check entitlement and the order's status |
| 401 | `UNAUTHORIZED` | Missing or invalid key | Fix the key |
| 402 | `PAYMENT_REQUIRED` | The API credit wallet cannot cover the call | Top up and retry |
| 403 | `FORBIDDEN` | Valid key without `estamp.parties.write` | Add the scope |
| 404 | `NOT_FOUND` | No such order for your organisation | Check the id: use `orderId`, not `id` |
| 429 | `TOO_MANY_REQUESTS` | More than 30 requests in 60 seconds | Back off |
| 502 | `INTERNAL_ERROR` | Upstream unreachable | Retry with backoff; the call may or may not have been processed |

A 400 for an order with no active request is the one that surprises people. It usually means the order was cancelled or is otherwise no longer open. Read the order's status before you decide what to do next.

## Sandbox and production

Parties attach to sandbox orders. A sandbox key accepts the same body, stores the party fields against the sandbox order you name and returns them, so you can build and test your correction flow end to end. Send the `orderId` from a sandbox order you created (the id starts with `estord_sbx_`). Calling the route a second time merges the new fields into the stored ones.

| Situation in sandbox | Result |
|---|---|
| An open sandbox order | 200 with the stored party data |
| An order id that does not exist for your organisation | 404, the same as production |
| An order that has already finished (`ISSUED`, failed, cancelled or expired) | 409, because there is nothing left to correct |
| A body with an unknown field or a wrong type | 400, with the same message as production |

Because a sandbox order finishes by itself in about thirty seconds, create the order and send the parties call straight away, and write a second test that expects the 409 once the order is `ISSUED`. Sandbox keys never debit your wallet. Production needs an approved production access request and a funded API credit wallet, and in production the parties call also triggers a fresh review of the order. The [sandbox versus production guide](/guides/sandbox-vs-production-api-keys) covers the switch. The parties call counts 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).

## Modelling parties in your database

A modest schema keeps corrections traceable.

| Table | Columns worth having | Why |
|---|---|---|
| `agreement_party` | `id`, `agreement_id`, `role` (first, second, witness, signatory), `legal_name`, `entity_type`, `verified_at`, `verification_ref` | Your own record of everyone in the agreement, including those the stamp API never sees |
| `stamp_order_party_snapshot` | `order_id`, `first_party_name`, `second_party_name`, `payer_name`, `submitted_at` | Exactly what you sent on the stamp line |
| `stamp_party_correction` | `order_id`, `fields_changed` (names only), `corrected_by`, `corrected_at`, `request_id` | An audit trail of corrections without storing values twice |

Keep the snapshot immutable. If the first party changes later, that is a new order, not an edit of the snapshot. And keep roles in your table that the API does not know about, such as witnesses, so that your agreement workflow has somewhere to put them.

## Worked example: a correction after a validation warning

A rental platform creates an order for a leave and licence agreement. The stamp line names the licensor as `firstParty` and the licensee as `secondParty`. The platform also validated the order first, so the result was clean.

After creation, the order shows `NEEDS_INFORMATION` with a message that the first party's address is required for the state. The platform had not collected it, because the state's `firstPartyAddressRequired` flag was null when the form was built. An operations person opens the order in the platform's admin screen, sees the message, and asks the landlord for the address.

The landlord replies. The operations person enters the address, and the admin screen calls the correction function with `partyAddress` and the existing contact details. The platform reads the order, sees `NEEDS_INFORMATION`, sends the full set of values, and records that the address field changed, without logging the address. The route saves the correction, mirrors it to the linked records and re-validates. The next read of the order shows `READY_TO_PLACE`.

Nothing in the flow touched the second party. When the licensee later notices a typo in their own name, the platform sees that the order is `READY_TO_PLACE`, cancels it before placement, and creates a new order with the corrected stamp line and a new idempotency key. The audit table shows the first order, the correction, the cancellation and the replacement, each with its `requestId`.

## Testing

| Test | What it proves |
|---|---|
| Correction sent only when the order is `NEEDS_INFORMATION`, `VALIDATION_FAILED` or `WARNINGS` | You use the route when it can change the outcome |
| `partyName` is never sent | You avoid the alias trap |
| Empty strings are filtered out | You do not send blanks |
| A 400 for a cancelled order is handled as "create a new order" | Your flow handles closed orders |
| A 429 returns a clear "try later" and no retry storm | Rate limits are respected |
| Logs contain field names but not values | Personal data stays out of logs |
| The second-party correction path cancels and recreates | You do not try to edit the second party through this route |

## Common mistakes

- **Using `partyName` for the second party.** It writes the same name as `customerName`.
- **Using `id` instead of `orderId` in the path.** The route takes the Core order id.
- **Correcting a stamp that is already being generated.** The route is for the review stage.
- **Sending corrections on every keystroke.** Each success is charged.
- **Putting witnesses into the stamp order.** They belong to your agreement workflow.
- **Logging party values.** Log field names and the `requestId` only.
- **Skipping validation before creating the order.** Missing details are cheaper to find early.
- **Inventing an upload for the PAN card image.** The API has no such route; ask support.
- **Treating a verified number as proof of possession.** A match shows consistency with a record, not ownership.

## Where this fits in the flow

The parties route is step five of eight. Before it come the [catalogue](/products/estamp-catalog), the [schema](/products/estamp-schema-options), the [state, instrument and article lookup](/products/estamp-state-instrument-article) and the [duty and value calculation](/products/estamp-duty-value). After it come the [order](/products/estamp-orders), the [payment](/products/estamp-payment) and the [order status and document access](/products/estamp-documents). In the reference timeline parties appear before the order, but because the route takes an order id you create the order first and then attach or correct. The [overview guide](/guides/e-stamp-api-india) shows all eight steps with a rental example, and the [e-Stamp API reference](/docs/estamp/estamp-parties) lists the route 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. Who is a party to your document, and what the stamp must say, are questions for you or your counsel.

## Sources

- StampMitra e-Stamp API reference, [parties](/docs/estamp/estamp-parties), checked 2026-10-29.
- StampMitra [authentication reference](/docs/auth) for keys, scopes and the error envelope, checked 2026-10-29.
- StampMitra [Verification, e-Stamp and e-Sign Service Terms](/legal/verification-e-stamp-e-sign-service-terms), sections 11 to 14, checked 2026-10-29.
- StampMitra [developer privacy policy](/legal/developer-privacy-policy) and [data processing addendum](/legal/data-processing-addendum), checked 2026-10-29.
- The Digital Personal Data Protection Act, 2023, referred to for general principles only; confirm obligations with counsel, reviewed 2026-10-29.

## Frequently asked questions

### What does the e-Stamp parties route do?

It attaches or corrects the contact details held for an existing e-Stamp order: name, mobile, email, address and PAN text. The values are saved on the order's party record, mirrored to linked customer and address records, and re-validated when the order is waiting for information.

### Which id goes in the path, id or orderId?

The orderId, which is the Core order id. The order creation response carries both an id and an orderId, and the parties route takes orderId. Confirm this in your first sandbox response and store both identifiers.

### Does partyName set the second party?

No. The route models a single party, and partyName writes the same name as customerName, which wins if both are sent. Name the second party on the stamp line as secondParty, or cancel and recreate the order if it was wrong.

### Does the API support witnesses?

No, and that is deliberate. Witnesses sign the agreement, not the stamp purchase. Keep witness details in your own agreement workflow and send only the first and second party to the stamp order.

### When should I call the parties route?

When the order is in NEEDS_INFORMATION, VALIDATION_FAILED or WARNINGS, because the platform re-validates straight after the correction. In other states the values are saved without re-validation, and a cancelled order is refused.

### Is the parties call charged?

Yes. It is a metered e-Stamp call, charged on success against your API credit wallet at the plan rate. Collect corrections on a review screen and send them once, since each successful call carries the API fee.

### Is partyPan verified or used for KYC?

No. The PAN text is stored only on the order's party record and is not written to any identity or KYC record. To check a PAN, use the PAN verification API separately before stamping.

### Can I upload a PAN card image through the API?

No such route exists. If a state's panCardImageRequired flag is true, the review stage will ask for it, and you should work with developer support to route it rather than building an upload the platform does not read.

### What if I retry a timed-out parties call?

The route has no idempotency key. A repeated call writes the same values, so the data is safe, but it can be charged again. Retry only on clear transport failures, with backoff, and read the order first if unsure.

### How do I handle personal data in party details?

Collect only what the state flags and validation require, record consent, keep values out of logs and analytics, restrict who can see them, set a retention period and use fake data in tests. Confirm obligations under the DPDP Act with counsel.

### How do I correct the second party's name after the order exists?

Not through this route. If the order has not been placed, cancel it and create a new one with the corrected stamp line and a new Idempotency-Key, since the body has changed. Keep an audit entry of the replacement.
