Alladdin

Work in progress

Site en construction

الموقع قيد الإنشاء

Alladdin
GET

Get salary record form data

Scope: accounting:payrolls.read https://api.alladdin.com/api/v2/salary-records/form-data

Returns the defaults needed to create a salary record: the top-level result/counterpart account (default_accounting_account_id, e.g. "465 Remuneraciones pendientes de pago") and the default payroll lines (default_lines) with the accounting account, tax key and description per line type, resolved from the account's payroll scheme.
Call this before creating a salary record and use the returned accounting account IDs — never ask the user for them. They come from here, or from the employee's payroll_accounts when configured (employee-specific accounts take precedence).
Amounts in default_lines are placeholders ("0") and must be replaced with the amounts the user provides.

Request

python
import requests

url = "https://api.alladdin.com/api/v2/salary-records/form-data"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

response = requests.get(url, headers=headers)
print(response.json())

Responses

Response

json
{
  "default_accounting_account_id": "507f1f77bcf86cd799439013",
  "default_lines": [
    {
      "type": "salary",
      "amount": "0",
      "accounting_account_id": "507f1f77bcf86cd799439014",
      "tax_key": "e_salario",
      "description": "Salario"
    }
  ]
}

Success responses

200 Salary record creation defaults application/json object default_accounting_account_id string | null

Default top-level accounting account for the salary record: the result/counterpart account where the net payable is posted (e.g. "465 Remuneraciones pendientes de pago"). Use it as accounting_account_id when creating, unless the employee has its own payroll_accounts.result configured.

default_lines[] object[]

Default payroll lines from the account payroll scheme. One entry per line type with the accounting account, tax key and description already resolved — copy them verbatim into the create request. The "0" amounts are NOT usable values: you MUST ask the user for the real amount of every line and replace each "0" before creating. Never submit a line with amount "0".

type string

Line type (e.g. salary, retention, tax, companytax)

amount string

Placeholder amount, always "0"

accounting_account_id string | null

Default accounting account for this line type

tax_key string | null

Default tax key for this line type (e.g. e_salario, e_retencion). Copy it verbatim into the create request.

description string | null

Default line description (concept label, e.g. "Salario", "Total S.S."). Copy it verbatim into the create request.

Error responses

401 Invalid or missing API key application/json 403 Insufficient permissions application/json 429 Rate limit exceeded application/json

← PreviousGet a salary record →

Next →Download a salary record PDF →