This method closes current workday.


USER_IDUser ID. Optional, by default, current user settings are returned.
TIMEWorkday closing time. Optional, by default, workday closes at the current moment in the same hour zone, in which the workday was started. Date should match with the date when the workday started.
REPORTReason to modify workday time. Required when specifying TIME parameter and with disabled flexible hours for a user.
LATGeogaphic latitude for workday start. Optional.
LON Geogaphic longitude for workday start. Optional.

If the hour zone of workday closing time is different from the hour zone of workday starting time, then the time will be re-calculated into hour zone of workday start.

Response field:

Field ValueDescriptionNote
STATUSstringCurrent workday status.Value variations:
  • OPENED - workday is ongoing
  • CLOSED - workday is closed
  • PAUSED - workday is paused
  • EXPIRED - workday has expired (was opened prior to start of current calendar day and was not closed)
TIME_STARTdatetimeDate/time of workday start.Hour zone corresponds to the hour zone when workday starts
TIME_FINISHdatetimeDate/time of workday finishFor unclosed workday, null is returned
DURATIONHH:MM:SSWorkday durationFor unclosed workday, 00:00:00 is returned.
TIME_LEAKSHH:MM:SSSummary duration for the break for a day.
ACTIVEtrue|falseWorkday confirmation'False' value signifies that the modification of workday awaits for manager's confirmation.
IP_OPENstringIP-address, from which the workday was opened
IP_CLOSEstringIP-address, from which the workday was closedFor unclosed workday, null is returned
LAT_OPENdoubleGeographic latitude of point where workday was started
LON_OPENdoubleGeographic longitude of the point where workday was started
LAT_CLOSEdoubleGeographic latitude of point where workday was closed
LON_CLOSEdoubleGeographic longitude of the point where workday was closed
TZ_OFFSETintTime zone offset for userImplies the time zone where workday was started. When closing the day, the closing time is recorded with an offset to the time zone, when the day was started.
TIME_FINISH_DEFAULTdatetimeTime when a workday is closed by defaultDisplays only for workdays with EXPIRED status. It is "Recommended" value for closing a workday, which can be shown to a user as by default value.


Call example:

Response example:

    "result": {
        "STATUS": "CLOSED", 
        "TIME_START": "2017-04-21T07:30:00+08:00", 
        "TIME_FINISH": "2017-04-21T16:30:00+08:00", 
        "DURATION": "09:00:00", 
        "TIME_LEAKS": "00:00:00", 
        "ACTIVE": false, 
        "IP_OPEN": "", 
        "IP_CLOSE": "", 
        "LAT_OPEN": 54.7199881, 
        "LON_OPEN": 20.4879224, 
        "LAT_CLOSE": 52.5162434, 
        "LON_CLOSE": 13.3774829, 
        "TZ_OFFSET": 28800

© «Bitrix24», 2001-2023