General - Create a day template
API Url
Use it to create a new day template
POST
http://localhost:16010/ProMarkRESTweb/General/day-templates
Permissions: user
Request example:
{"request": {"data": {"dayTemplates": [{"id": 417,"name": "Day template name","templateValue": {"registrations": [{"isDeleted": false,"empId": "2572","attendanceDate": "2022-07-11","regTime": "2022-07-11T06:00:00.000Z","type": "AN","description": "Number supplement","numberSupplement": {"id": "AARSLEFF","description": "Aarsleff","value": 1,"extraData": ""},"transSeq": -1}]},"ownerID": "418"}]}}}
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| day-templates | Object[] | |
| id | String | The ID of the day template. |
| name | String | The name of the day template. |
| ownerID | String | The ID of the owner |
| role | Integer | The role associated with the day template 0 user 1 employee. |
| templateValue | Object | The object JSON body of the day template. |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "warning""info" |
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. |