# EPFO Establishment API

The full public EPFO record for an Indian establishment: registration, coverage and exemption status, owners and directors, the statutory identifiers (CIN, LIN, ESIC), the EPFO office it belongs to, and the monthly PF remittance history with amount and employee count per wage month.

**Pricing:** $0.05 per establishment

**Endpoint:** `POST /v1/data/pf-info/establishment/run`

**Auth:** `Authorization: Bearer mk_live_...`

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `est_ids` | array | Yes | One or more FULL 15-character EPFO establishment ids, e.g. KDMAL1567124000 — five office letters, a 7-digit establishment number and a 3-digit extension. Each id returns one row. |
| `maxResults` | integer | No | Stop after this many have been looked up. Each one costs a row, so this caps the bill as well as the output. 0 or omitted means every id you sent. |

## Example

`?wait=true` holds the request open until the run finishes (up to 60s) and returns the rows inline — one request, no polling.

```bash
curl -X POST "https://api.mindcase.co/v1/data/pf-info/establishment/run?wait=true" \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"params":{"est_ids":["..."]}}'
```

```python
import requests

resp = requests.post(
    "https://api.mindcase.co/v1/data/pf-info/establishment/run",
    params={"wait": "true"},
    headers={"Authorization": "Bearer mk_live_YOUR_API_KEY"},
    json={"params": {
    "est_ids": [
        "..."
    ]
}},
)
rows = resp.json()["data"]
```

## Longer runs

If the run is still going at the 60s ceiling you get back `{ job_id, status: "running" }` instead of rows (same if the result is over 100 rows — those come back `truncated`). Poll with that `job_id`:

```bash
# 1) check status
curl https://api.mindcase.co/v1/jobs/JOB_ID \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY"

# 2) when status == completed, fetch the rows
curl https://api.mindcase.co/v1/jobs/JOB_ID/results \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY"
```

Full API reference (auth, jobs, balance, SDKs, MCP): https://mindcase.co/skills.md

## Response columns

| Field | Display name | Type |
|-------|--------------|------|
| `establishmentId` | Establishment ID | text |
| `establishmentName` | Establishment Name | text |
| `nameAsPerPan` | Name (as per PAN) | text |
| `establishmentStatus` | Establishment Status | text |
| `workingStatus` | Working Status | text |
| `ecrRegistrationStatus` | ECR Registration Status | text |
| `postCoverageStatus` | Post Coverage Status | text |
| `exemptionStatus` | Exemption Status | text |
| `coverageSection` | Coverage Section | text |
| `actionableStatus` | Actionable Status | text |
| `dateOfCoverage` | Date of Coverage | date |
| `dateOfSetup` | Date of Setup | date |
| `primaryBusinessActivity` | Primary Business Activity | text |
| `sectionApplicable` | Section Applicable | text |
| `ownershipType` | Ownership Type | text |
| `panStatus` | PAN Status | text |
| `address` | Address | text |
| `pinCode` | Pin Code | text |
| `city` | City | text |
| `district` | District | text |
| `state` | State | text |
| `country` | Country | text |
| `epfoOfficeName` | EPFO Office Name | text |
| `epfoOfficeAddress` | EPFO Office Address | text |
| `cin` | CIN | text |
| `lin` | LIN | text |
| `esicCode` | ESIC Code | text |
| `startupOrderNo` | Startup Order No. | text |
| `msmeOrderNo` | MSME Order No. | text |
| `lastUpdatedOn` | Last Updated On | date |
| `officeFromSearch` | Office (from search) | text |
| `ownersDirectors` | Owners / Directors | object_array |
| `pfRemittanceHistory` | PF Remittance History | object_array |
| `scrapedAt` | Scraped At | date |
