ROSEPEOPLE Developers - Web API Reference

Payroll | Earning

Service to manage entities of type 'Earning'.

Overview


URL api/{tenantKey}/{orgKey}/payrollCore/earnings
Methods Supported GET, POST, PUT, DELETE

All Operations

This service includes the following operations:

All Resources

This service uses the following resources:

All Enumerations

This service uses the following enumerations:

GET Operations

GET Earnings

Returns the list of all the entity records available.

Response:

When successful, the response body contains the list of records available. See EarningResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

GET /payrollCore/earnings

GET Earnings (paged)

Returns a page of the list of all the entity records available.

The following elements are optional:

page (int) The index of the page of the list that should be returned. This is a query string parameter.
pageSize (int) The number of page elements that should be returned (max. is 1000). This is a query string parameter.

Response:

When successful, the response body contains the list of records available. See EarningResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

GET /payrollCore/earnings?page={page}&pageSize={pageSize}

GET Earning by identifier

Returns the entity record that matches the specified identifier.

The following elements are required:

id (string) The record identifier.

Response:

When successful, the response body contains the entity record. See EarningResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /payrollCore/earnings/{id}

GET Earning by key

Returns the entity record that matches the specified key.

The following elements are required:

earningKey (string) Earning.

Response:

When successful, the response body contains the entity record. See EarningResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /payrollCore/earnings/{earningKey}

GET Print Earning by identifier

Prints the specified entity record.

The following elements are required:

id (string) The record identifier.

The following elements are optional:

template (string) The report template that should be used. This is a query string parameter.

Response:

When successful, the response body contains a stream with the printed file.

Response status codes:

200 OK. The operation was completed successfully.
404 NotFound. The specified resord does not exist.

Resource URL:

GET /payrollCore/earnings/{id}/print?template={template}

GET Print Earning by key

Prints the specified entity record.

The following elements are required:

earningKey (string) Earning.

The following elements are optional:

template (string) The report template that should be used. This is a query string parameter.

Response:

When successful, the response body contains a stream with the printed file.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /payrollCore/earnings/{earningKey}/print

GET Original Print EarningOriginal by identifier

Prints the specified entity record.

The following elements are required:

id (string) The record identifier.

The following elements are optional:

template (string) The report template that should be used. This is a query string parameter.

Response:

When successful, the response body contains a stream with the printed file.

Response status codes:

200 OK. The operation was completed successfully.
404 NotFound. The specified resord does not exist.

Resource URL:

GET /payrollCore/earnings/{id}/printOriginal?template={template}

GET Original Print Earning by key

Prints the specified entity record.

The following elements are required:

earningKey (string) Earning.

The following elements are optional:

template (string) The report template that should be used. This is a query string parameter.

Response:

When successful, the response body contains a stream with the printed file.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /payrollCore/earnings/{earningKey}/printOriginal

POST Operations

POST Earnings

Creates a new entity record.

The following elements are required:

earningResource (ApiEarningResource) The request body should contain the entity record that should be created.
See ApiEarningResource.

Response:

When successful, the response body contains the new entity record identifier. The resource header location property contains the URL for the new entity record. See ApiEarningResource.

Response status codes:

201 Created. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

POST /payrollCore/earnings

POST Earning

Inserts a new 'Period Earning' in the 'Earning'.

The following elements are required:

earningKey (string) Earning.
value (ApiEarningPeriodEarningsResource) The ApiEarningPeriodEarningsResource instance.
See ApiEarningPeriodEarningsResource.

Response:

When successful, the response body is empty.

Response status codes:

204 NoContent. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

POST /payrollCore/earnings/{earningKey}/periodEarnings

POST Earning

Inserts a new 'Earning Tag' in the 'Earning'.

The following elements are required:

earningKey (string) Earning.
value (ApiEarningTagsResource) The ApiEarningTagsResource instance.
See ApiEarningTagsResource.

Response:

When successful, the response body is empty.

Response status codes:

204 NoContent. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

POST /payrollCore/earnings/{earningKey}/tags

PUT Operations

