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

Org master

Departments, designations, holiday calendar and shifts.

Base URLhttps://api.indpayroll.com/v121 endpoints
GET /departments

List departments

Query parameters

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.
page
integer
1-based page number.
per_page
integer
Items per page. The engine caps this at 200.

Responses

  • 200 Departments. object
  • 401 The key is missing, unknown, or the HMAC signature did not verify. ErrorResponse
Request
curl -X GET https://api.indpayroll.com/v1/departments \
  -H "Authorization: Bearer $INDP_API_KEY"
Response · 200
{
  "data": [
    {
      "id": 7,
      "organization_id": 42,
      "name": "Engineering",
      "code": "ENG",
      "external_id": "dept-eng",
      "head_employee_id": "ext:emp-1001",
      "active": true
    },
    {
      "id": 8,
      "organization_id": 42,
      "name": "Sales",
      "code": "SLS",
      "external_id": "dept-sls",
      "head_employee_id": null,
      "active": true
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 50,
    "total": 2,
    "total_pages": 1
  }
}
POST /departments

Create a department

Sending an external_id that already exists updates that department instead of creating a second one.

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 application/json · required

organization_id
integer
name required
string
code
string
external_id
string
head_employee_id
string
active
boolean

Responses

  • 201 Created. Department
  • 400 The request was malformed or failed validation. ErrorResponse
  • 401 The key is missing, unknown, or the HMAC signature did not verify. ErrorResponse
  • 409 The resource is in a state that forbids the change - a locked or paid run, a duplicate external_id, or a settlement already approved. ErrorResponse
Request
curl -X POST https://api.indpayroll.com/v1/departments \
  -H "Authorization: Bearer $INDP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "organization_id": 42,
  "name": "Engineering",
  "code": "ENG",
  "external_id": "dept-eng"
}'
GET /departments/{id}

Retrieve a department

Path parameters

id required
string
INDPayroll id of the resource.

Responses

  • 200 The department. Department
  • 404 No such resource, or it belongs to an organization this key cannot reach. ErrorResponse
PATCH /departments/{id}

Update a department

Path parameters

id required
string
INDPayroll id of the resource.

Body application/json · required

organization_id
integer
name required
string
code
string
external_id
string
head_employee_id
string
active
boolean

Responses

  • 200 Updated. Department
  • 400 The request was malformed or failed validation. ErrorResponse
  • 404 No such resource, or it belongs to an organization this key cannot reach. ErrorResponse
DELETE /departments/{id}

Delete a department

Refused while employees are still assigned to it. Deactivate it instead by patching active: false.

Path parameters

id required
string
INDPayroll id of the resource.

Responses

  • 204 Deleted. No body.
  • 404 No such resource, or it belongs to an organization this key cannot reach. ErrorResponse
  • 409 The resource is in a state that forbids the change - a locked or paid run, a duplicate external_id, or a settlement already approved. ErrorResponse
GET /designations

List designations

Query parameters

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.
page
integer
1-based page number.
per_page
integer
Items per page. The engine caps this at 200.

Responses

  • 200 Designations. object
  • 401 The key is missing, unknown, or the HMAC signature did not verify. ErrorResponse
POST /designations

Create a designation

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 application/json · required

organization_id
integer
name required
string
code
string
grade
string
external_id
string
active
boolean

Responses

  • 201 Created. Designation
  • 400 The request was malformed or failed validation. ErrorResponse
  • 409 The resource is in a state that forbids the change - a locked or paid run, a duplicate external_id, or a settlement already approved. ErrorResponse
Request
curl -X POST https://api.indpayroll.com/v1/designations \
  -H "Authorization: Bearer $INDP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "organization_id": 42,
  "name": "Senior Software Engineer",
  "code": "SSE",
  "grade": "L4"
}'
GET /designations/{id}

Retrieve a designation

Path parameters

id required
string
INDPayroll id of the resource.

Responses

  • 200 The designation. Designation
  • 404 No such resource, or it belongs to an organization this key cannot reach. ErrorResponse
PATCH /designations/{id}

Update a designation

Path parameters

id required
string
INDPayroll id of the resource.

Body application/json · required

organization_id
integer
name required
string
code
string
grade
string
external_id
string
active
boolean

Responses

  • 200 Updated. Designation
  • 404 No such resource, or it belongs to an organization this key cannot reach. ErrorResponse
DELETE /designations/{id}

Delete a designation

Path parameters

id required
string
INDPayroll id of the resource.

Responses

  • 204 Deleted. No body.
  • 404 No such resource, or it belongs to an organization this key cannot reach. ErrorResponse
  • 409 The resource is in a state that forbids the change - a locked or paid run, a duplicate external_id, or a settlement already approved. ErrorResponse
GET /holidays

List the holiday calendar

The calendar the engine reads when it decides which non-working days are paid, and when a leave either side of a holiday makes it a sandwich.

Query parameters

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.
year
integer
Calendar year. Defaults to the current one.

Responses

  • 200 Holidays. object
  • 401 The key is missing, unknown, or the HMAC signature did not verify. ErrorResponse
