General - Get single day profile

API Url

Use it for loading a single day profile

GET
http://localhost:16010/ProMarkREST/rest/General/day-profiles/{id}

Permissions: user

Request headers

FieldTypeDescription
Accept-LanguageoptionalString

=en-GB Language use for localization.

X-ClientoptionalString

=Client type.

Allowed values:"Portal""Mobile""Admin"
X-RoleoptionalNumber

ProMark role (1: Employee, 2: User).

Allowed values:{12}
X-WebPart-IdoptionalNumber

Unique web-part identifier.

Path parameters

FieldTypeDescription
idNumber

The day profile ID.

Query parameters

FieldTypeDescription
dateoptionalDate

Date of query. Used for determening the employee category for restrictions. Default is TODAY.(empId and date are only used for HoursPerDay field)

empIdoptionalString

Employee ID. Default is the current session employee will be used.

fieldsoptionalString

Comma delimited list of fields to get.

Success 200

FieldTypeDescription
    dayProfilesObject[]
      backColoroptionalString

Background color as HEX without #.

      descriptionString

Description of the Day Profile.

      foreColoroptionalString

Foreground color as HEX without #.

      hoursPerDayoptionalNumber

Day profile's hoursPerDay in seconds.

      idString

Day profile ID.

      inactiveBoolean

true = day profile is inactive.

      normalTimeStartoptionalNumber

Day profile's normal start time in seconds after midnight.

      normalTimeStopoptionalNumber

Day profile's normal stop time in seconds after midnight.

Success example:

HTTP/1.1 200 OK
{
"response":{
"data":{
"dayProfile":{
"id": 20002,
"description": "Funktionr m/overarb.",
"normalTimeStart": 28800,
"normalTimeStop": 72000,
"foreColor": "white",
"backColor": "red",
"inactive": false,
"hoursPerDay": 288000
}
},
"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.