PUT Set Aggregation Earning

Updates the value of attribute 'Aggregation' in the specified entity record.

The following elements are required:

earningKey (string) Earning.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /payrollCore/earnings/{earningKey}/aggregation

PUT Set BaseEarningClassification Earning

Updates the value of attribute 'BaseEarningClassification' in the specified entity record.

The following elements are required:

earningKey (string) Earning.
value (enum BaseEarningClassification) The request body should contain the new value for the attribute.
See BaseEarningClassification.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /payrollCore/earnings/{earningKey}/baseEarningClassification

PUT Set ContractKind Earning

Updates the value of attribute 'ContractKind' in the specified entity record.

The following elements are required:

earningKey (string) Earning.
value (enum ContractKind) The request body should contain the new value for the attribute.
See ContractKind.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /payrollCore/earnings/{earningKey}/contractKind

PUT Set Currency PeriodEarning

Updates the value of attribute 'Currency' in the specified entity record.

The following elements are required:

earningKey (string) Earning.
lineId (string) The detail identifier.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /payrollCore/earnings/{earningKey}/periodEarnings/{lineId}/currency

PUT Set EarningAccountType Earning

Updates the value of attribute 'EarningAccountType' in the specified entity record.

The following elements are required:

earningKey (string) Earning.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /payrollCore/earnings/{earningKey}/earningAccountType

PUT Set EarningKey Earning

Updates the value of attribute 'EarningKey' in the specified entity record.

The following elements are required:

earningKey (string) Earning.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /payrollCore/earnings/{earningKey}/earningKey

PUT Set EarningValueKind PeriodEarning

Updates the value of attribute 'EarningValueKind' in the specified entity record.

The following elements are required:

earningKey (string) Earning.
lineId (string) The detail identifier.
value (enum EarningValueKind) The request body should contain the new value for the attribute.
See EarningValueKind.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /payrollCore/earnings/{earningKey}/periodEarnings/{lineId}/earningValueKind

PUT Set EndPeriod PeriodEarning

Updates the value of attribute 'EndPeriod' in the specified entity record.

The following elements are required:

earningKey (string) Earning.
lineId (string) The detail identifier.
value (DateTime) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /payrollCore/earnings/{earningKey}/periodEarnings/{lineId}/endPeriod

PUT Set IliqValuePayMethod Earning

Updates the value of attribute 'IliqValuePayMethod' in the specified entity record.

The following elements are required:

earningKey (string) Earning.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /payrollCore/earnings/{earningKey}/iliqValuePayMethod

PUT Set IncludeQtyAndUnValueInReceipt Earning

Updates the value of attribute 'IncludeQtyAndUnValueInReceipt' in the specified entity record.

The following elements are required:

earningKey (string) Earning.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /payrollCore/earnings/{earningKey}/includeQtyAndUnValueInReceipt

PUT Set InKind Earning

Updates the value of attribute 'InKind' in the specified entity record.

The following elements are required:

earningKey (string) Earning.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /payrollCore/earnings/{earningKey}/inKind

PUT Set IsActive Earning

Updates the value of attribute 'IsActive' in the specified entity record.

The following elements are required:

earningKey (string) Earning.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

PUT /payrollCore/earnings/{earningKey}/isActive

PUT Set Name Earning

Updates the value of attribute 'Name' in the specified entity record.

The following elements are required:

earningKey (string) Earning.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /payrollCore/earnings/{earningKey}/name

PUT Set Nature Earning

Updates the value of attribute 'Nature' in the specified entity record.

The following elements are required:

earningKey (string) Earning.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /payrollCore/earnings/{earningKey}/nature

PUT Set PaymentMethod Earning

Updates the value of attribute 'PaymentMethod' in the specified entity record.

The following elements are required:

earningKey (string) Earning.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /payrollCore/earnings/{earningKey}/paymentMethod

PUT Set QuantityFormula PeriodEarning

Updates the value of attribute 'QuantityFormula' in the specified entity record.

The following elements are required:

earningKey (string) Earning.
lineId (string) The detail identifier.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /payrollCore/earnings/{earningKey}/periodEarnings/{lineId}/quantityFormula

