Independence Day offer · ₹52/employee/moClaim offer
INDPayroll
API reference

Imports

Bulk file imports and their job status.

Base URLhttps://api.indpayroll.com/v13 endpoints
GET /imports/template

Download a sample import file

The column layout the importer expects, with a filled example row.

Query parameters

type required
enum: payroll, employees, attendance, salary_structure, leave, expenses
Which importer the template is for.
organization_id
integer
Organization to act on. Required when the API key can reach more than one organization; optional - and defaulted - when it can reach exactly one.

Responses

  • 200 The requested file. The content type follows format - text/csv, text/plain, application/pdf, or the Office XML type for xlsx.
  • 400 The request was malformed or failed validation. ErrorResponse
  • 401 The key is missing, unknown, or the HMAC signature did not verify. ErrorResponse
POST /imports

Upload a file for import

Multipart upload. Returns a job_id immediately; the rows are processed in the background. Poll GET /imports/{jobId}, or subscribe to import.completed and skip polling entirely.

Files up to 10 MB and 20,000 rows are accepted.

Headers

Idempotency-Key
string
A unique key, at most 255 characters, that makes this request safe to retry. Replaying a key within 24 hours returns the original response and does not act again.

Body multipart/form-data · required

file required
string (binary)
The .xlsx or .csv file.
type required
enum: payroll, employees, attendance, salary_structure, leave, expenses
organization_id
integer
dry_run
boolean
Validate every row and report the errors without writing anything.

Responses

  • 202 Queued. ImportJob
  • 400 The request was malformed or failed validation. ErrorResponse
  • 401 The key is missing, unknown, or the HMAC signature did not verify. ErrorResponse
  • 413 The file is larger than 10 MB. ErrorResponse
  • 429 Rate limit exceeded. Retry after the number of seconds in Retry-After. ErrorResponse
Request
curl -X POST https://api.indpayroll.com/v1/imports \
  -H "Authorization: Bearer $INDP_API_KEY"
Response · 202
{
  "job_id": "job_01J9K8M2QF",
  "type": "employees",
  "organization_id": 42,
  "status": "queued",
  "total_rows": 412,
  "processed_rows": 0,
  "progress_percent": 0,
  "started_at": "2026-09-30T11:04:02Z",
  "finished_at": null
}
GET /imports/{jobId}

Check import progress

Progress, counts and per-row errors. A completed job with rejected rows also carries error_file_url - the rejected rows as a spreadsheet, ready to fix and upload again.

Path parameters

jobId required
string
The job id returned by POST /imports.

Responses

  • 200 Job status. ImportJob
  • 401 The key is missing, unknown, or the HMAC signature did not verify. ErrorResponse
  • 404 No such resource, or it belongs to an organization this key cannot reach. ErrorResponse
Request
curl -X GET https://api.indpayroll.com/v1/imports/{jobId} \
  -H "Authorization: Bearer $INDP_API_KEY"
Response · 200
{
  "job_id": "job_01J9K8M2QF",
  "type": "employees",
  "organization_id": 42,
  "status": "completed_with_errors",
  "total_rows": 412,
  "processed_rows": 412,
  "succeeded": 409,
  "failed": 3,
  "progress_percent": 100,
  "errors": [
    {
      "row": 118,
      "column": "UAN",
      "message": "UAN must be 12 digits."
    },
    {
      "row": 240,
      "column": "IFSC",
      "message": "IFSC does not match the expected format."
    },
    {
      "row": 389,
      "column": "Date of joining",
      "message": "Date of joining cannot be in the future."
    }
  ],
  "error_file_url": "https://api.indpayroll.com/v1/imports/job_01J9K8M2QF/errors.xlsx",
  "started_at": "2026-09-30T11:04:02Z",
  "finished_at": "2026-09-30T11:05:19Z"
}