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:
- GET:
- POST:
-
PUT:
- PUT Set IsActive Earning
- PUT Set EarningKey Earning
- PUT Set Name Earning
- PUT Set InKind Earning
- PUT Set TagView Earning
- PUT Set PaymentMethod Earning
- PUT Set EarningAccountType Earning
- PUT Set BaseEarningClassification Earning
- PUT Set IliqValuePayMethod Earning
- PUT Set IncludeQtyAndUnValueInReceipt Earning
- PUT Set ContractKind Earning
- PUT Set StartPeriod PeriodEarning
- PUT Set EndPeriod PeriodEarning
- PUT Set QuantityKind PeriodEarning
- PUT Set QuantityValue PeriodEarning
- PUT Set QuantityFormula PeriodEarning
- PUT Set EarningValueKind PeriodEarning
- PUT Set ValueMoney PeriodEarning
- PUT Set ValueFormula PeriodEarning
- PUT Set Currency PeriodEarning
- PUT Set Tag EarningTag
- DELETE:
All Resources
This service uses the following resources:
- ApiEarningPeriodEarningsResource
- ApiEarningResource
- ApiEarningTagsResource
- EarningResource
- EarningTagResource
- MoneyResource
- PeriodEarningResource
All Enumerations
This service uses the following enumerations:
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 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 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 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 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 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 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 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:
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 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 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:
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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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:
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 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 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 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:
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 |