PUT Set QuantityKind PeriodEarning

Updates the value of attribute 'QuantityKind' in the specified entity record.

The following elements are required:

earningKey (string) Earning.
lineId (string) The detail identifier.
value (enum QuantityKind) The request body should contain the new value for the attribute.
See QuantityKind.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /payrollCore/earnings/{earningKey}/periodEarnings/{lineId}/quantityKind

PUT Set QuantityValue PeriodEarning

Updates the value of attribute 'QuantityValue' in the specified entity record.

The following elements are required:

earningKey (string) Earning.
lineId (string) The detail identifier.
value (decimal) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /payrollCore/earnings/{earningKey}/periodEarnings/{lineId}/quantityValue

PUT Set StartPeriod PeriodEarning

Updates the value of attribute 'StartPeriod' in the specified entity record.

The following elements are required:

earningKey (string) Earning.
lineId (string) The detail identifier.
value (DateTime) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /payrollCore/earnings/{earningKey}/periodEarnings/{lineId}/startPeriod

PUT Set Tag EarningTag

Updates the value of attribute 'Tag' in the specified entity record.

The following elements are required:

earningKey (string) Earning.
lineId (string) The detail identifier.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /payrollCore/earnings/{earningKey}/tags/{lineId}/tag

PUT Set TagView Earning

Updates the value of attribute 'TagView' in the specified entity record.

The following elements are required:

earningKey (string) Earning.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /payrollCore/earnings/{earningKey}/tagView

PUT Set ValueFormula PeriodEarning

Updates the value of attribute 'ValueFormula' in the specified entity record.

The following elements are required:

earningKey (string) Earning.
lineId (string) The detail identifier.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /payrollCore/earnings/{earningKey}/periodEarnings/{lineId}/valueFormula

PUT Set ValueMoney PeriodEarning

Updates the value of attribute 'ValueMoney' in the specified entity record.

The following elements are required:

earningKey (string) Earning.
lineId (string) The detail identifier.
value (decimal) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /payrollCore/earnings/{earningKey}/periodEarnings/{lineId}/valueMoney

DELETE Operations

DELETE Period Earning by identifier

Deletes the entity record that matches the specified identifier.

The following elements are required:

earningKey (string) Earning.
lineId (string) The line identifier.

Response:

When successful, the response body is empty.

Response status codes:

204 NoContent. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

DELETE /payrollCore/earnings/{earningKey}/periodEarnings/{lineId}

DELETE Earning Tag by identifier

Deletes the entity record that matches the specified identifier.

The following elements are required:

earningKey (string) Earning.
lineId (string) The line identifier.

Response:

When successful, the response body is empty.

Response status codes:

204 NoContent. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

DELETE /payrollCore/earnings/{earningKey}/tags/{lineId}

DELETE Earning by identifier

Deletes the entity record that matches the specified identifier.

The following elements are required:

id (string) The record identifier.

Response:

When successful, the response body is empty.

Response status codes:

204 Deleted. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

DELETE /payrollCore/earnings/{id}

DELETE Earning by key

Deletes the entity record that matches the specified key.

The following elements are required:

earningKey (string) Earning.

Response:

When successful, the response body is empty.

Response status codes:

204 Deleted. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

DELETE /payrollCore/earnings/{earningKey}

Resources


ApiEarningPeriodEarningsResource

The following elements are required:

startPeriod (DateTime) Start Period.
quantityKind (enum QuantityKind) Quantity Kind.
See QuantityKind.
earningValueKind (enum EarningValueKind) Value Kind.
See EarningValueKind.
valueMoney (MoneyResource) Value Money.
See MoneyResource .
currency (string) Currency.

The following elements are optional:

endPeriod (DateTime) End Period.
quantityValue (decimal) Quantity Value.
quantityFormula (string) Quantity Formula.
valueFormula (string) Value Formula.


ApiEarningResource

The following elements are required:

