Skip to content

Calculations ​

Beta

Salaxy API v04 is in beta: it may change, and it is not used in production yet. Build on v03, the current version.

Salary Calculations CRUD functionality as well as additional helper methods.

Salaxy API v04 (beta), Finland only. 22 operations. Interactive version: REST API reference. Machine-readable: OpenAPI document.

The reference wins

These pages are generated from the OpenAPI document. If a guide and this reference disagree about a field, follow the reference. Error responses are not in the document — see Errors.

GET /v04/api/calculations ​

Returns list of all calculations for the current employer. Both editable and readonly calculations are returned.

ParameterInTypeRequiredDescription
$searchquerystring
$filterquerystringSpecifies the logic to pull back a subset of records.
$orderbyquerystringSpecifies the values used to sort the collection of entries.
$selectquerystringThe $select system query option allows the clients to requests a limited set of properties for each entry.
$topquerynumberSpecifies the subset of entries by count.
$skipquerynumberSpecifies the count of entries to skip.
$countquerybooleanIndicates whether or not to include a total entry count.

Response: PageResultOfCalculationListItem

Try it: interactive reference

POST /v04/api/calculations ​

Creates or updates a calculation.

Request body: Calculation (required)

Response: Calculation

Try it: interactive reference

GET /v04/api/calculations/set ​

Returns Calculation objects for given identifiers.

ParameterInTypeRequiredDescription
idsquerystring[]Unique identifiers for the objects.

Response: Calculation[]

Try it: interactive reference

GET /v04/api/calculations/employment/{employmentId} ​

Gets the Calculation objects for a specific Employment relation.

ParameterInTypeRequiredDescription
employmentIdpathstringyesThe employment relation for which to list the Calculations.

Response: Calculation[]

Try it: interactive reference

GET /v04/api/calculations/employment/set ​

Returns Calculation objects for given Employment relations.

ParameterInTypeRequiredDescription
employmentIdsquerystring[]Set of employmentIds for which to get the Calculation objects.

Response: Calculation[]

Try it: interactive reference

GET /v04/api/calculations/{id} ​

Gets a single Calculation object based on identier

ParameterInTypeRequiredDescription
idpathstringyesUnique identifier for the object

Response: Calculation

Try it: interactive reference

DELETE /v04/api/calculations/{id} ​

Deletes a Calculation object from the storage

ParameterInTypeRequiredDescription
idpathstringyesUnique identifier for the object

Response: string

Try it: interactive reference

GET /v04/api/calculations/new ​

Factory method that creates a new Calculation object

Response: Calculation

Try it: interactive reference

GET /v04/api/calculations/copy/{id} ​

Gets a copy of a paid or template calculation and creates a new draft based on that calculation. Note that this method just returns a copy of the calculation, it does not save it yet to the DB.

ParameterInTypeRequiredDescription
idpathstringyesUnique identifier for the object
startDatequerystringWork start date for the new salary calculation
endDatequerystringWork end date for the new salary calculation
numberOfDaysqueryinteger>Number of days for the new calculation.

Response: Calculation

Try it: interactive reference

GET /v04/api/calculations/cancel/{id} ​

Cancels the invoice or payment processing for the given calculation. Please note that this is possible only if the payment channel supports the cancel action.

ParameterInTypeRequiredDescription
idpathstringyesIdentifier of the Calculation to be cancelled.

Response: Calculation

Try it: interactive reference

GET /v04/api/calculations/repair/{id} ​

Gets a copy of a paid calculation for repair.

ParameterInTypeRequiredDescription
idpathstringyesUnique identifier for the object

Response: Calculation

Try it: interactive reference

POST /v04/api/calculations/repair ​

Updates the repair calculation.

Request body: ReportingCalculation (required)

Response: Calculation

Try it: interactive reference

POST /v04/api/calculations/repair/commit ​

Replaces the original calculation with the given calculation. The original id field of the calculation is used to identify the original calculation.

Request body: ReportingCalculation (required)

Response: Calculation

Try it: interactive reference

GET /v04/api/calculations/{id}/document-flow ​

Returns document flow for the given calculation.

ParameterInTypeRequiredDescription
idpathstringyesId of the calculation

Response: DocumentFlowItem

Try it: interactive reference

POST /v04/api/calculations/sharing/{calculationId} ​

Create or remove a sharing to a given calculation.

ParameterInTypeRequiredDescription
calculationIdpathstringyesIdentifier of the calculation.
typequerySharingUriTypeSharing method. For typical sharing scenarios, use 'url'.
employerIdquerystringId of the employer to share the calculation with.
toquerystringEmployer email address.
ccquerystringAdress for the copy of the email.
messagequerystringMessage to the employer.

Response: CalculationSharing

Try it: interactive reference

POST /v04/api/calculations/sharing/{calculationId}/notification ​

Notify the employer from the shared calculation.

ParameterInTypeRequiredDescription
calculationIdpathstringyesIdentifier of the calculation.
toquerystringEmployer email address.
ccquerystringAdress for the copy of the email.
messagequerystringMessage to the employer.

Response: boolean

Try it: interactive reference

POST /v04/api/calculations/update-from-employment ​

Updates a calculation from employment relation by deleting all the rows and re-setting the employment. If the calculation has an ID, it is saved, if not it is just recalculated.

ParameterInTypeRequiredDescription
savequerybooleanIf true, saves the calculation. If false just recalculates. If omitted, saves if the calculation has an id, otherwise just recalculates. The null value may be removed when all clients are updated (defaults to false).
updateRowsquerybooleanIf true, updates also the default salary rows from employment data to calculation. False updates only other employment data. Null currently defaults to True for backward compatibility, but it may be removed (or default to false) in future versions (when all clients are updated).

Request body: Calculation (required)

Response: Calculation

Try it: interactive reference

POST /v04/api/calculations/update-to-employment ​

Updates (saves) the employment related information from Calculation to Employment relation. Currently only updates rows, OccupationCode and WorkDescription.

Request body: Calculation (required)

Response: string

Try it: interactive reference

POST /v04/api/calculations/worktime ​

Gets the worktime data for Period recalculation from raw calc fetching holidays and absences data from storage. These determine how holiday salaries etc. and absence deductions will be added as rows to calculations. The idea is that user can still modify these before the actual calculation is done as often manual adjustments need to be made. Also, providers that do not use HolidayYears and Absences can skip this step and use recalculate-worktime directly.

Request body: Calculation (required)

Response: CalcWorktime

Try it: interactive reference

GET /v04/api/calculations/epr/{id} ​

Gets the EarningsPayment object for a specific calculation.

ParameterInTypeRequiredDescription
idpathstringyesThe calculation for which to list the EarningsPayments.

Response: object

Try it: interactive reference

POST /v04/api/calculations/epr ​

Converts a calculation to EarningsPayment object.

Request body: ReportingCalculation (required)

Response: object

Try it: interactive reference

POST /v04/api/calculations/ir ​

Saves the IR related data (rows and salary date) to a calculation.

Request body: Calculation (required)

Response: Calculation

Try it: interactive reference

Every page is also available as Markdown: add .md to its URL — a folder page such as white-label/ is white-label/index.md. Index for LLMs: llms.txt. Questions: Support.