General - Get employee periods

API Url

Use it for loading profile periods for a specific employee.

GET
http://localhost:16010/ProMarkREST/rest/General/employees/{id}/periods

Permissions: user

Query parameters

FieldTypeDescription
datetime-tzoptionalDate

Date to query from.

firstOpenPeriodoptionalBoolean

If firstOpenPeriod = true, it sets date to query from to first open period. If date is defined If not defined or date is defined, it is set to false.

forwardoptionalBoolean

If forward = true, it returns no. of forward periods compared to input date including input date. And if it is false then it returns no. of backward periods including input date. If not defined, it is set to false.

periodProfileIdoptionalString

Period profile id.

periodStatusoptionalBoolean

Period approval status If periodStatus = true, it retrieves additional period approval status details. If not defined, it is set to false.

takeoptionalinteger

Maximum number of records to get (default is 10).

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    periodsObject[]

Objects containing the periods.

      fromDate

Start Date of the period.

      periodStatusNumber

0:No approval, 2:Approval, 3:Approved, 4:Rejected

      statusNumber

1:Open, 2:Under validation, 3:Closed-editable, 4: Closed

      toDate

End Date of the period.

  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": {
"periods": [
{
"status": 1,
"from": "2017-06-30",
"to": "2017-07-31"
}
]
},
"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.