Skip to main content

Partner API: salary structures

Salary structures are what an employee is contracted to be paid, itemised by component. This is different from payroll, which is what was actually paid in a given run.

Written by Vaibhav Kashyap

Scopes used on this page: salary:read. Calling an endpoint your key was not granted the scope for returns 403 insufficient_scope.

Every call below needs your API key — see Partner API: authentication and your first call — and every response follows the paging and field-selection rules in Partner API: pagination, field selection and identifiers.

GET /v1/employees/{asan_empcode}/salary

The compensation structure for a single employee, itemised the same way as the list endpoint.

Scope required: salary:read.

Path variables:

  • asan_empcode — the employee's asan_empcode, as returned by the directory.

Query parameters:

  • fields — Comma-separated subset of this endpoint's response fields, at most 100. Narrowing only: a name outside the documented field list is rejected with 400, never silently ignored.

  • as_on — Point-in-time lookup (YYYY-MM-DD). Defaults to the current values.

Fields on the response, and the only names ?fields= accepts: asan_empcode, components, ctc, currency, effective_from, has_esi, has_lwf, has_pf, has_pt, payment_frequency, payout_from, salary_id.

Example:

curl -s "https://api.asanify.com/v1/employees/{asan_empcode}/salary" \
  -H "Authorization: Bearer $ASANIFY_API_KEY"

Substitute {asan_empcode} before running it.

GET /v1/salary

The current compensation structure for each employee, one revision per employee, with standard and tenant-defined components itemised. Pass ?as_on= for the structure in force on a past date.

Scope required: salary:read.

Query parameters:

  • limit — Rows per page, 1-200. Defaults to 50.

  • cursor — Opaque cursor from the previous page's next_cursor. Omit for the first page; a null next_cursor means there are no further pages.

  • fields — Comma-separated subset of this endpoint's response fields, at most 100. Narrowing only: a name outside the documented field list is rejected with 400, never silently ignored.

  • status — Employee status filter. Omitted returns ACTIVE employees. One of: ACTIVE, RESIGNED, TERMINATED, ALL.

  • employment_type — Exact match on employment type.

  • as_on — Point-in-time lookup (YYYY-MM-DD). Defaults to the current values.

Fields on each record, and the only names ?fields= accepts: asan_empcode, components, ctc, currency, effective_from, has_esi, has_lwf, has_pf, has_pt, payment_frequency, payout_from, salary_id.

Example:

curl -s "https://api.asanify.com/v1/salary?limit=2" \
  -H "Authorization: Bearer $ASANIFY_API_KEY"
Did this answer your question?