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

FieldTypeDescription
responseObject

Main object containing the response data.

    day-templatesObject[]
      idString

The ID of the day template.

      nameString

The name of the day template.

      ownerIDString

The ID of the owner

      roleInteger

The role associated with the day template 0 user 1 employee.

      templateValueObject

The object JSON body of the day template.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.