Documentation

timeman.open

The method starts new workday or continues closed or paused workday.

Parameters

ParameterDescription
USER_IDUser ID. Optional, by default, current user settings are returned.
TIMEWorkday starting time. Optional, by default, workday starts at the current moment with the saved hour zone of the employee. Date should match with the current calendar date.
REPORTReason to modify workday time. Required when specifying TIME parameter and with disabled flexible hours for a user.
LATGeogaphic latitude for workday start. Optional.
LONGeogaphic longitude for workday start. Optional.

Time zone from TIME parameter is deemed as the time zone of the current workday. Time in this time zone is displayed to the user, and the closing time is recorded in this time zone, even if was specified in another time zone. TIME parameter is accepted only if the workday is in the CLOSED status. In all the rest of cases an error is returned.

Response fields:

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 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 the workday is closed by defaultDisplays only for workdays with EXPIRED status. It is a "Recommended" value for closing a workday, which can be shown to a user as the default value.

Example

Call example:

https://portal.bitrix24.com/rest/timeman.open?auth=xxxxxx&time=2017-04-21T07%3A30%3A00%2B08%3A00&report=Forgot&lat=54.7199881&lon=20.4879224&user_id=5

Response example:

{
    "result": {
        "STATUS": "OPENED", 
        "TIME_START": "2017-04-21T07:30:00+08:00", 
        "TIME_FINISH": null, 
        "DURATION": "00:00:00", 
        "TIME_LEAKS": "00:00:00", 
        "ACTIVE": false, 
        "IP_OPEN": "192.168.1.1", 
        "IP_CLOSE": "", 
        "LAT_OPEN": 54.7199881, 
        "LON_OPEN": 20.4879224, 
        "LAT_CLOSE": 0, 
        "LON_CLOSE": 0, 
        "TZ_OFFSET": 28800
    }
}


© «Bitrix24», 2001-2024