SalaryPayments API Method (payments)
Overview
The SalaryPayments (payments) method provides access to salary payment records in eSalary. It supports filtering by employee number and salary period, as well as paging. You must be logged in with Basic Authentication to use this method.
Source: eSalary Web Service Documentation. :contentReference[oaicite:0]{index=0}
Authentication
- Basic Authentication is required.
- Send header: Authorization: Basic base64(username:password)
- Typical headers: Accept: application/json; Content-Type: application/json (for POST)
Examples in the official docs show Basic Auth on all requests. :contentReference[oaicite:1]{index=1}
Endpoints
- POST JSON: https://testapi.esalary.fi/payments
- GET JSON: https://testapi.esalary.fi/payments?parameters
- REST GET JSON: https://testapi.esalary.fi/reports/payments?parameters
Endpoint patterns per the documentation samples. :contentReference[oaicite:2]{index=2}
Request Parameters
All parameters are optional unless stated.
- personnumber (string, max 20)
- period (string, max 20)
- maxrecords (integer)
- skiprecords (integer)
Parameter definitions from the method page. :contentReference[oaicite:3]{index=3} :contentReference[oaicite:4]{index=4}
Response Structure
Successful responses contain a top-level object named payments_response with:
- salarypayments — list of salary payment records
- skippedrecords — number
- resultcomplete — integer
These containers are shown in example responses. :contentReference[oaicite:5]{index=5} :contentReference[oaicite:6]{index=6}
SalaryPayment Fields (full list)
Each item in salarypayments may include the following fields:
- number (string) — Not used when doing a GET
- ID (string) — Required when doing a GET
- status (int)
- period (string)
- personnumber (int)
- persondataid (string)
- paydate (string)
- periodstartdate (string)
- periodenddate (string)
- taxdays (int)
- ahwdate (string)
- tax (int)
- taxableincome (int)
- workdays (int)
- paid (int)
- pensionsystem (string)
- additionalinformation (string)
- costunit (string)
- pekkashours (int)
- locked (int)
- approved (int)
- finalized (string)
- cbacode (string)
- taxbasepercentage (int)
- taxadditionalpercentage (int)
- taxperiodlimit (int)
- taxyearlimit (int)
- taxpercentage1 (int)
- taxpercentage2 (int)
- taxpercentage3 (int)
- taxpercentage4 (int)
- taxlimit1 (int)
- taxlimit2 (int)
- taxlimit3 (int)
- taxlimit4 (int)
- taxmethod (int)
- paymentgroup (string)
- employmentstartdate (string)
- healtinsurancepercentage (int)
- iban1 (string)
- bic1 (string)
- iban2 (string)
- bic2 (string)
- sumiban1 (int)
- sumiban2 (int)
- personname (string)
- personaddress1 (string)
- personaddress2 (string)
- personaddress3 (string)
- taxinfotext (string)
- periodtext (string)
- taxdescription (string)
- noprint (int)
- tagged (int)
- errorflag (int)
- datelocked (int)
- phase (int)
- accountinggroup (string)
- insuranceexceptions (string)
- handler (string)
- jobdescription (string)
- group (string)
- worktypeddays (int)
- hours (int)
- ahwhours (int)
- importdate (string)
- importtype (int)
- incomeregid (string)
- incomeregdate (string)
- incomeregadditionalid (string)
- incomeregstatus (int)
- incomeregisterduedays (int)
- incomeregversion (int)
- incomeregtime (int)
- incomeregtag (int)
- text (string)
- message (string)
Full field list and notes (“Not used when doing a GET”, “Required when doing a GET”) are taken from the SalaryPayments section. :contentReference[oaicite:7]{index=7} :contentReference[oaicite:8]{index=8}
Error Response
If an error occurs, the service returns a list named ServiceErrors with these fields:
- ErrorNumber (int)
- ErrorPosition (string[255])
- ErrorRecordID (string[255])
- ErrorDescription (string[255])
- ErrorRecomendation (string[255])
Error list structure per documentation. :contentReference[oaicite:9]{index=9}
Examples
GET example (as plain text)
GET /payments?personnumber=12345&period=202501&maxrecords=100 HTTP/1.1
Authorization: Basic ZGVtbzpkZW1v
Host: testapi.esalary.fi
Accept: application/json
GET request format sourced from the GET section. :contentReference[oaicite:10]{index=10}
POST example (as plain text)
POST /payments HTTP/1.1
Authorization: Basic ZGVtbzpkZW1v
Host: testapi.esalary.fi
Accept: application/json
Content-Type: application/json
{
"personnumber": "12345",
"period": "202501",
"maxrecords": 100,
"skiprecords": 0
}
POST request and sample body per the JSON POST section. :contentReference[oaicite:11]{index=11}
Example success response (as plain text)
{
"payments_response": {
"salarypayments": [ { ... } ],
"skippedrecords": 0,
"resultcomplete": 1
}
}
Response container and fields are shown consistently across the examples. :contentReference[oaicite:12]{index=12}