earningKey (string) Earning.
name (string) Name.
nature (string) Nature.
aggregation (string) Aggregation.
inKind (bool) In Kind.
earningAccountType (string) Earning Account Type.
baseEarningClassification (enum BaseEarningClassification) Classification.
See BaseEarningClassification.
iliqValuePayMethod (bool) Iliquid value payment.
includeQtyAndUnValueInReceipt (bool) Add qty. and unit value in receipt.
contractKind (enum ContractKind) Contract Kind.
See ContractKind.

The following elements are optional:

periodEarnings (List of ApiEarningPeriodEarningsResource) Period Earnings.
See ApiEarningPeriodEarningsResource.
tags (List of ApiEarningTagsResource) Tags.
See ApiEarningTagsResource.
tagView (string) Tag View.
paymentMethod (string) Payment Method.


ApiEarningTagsResource

The following elements are required:

tag (string) Tag.


EarningResource

The following elements are required:

earningKey (string) Earning.
name (string) Name.
nature (string) Nature.
(fk) Allowed value: the natural key of a record of type EarningNature. These records are accessibly through the EarningNatures service.
aggregation (string) Aggregation.
(fk) Allowed value: the natural key of a record of type Aggregation. These records are accessibly through the Aggregations service.
inKind (bool) In Kind.
earningAccountType (string) Earning Account Type.
(fk) Allowed value: the natural key of a record of type EarningAccountType. These records are accessibly through the EarningAccountTypes service.
baseEarningClassification (enum BaseEarningClassification) Classification.
See BaseEarningClassification.
iliqValuePayMethod (bool) Iliquid value payment.
includeQtyAndUnValueInReceipt (bool) Add qty. and unit value in receipt.
contractKind (enum ContractKind) Contract Kind.
See ContractKind.

The following elements are optional:

periodEarnings (List of PeriodEarningResource) Period Earnings.
See PeriodEarningResource.
tags (List of EarningTagResource) Tags.
See EarningTagResource.
tagView (string) Tag View.
paymentMethod (string) Payment Method.
(fk) Allowed value: the natural key of a record of type PaymentMethod.


EarningTagResource

The following elements are required:

tag (string) Tag.


MoneyResource

The following elements are required:

amount (decimal) The amount.

The following elements are optional:

baseAmount (decimal) The base amount.
reportingAmount (decimal) The reporting amount.
fractionDigits (int) The fraction digits.
symbol (string) The symbol.

Notes: For the POST operation it is not necessary to send the fields: BaseAmount, ReportingAmount, FractionDigits and Symbol. Will be ignored.



PeriodEarningResource

The following elements are required:

startPeriod (DateTime) Start Period.
quantityKind (enum QuantityKind) Quantity Kind.
See QuantityKind.
earningValueKind (enum EarningValueKind) Value Kind.
See EarningValueKind.
valueMoney (MoneyResource) Value Money.
See MoneyResource .
currency (string) Currency.

The following elements are optional:

endPeriod (DateTime) End Period.
quantityValue (decimal) Quantity Value.
quantityFormula (string) Quantity Formula.
valueFormula (string) Value Formula.


Enumerations


BaseEarningClassification

1 Salary
2 SeniorityBonus
3 ChristmasAllowance
4 VacationAllowance
5 MealAllowance
6 SpecialDutyAllowance
7 HousingAllowance
8 TransportAllowance
9 RepresentationAllowance
10 LongTermBonus
11 ProductivityBonus
12 AttendanceBonus
13 HardshipAllowance
14 DangerousAllowance
15 UnhealthyWorkAllowance
16 ShiftWorkAllowance
17 CashiersAllowance
18 FamilyAllowance
19 Commissions
20 SubsistenceCosts
21 ScheduleExemption
22 OtherBonusAndRegularAllowances
23 ShareOfProfits
24 DistributionOfBondsOrOtherBonuses
25 OtherIrregularInstalments
26 ExceptionalIncreaseOvertime
27 ForceMajeurOvertime
28 Compensations
29 PaymentByVacationDays
30 Fees


ContractKind

1 Employment
2 Service


EarningValueKind

1 Money
2 Formula


QuantityKind

1 Value
2 Formula