ROSEPEOPLE Developers - Web API Reference

GET Operations

GET EarningNatures

Returns the list of all the entity records available.

Response:

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

Response status codes:

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

Resource URL:

GET /payrollCore/earningNatures

GET EarningNatures (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 EarningNatureResource.

Response status codes:

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

Resource URL:

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

GET EarningNature 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 EarningNatureResource.

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/earningNatures/{id}

GET EarningNature by key

Returns the entity record that matches the specified key.

The following elements are required:

earningNatureKey (string) Earning Nature.

Response:

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

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/earningNatures/{earningNatureKey}

GET Print EarningNature 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/earningNatures/{id}/print?template={template}

GET Print EarningNature by key

Prints the specified entity record.

The following elements are required:

earningNatureKey (string) Earning Nature.

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/earningNatures/{earningNatureKey}/print

GET Original Print EarningNatureOriginal 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/earningNatures/{id}/printOriginal?template={template}

GET Original Print EarningNature by key

Prints the specified entity record.

The following elements are required:

earningNatureKey (string) Earning Nature.

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/earningNatures/{earningNatureKey}/printOriginal

POST Operations

POST EarningNatures

Creates a new entity record.

The following elements are required:

earningNatureResource (ApiEarningNatureResource) The request body should contain the entity record that should be created.
See ApiEarningNatureResource.

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 ApiEarningNatureResource.

Response status codes:

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

Resource URL:

POST /payrollCore/earningNatures

POST Earning Nature

Inserts a new 'Nature Deduction' in the 'Earning Nature'.

The following elements are required:

earningNatureKey (string) Earning Nature.
value (ApiEarningNatureNatureDeductionsResource) The ApiEarningNatureNatureDeductionsResource instance.
See ApiEarningNatureNatureDeductionsResource.

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/earningNatures/{earningNatureKey}/natureDeductions

PUT Operations

PUT Set Currency EarningNature

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

The following elements are required:

earningNatureKey (string) Earning Nature.
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/earningNatures/{earningNatureKey}/currency

PUT Set CurrentConfiguration NatureDeduction

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

The following elements are required:

earningNatureKey (string) Earning Nature.
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/earningNatures/{earningNatureKey}/natureDeductions/{lineId}/currentConfiguration

PUT Set Deduction NatureDeduction

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

The following elements are required:

earningNatureKey (string) Earning Nature.
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/earningNatures/{earningNatureKey}/natureDeductions/{lineId}/deduction

PUT Set EarningNatureKey EarningNature

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

The following elements are required:

earningNatureKey (string) Earning Nature.
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/earningNatures/{earningNatureKey}/earningNatureKey

PUT Set EarningNatureKind EarningNature

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

The following elements are required:

earningNatureKey (string) Earning Nature.
value (enum EarningNatureKind) The request body should contain the new value for the attribute.
See EarningNatureKind.

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/earningNatures/{earningNatureKey}/earningNatureKind

PUT Set IsActive EarningNature

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

The following elements are required:

earningNatureKey (string) Earning Nature.
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/earningNatures/{earningNatureKey}/isActive

PUT Set Name EarningNature

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

The following elements are required:

earningNatureKey (string) Earning Nature.
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/earningNatures/{earningNatureKey}/name

DELETE Operations

DELETE Nature Deduction by identifier

Deletes the entity record that matches the specified identifier.

The following elements are required:

earningNatureKey (string) Earning Nature.
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/earningNatures/{earningNatureKey}/natureDeductions/{lineId}

DELETE EarningNature 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/earningNatures/{id}

DELETE EarningNature by key

Deletes the entity record that matches the specified key.

The following elements are required:

earningNatureKey (string) Earning Nature.

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/earningNatures/{earningNatureKey}

Resources


ApiEarningNatureNatureDeductionsNatureDeductionPeriodsResource

The following elements are required:

startPeriod (DateTime) Start Period.
calculationBaseType (enum CalculationBaseType) Calculation Base Type.
See CalculationBaseType.
baseValue (decimal) Base Value.
contrTaxBracket (bool) Contributes to tax bracket.
exemptUntilKind (enum QuantityKind) Exempt Until Kind.
See QuantityKind.
exemptUntil (MoneyResource) PT translation: "Não sujeito até".
See MoneyResource .
exemptAfter (MoneyResource) PT translation: "Não sujeito após".
See MoneyResource .
baseValueClassification (string) Base Value Classification.
currency (string) Currency.
showContrTaxBracket (bool) Is Visible.

The following elements are optional:

endPeriod (DateTime) End Period.
exemptUntilFormula (string) Exempt Until Formula.
exemptValueClassification (string) PT translation: "Classificação de valor não sujeito".
freeValueClassification (string) PT translation: "Classificação de valor isento de incidência".


ApiEarningNatureNatureDeductionsResource

The following elements are required:

deduction (string) Deduction.

The following elements are optional:

currentConfiguration (string) Current Configuration.
natureDeductionPeriods (List of ApiEarningNatureNatureDeductionsNatureDeductionPeriodsResource) Nature Deduction Periods.
See ApiEarningNatureNatureDeductionsNatureDeductionPeriodsResource.


ApiEarningNatureResource

The following elements are required:

earningNatureKey (string) Earning Nature.
name (string) Name.
contractKind (enum ContractKind) Applicable to contracts of.
See ContractKind.

The following elements are optional:

earningNatureKind (enum EarningNatureKind) Earning Nature Kind.
See EarningNatureKind.
currency (string) Currency.
natureDeductions (List of ApiEarningNatureNatureDeductionsResource) Nature Deductions.
See ApiEarningNatureNatureDeductionsResource.


EarningNatureResource

The following elements are required:

earningNatureKey (string) Earning Nature.
name (string) Name.
contractKind (enum ContractKind) Applicable to contracts of.
See ContractKind.

The following elements are optional:

earningNatureKind (enum EarningNatureKind) Earning Nature Kind.
See EarningNatureKind.
currency (string) Currency.
(fk) Allowed value: the natural key of a record of type Currency.
natureDeductions (List of NatureDeductionResource) Nature Deductions.
See NatureDeductionResource.


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.



NatureDeductionPeriodResource

The following elements are required:

startPeriod (DateTime) Start Period.
calculationBaseType (enum CalculationBaseType) Calculation Base Type.
See CalculationBaseType.
baseValue (decimal) Base Value.
contrTaxBracket (bool) Contributes to tax bracket.
exemptUntilKind (enum QuantityKind) Exempt Until Kind.
See QuantityKind.
exemptUntil (MoneyResource) PT translation: "Não sujeito até".
See MoneyResource .
exemptAfter (MoneyResource) PT translation: "Não sujeito após".
See MoneyResource .
baseValueClassification (string) Base Value Classification.
currency (string) Currency.
showContrTaxBracket (bool) Is Visible.

The following elements are optional:

endPeriod (DateTime) End Period.
exemptUntilFormula (string) Exempt Until Formula.
exemptValueClassification (string) PT translation: "Classificação de valor não sujeito".
freeValueClassification (string) PT translation: "Classificação de valor isento de incidência".


NatureDeductionResource

The following elements are required:

deduction (string) Deduction.

The following elements are optional:

currentConfiguration (string) Current Configuration.
natureDeductionPeriods (List of NatureDeductionPeriodResource) Nature Deduction Periods.
See NatureDeductionPeriodResource.


Enumerations


CalculationBaseType

1 UnitValue
2 Value


ContractKind

1 Employment
2 Service


EarningNatureKind

1 BaseAllowance
2 VacationAllowance
3 ChristmasAllowance
4 MealAllowance
5 OvertimeAllowance


QuantityKind

1 Value
2 Formula