General - Get employee periods
API Url
Use it for loading profile periods for a specific employee.
http://localhost:16010/ProMarkREST/rest/General/employees/{id}/periods
Permissions: user
Query parameters
| Field | Type | Description |
|---|---|---|
datetime-tzoptional | Date | Date to query from. |
firstOpenPeriodoptional | Boolean | 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. |
forwardoptional | Boolean | 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. |
periodProfileIdoptional | String | Period profile id. |
periodStatusoptional | Boolean | Period approval status If periodStatus = true, it retrieves additional period approval status details. If not defined, it is set to false. |
takeoptional | integer | Maximum number of records to get (default is 10). |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| periods | Object[] | Objects containing the periods. |
| from | Date | Start Date of the period. |
| periodStatus | Number | 0:No approval, 2:Approval, 3:Approved, 4:Rejected |
| status | Number | 1:Open, 2:Under validation, 3:Closed-editable, 4: Closed |
| to | Date | End Date of the period. |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "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
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data (empty). |
| errorCode | Number | Error code. |
| errorMessage | String | Error description. |