Supplement - Post allowance rates

API Url

Used for creating allowance rates

POST
http://localhost:16010/ProMarkREST/rest/Supplement/allowance-rates

Permissions: user

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

      addendaIdString

Supplement Id

      addendaTypeNumber

Supplement type

      employeeIdString

Employee Id

      fromDateDate

Allowance rate from date

      patchAreaString

Patch Area

      projectIdString

Project Id

      rateDecimal

Allowance rate

      toDateDate

Allowance rate to date

      unitTypeNumber

unitType

      versionNumber

Version

Request example:

{
"request": {
"data": {
"allowanceRates": [
{
"employeeId": "1293",
"projectId": "MDCPROJECT",
"addendaId": "0A",
"unitType": 1
"fromDate": "2019-09-01",
"toDate": "2019-09-02",
"rate": 100,
"version": 0,
"patchArea": "",
"addendaType": 0,
}
]
}
}
}

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    allowanceRatesObject[]

Collection of allowance rates

      addendaIdString

Supplement Id

      addendaTypeNumber

Supplement type

      createdDate

Date when the record was created

      createdByString

Who created the record

      employeeIdString

Employee Id

      fromDateDate

Allowance rate from date

      idNumber

Unique identifier for the allowance rate

      patchAreaString

Patch Area

      projectIdString

Project Id

      rateDecimal

Allowance rate

      toDateDate

Allowance rate to date

      unitTypeNumber

unitType

      versionNumber

Version

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Success example:

HTTP/1.1 200 OK
{
"response": {
"data": {
"allowanceRates": [
{
"id": 2163959395,
"employeeId": "1292",
"projectId": "AARSLEFFII",
"addendaId": "0A",
"fromDate": "2019-09-01",
"toDate": "2019-09-02",
"rate": 93.0,
"created": "2019-10-23",
"createdBy": "SBAA",
"version": 0,
"patchArea": "",
"addendaType": 0,
"unitType": 1
}
]
},
"errorCode": 0,
"errorMessage": ""
}
}

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.

Error example:

HTTP/1.1 200 OK
{
"response": {
"errorCode": 5,
"errorMessage": "No allowance rate"
}
}