General - Get periods

API Url

Use it for loading period list .

GET
http://localhost:16010/ProMarkREST/rest/General/periods

Permissions: user

Query parameters

FieldTypeDescription
dateoptionalDate

Date to qurey from.

empIdoptionalString

Employee ID.

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 requested no. of backward periods including input date. If not defined, it is set to false.

periodProfileIdoptionalString

Period profile id.

takeoptionalNumber

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.

      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.