Request
curl -X GET https://api.indpayroll.com/v1/holidays \
  -H "Authorization: Bearer $INDP_API_KEY"
Response · 200
{
  "data": [
    {
      "id": 301,
      "organization_id": 42,
      "name": "Maha Ashtami",
      "date": "2026-10-19",
      "type": "public"
    },
    {
      "id": 302,
      "organization_id": 42,
      "name": "Diwali",
      "date": "2026-11-08",
      "type": "public"
    }
  ]
}
POST /holidays

Add a holiday

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 application/json · required

organization_id
integer
name required
string
date required
string (date)
type
enum: public, restricted, weekly_off
applies_to
object

Responses

  • 201 Created. Holiday
  • 400 The request was malformed or failed validation. ErrorResponse
  • 409 The resource is in a state that forbids the change - a locked or paid run, a duplicate external_id, or a settlement already approved. ErrorResponse
Request
curl -X POST https://api.indpayroll.com/v1/holidays \
  -H "Authorization: Bearer $INDP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "organization_id": 42,
  "name": "Utkal Dibasa",
  "date": "2026-04-01",
  "type": "public",
  "applies_to": {
    "location": "Bhubaneswar"
  }
}'
GET /holidays/{id}

Retrieve a holiday

Path parameters

id required
string
INDPayroll id of the resource.

Responses

  • 200 The holiday. Holiday
  • 404 No such resource, or it belongs to an organization this key cannot reach. ErrorResponse
PATCH /holidays/{id}

Update a holiday

Changing a holiday inside a period that is already calculated does not retouch those slips. Recalculate to apply it.

Path parameters

id required
string
INDPayroll id of the resource.

Body application/json · required

organization_id
integer
name required
string
date required
string (date)
type
enum: public, restricted, weekly_off
applies_to
object

Responses

  • 200 Updated. Holiday
  • 404 No such resource, or it belongs to an organization this key cannot reach. ErrorResponse
DELETE /holidays/{id}

Delete a holiday

Path parameters

id required
string
INDPayroll id of the resource.

Responses

  • 204 Deleted. No body.
  • 404 No such resource, or it belongs to an organization this key cannot reach. ErrorResponse
GET /shifts

List shifts

Query parameters

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 Shifts. object
  • 401 The key is missing, unknown, or the HMAC signature did not verify. ErrorResponse
POST /shifts

Create a shift

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 application/json · required

organization_id
integer
name required
string
start_time required
string
end_time required
string
break_minutes
integer
working_hours
number
weekly_offs
string[]
night_shift
boolean

Responses

  • 201 Created. Shift
  • 400 The request was malformed or failed validation. ErrorResponse
Request
curl -X POST https://api.indpayroll.com/v1/shifts \
  -H "Authorization: Bearer $INDP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "organization_id": 42,
  "name": "General 9:30-6:30",
  "start_time": "09:30",
  "end_time": "18:30",
  "break_minutes": 60,
  "working_hours": 8,
  "weekly_offs": [
    "saturday",
    "sunday"
  ]
}'
GET /shifts/{id}

Retrieve a shift

Path parameters

id required
string
INDPayroll id of the resource.

Responses

  • 200 The shift. Shift
  • 404 No such resource, or it belongs to an organization this key cannot reach. ErrorResponse
PATCH /shifts/{id}

Update a shift

Path parameters

id required
string
INDPayroll id of the resource.

Body application/json · required

organization_id
integer
name required
string
start_time required
string
end_time required
string
break_minutes
integer
working_hours
number
weekly_offs
string[]
night_shift
boolean

Responses

  • 200 Updated. Shift
  • 404 No such resource, or it belongs to an organization this key cannot reach. ErrorResponse
DELETE /shifts/{id}

Delete a shift

Refused while employees are assigned to it for a period that is not yet paid.

Path parameters

id required
string
INDPayroll id of the resource.

Responses

  • 204 Deleted. No body.
  • 404 No such resource, or it belongs to an organization this key cannot reach. ErrorResponse
  • 409 The resource is in a state that forbids the change - a locked or paid run, a duplicate external_id, or a settlement already approved. ErrorResponse
POST /shifts/{id}/assign

Assign employees to a shift

Assigns for a date range. An open-ended assignment - to: null - replaces any earlier open-ended one for the same employee from from onwards.

Path parameters

id required
string
INDPayroll id of the resource.

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 application/json · required

employee_ids required
string[]
from required
string (date)
to
string (date)
Leave null for an open-ended assignment.

Responses

  • 200 Assigned. Ack
  • 400 The request was malformed or failed validation. ErrorResponse
  • 404 No such resource, or it belongs to an organization this key cannot reach. ErrorResponse
Request
curl -X POST https://api.indpayroll.com/v1/shifts/{id}/assign \
  -H "Authorization: Bearer $INDP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "employee_ids": [
    "ext:emp-1201",
    "ext:emp-1202",
    "ext:emp-1203"
  ],
  "from": "2026-10-01",
  "to": "2026-12-31"
}'
Response · 200
{
  "ok": true,
  "message": "3 employees assigned to shift 4 from 2026-10-01 to 2026-12-31."
}