List salary records
Scope: accounting:payrolls.read https://api.alladdin.com/api/v2/salary-records
Returns salary records ordered by creation (newest first). The start_date / end_date filter applies to the accrual date, not the creation date.
Parameters
Query parameters
cursor string optional limit integer optional = 50 employee_id string optional
Filter by employee.
start_date string<date-time> optional
Accrual date lower bound (ISO 8601).
end_date string<date-time> optional
Accrual date upper bound (ISO 8601).
Request
import requests
url = "https://api.alladdin.com/api/v2/salary-records?cursor=value&limit=50&employee_id=507f1f77bcf86cd799439012"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())Responses
Response
{
"items": [
{
"id": "507f1f77bcf86cd799439011",
"employee_id": "507f1f77bcf86cd799439012",
"employee_name": "Jane Doe",
"date": "2024-03-15",
"description": "March 2024 payroll",
"tags": [
"bonus",
"q1"
],
"accounting_account_id": "507f1f77bcf86cd799439013",
"is_draft": false,
"total_payable": "1850.50",
"payment_total": "1850.50",
"payment_pending": "0.00",
"payment_status": "PENDING"
}
],
"cursor": "string",
"has_more": true
}Success responses
200 List of salary records application/json object items[] object[] id string
Unique identifier of the salary record
employee_id string | null
Identifier of the employee this salary record belongs to. Null when the employee has been deleted.
employee_name string
Snapshot of the employee's full name at the time the record was created
date string<date>
Accrual date of the salary record (ISO 8601)
description string
Free-form description of the record
tags[] string[]
List of tags attached to the record
accounting_account_id string | null
Accounting account where the payroll expense is posted
is_draft boolean
Whether the record is still a draft and has not been posted to the ledger
total_payable string
Amount payable, as a decimal string. Read-only; the algebraic sum of every line amount (salary + companytax - tax - retention), so it includes the employer social-security cost.
payment_total string
Total amount already paid, as a decimal string
payment_pending string
Amount still pending payment, as a decimal string
payment_status string
Payment status of the record
Enum: PENDING PAID PARTIALLY_PAID cursor string | null
Opaque cursor pointing to the next page. Pass this value as the cursor query parameter in the next request. Null when there is no next page.
has_more boolean
Whether more pages are available after this one
Error responses
400 Bad request application/json 401 Invalid or missing API key application/json 403 Insufficient permissions application/json 429 Rate limit exceeded application/json
