# 6. Screen a Commercial Contract for Bharat Statutory Traps & Stamp Duty
> Pre-redact sensitive PII with B7 Compliance Firewall and detect ICA s.27/28/74, Perkins Eastman s.12(5), and Stamp Act traps with B6.
Source URL: /docs/recipes/triage-commercial-contract

**Problem:** Before signing a commercial MSA or employment agreement governed by Bharat law, screen for statutory voidness traps (Indian Contract Act ss. 27, 28, 74; Arbitration &amp; Conciliation Act s.12(5) unilateral arbitrator appointments; seat vs. venue ambiguity) and state Stamp Act / Registration Act s.17 requirements.

| Step | Endpoint | Scope | Credits |
|---|---|---|---|
| Optional PII / privilege pre-screen (`B7`) | `POST /api/v1/in/compliance/redact-firewall` | `ai:run` | 5 |
| Contract trap triage (`B6`) | `POST /api/v1/in/contracts/triage` | `ai:run` | 15 |

Note on `B7` modes: `mode: "redact"` (default) returns `redacted_preview`; `mode: "detect"` omits `redacted_preview` from the JSON response.

## Implementation [#implementation]

<Tabs items={["cURL","Python (vidhi)","TypeScript (@vidhi/sdk)","Go CLI (vidhi)"]}>
<Tab value="cURL">
```bash
# Optional step: redact personal PII before external processing
curl -sS -X POST https://api.vidhi.shamik.app/api/v1/in/compliance/redact-firewall \
  -H "Authorization: Bearer $VIDHI_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "text": "Consultant Aadhaar 1234-5678-9012 shall not work in competing SaaS for 3 years post-termination; disputes go to a sole arbitrator appointed by the Managing Director.",
    "mode": "redact",
    "target_scope": "personal"
  }'

# Screen contract for Bharat statutory traps & Maharashtra Stamp Act scope
curl -sS -X POST https://api.vidhi.shamik.app/api/v1/in/contracts/triage \
  -H "Authorization: Bearer $VIDHI_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "text": "The Employee shall not engage in any competing business for 3 years post-termination; disputes shall be decided by a sole arbitrator appointed exclusively by the Managing Director.",
    "party_role": "Vendor",
    "contract_type": "Master Services Agreement",
    "governing_state": "Maharashtra",
    "run_stress_test": true
  }'
```
</Tab>

<Tab value="Python (vidhi)">
```python
from vidhi import Vidhi

client = Vidhi()
firewall = client.compliance.redact_firewall(
    text=contract_text,
    mode="redact",
    target_scope="personal",
)
triage = client.contracts.triage(
    text=firewall.redacted_preview,
    party_role="Vendor",
    contract_type="Master Services Agreement",
    governing_state="Maharashtra",
    run_stress_test=True,
)
print("Overall risk:", triage.overall_risk)
for trap in triage.traps or []:
    print(trap.get("statute"), "->", trap.get("suggested_counter_wording"))
```
</Tab>

<Tab value="TypeScript (@vidhi/sdk)">
```ts
import { VidhiClient } from "@vidhi/sdk";

const client = new VidhiClient({ apiKey: process.env.VIDHI_API_KEY! });
const firewall = await client.compliance.redactFirewall({
  text: contractText,
  mode: "redact",
  target_scope: "personal",
});

const triage = await client.contracts.triage({
  text: firewall.redacted_preview ?? contractText,
  party_role: "Vendor",
  contract_type: "Master Services Agreement",
  governing_state: "Maharashtra",
  run_stress_test: true,
});
console.log(triage.overall_risk, triage.traps, triage.stamp_registration_scope);
```
</Tab>

<Tab value="Go CLI (vidhi)">
```bash
vidhi redact --file msa.txt --mode redact --json
vidhi contract --file msa.txt --party-role Vendor --governing-state Maharashtra --stress-test --json
```
</Tab>
</Tabs>

## Verified Response Excerpt (`/contracts/triage`) [#verified-response-excerpt-contractstriage]

```json
{
  "contract_title": "Master Services Agreement",
  "overall_risk": "high",
  "traps": [
    {
      "clause": "3-year post-termination non-compete",
      "statute": "Indian Contract Act, 1872 — Section 27",
      "severity": "high",
      "suggested_counter_wording": "Limit post-termination restrictions strictly to non-solicitation of named clients and confidentiality obligations."
    },
    {
      "clause": "Sole arbitrator appointed exclusively by the Managing Director",
      "statute": "Arbitration and Conciliation Act, 1996 — Section 12(5) (Perkins Eastman)",
      "severity": "high",
      "suggested_counter_wording": "Replace with mutual appointment of a sole arbitrator or institutional appointment (MCIA / DIAC)."
    }
  ],
  "stamp_registration_scope": {
    "governing_state": "Maharashtra",
    "stamp_statute": "Maharashtra Stamp Act, 1958",
    "registration_check": "Compulsory registration under Registration Act, 1908 s.17 only if creating/transferring immovable property rights."
  },
  "clause_heatmap": [{ "section": "Dispute Resolution", "risk": "high" }],
  "ready_to_insert_redline_markdown": "### Suggested Redline\n..."
}
```