Get a salary record
Scope: accounting:payrolls.read https://api.alladdin.com/api/v2/salary-records/{salaryRecordId}
Parameters
Path parameters
salaryRecordId string required
Salary record ID (24-character hexadecimal ObjectId)
Request
import requests
url = "https://api.alladdin.com/api/v2/salary-records/507f1f77bcf86cd799439011"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())Responses
Response
{
"id": "507f1f77bcf86cd799439011",
"employee_id": "507f1f77bcf86cd799439012",
"employee_name": "Jane Doe",
"is_ex_employee": false,
"date": "2024-03-15",
"description": "March 2024 payroll",
"tags": [
"bonus",
"q1"
],
"accounting_account_id": "507f1f77bcf86cd799439013",
"is_draft": false,
"payroll_type": "salary_record",
"lines": [
{
"type": "salary",
"amount": "1500.00",
"accounting_account_id": "507f1f77bcf86cd799439014",
"tax_key": "s_iva_21",
"description": "Base salary"
}
],
"total_payable": "1850.50",
"payment_total": "1850.50",
"payment_pending": "0.00",
"payment_status": "PENDING"
}Success responses
200 Salary record found application/json 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
is_ex_employee boolean
Whether the employee has since left the company
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
payroll_type string
Type of payroll document. Salary records always return "salary_record".
Enum: payslip salary_record lines[] object[]
Breakdown of the salary record into earning and deduction lines
type string
Classification of the line (earning or deduction)
Enum: salary tax companytax retention extra result advance wage_garnishment pago_delegado_it salary_in_kind salary_in_kind_retention salary_in_kind_income amount string
Line amount as a decimal string. Deductions (tax, retention) are negative (e.g. "-150.00"); salary and companytax are positive. Writes use the same signed convention.
accounting_account_id string | null
Accounting account for this line
tax_key string | null
Optional tax key applied to this line
description string | null
Optional free-form line description
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
Error responses
401 Invalid or missing API key application/json 403 Insufficient permissions application/json 404 Salary record not found application/json 429 Rate limit exceeded application/json
