timeman.open
The method starts new workday or continues closed or paused workday.
Parameters
Parameter | Description |
---|---|
USER_ID | User ID. Optional, by default, current user settings are returned. |
TIME | Workday 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. |
REPORT | Reason to modify workday time. Required when specifying TIME parameter and with disabled flexible hours for a user. |
LAT | Geogaphic latitude for workday start. Optional. |
LON | Geogaphic 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 | Value | Description | Note |
---|---|---|---|
STATUS | string | Current workday status. | Value variations:
|
TIME_START | datetime | Date/time of workday start. | Hour zone corresponds to the hour zone when workday starts |
TIME_FINISH | datetime | Date/time of workday finish | For unclosed workday, null is returned |
DURATION | HH:MM:SS | Workday duration | For unclosed workday, 00:00:00 is returned. |
TIME_LEAKS | HH:MM:SS | Summary duration for the break for a day. | |
ACTIVE | true|false | Workday confirmation | 'False' value signifies that the modification of workday awaits for manager's confirmation. |
IP_OPEN | string | IP-address, from which the workday was opened | |
IP_CLOSE | string | IP-address, from which the workday was closed | For unclosed workday, null is returned |
LAT_OPEN | double | Geographic latitude of point where workday was started | |
LON_OPEN | double | Geographic longitude of the point where workday was started | |
LAT_CLOSE | double | Geographic latitude of point where workday was closed | |
LON_CLOSE | double | Geographic longitude of the point where workday was closed | |
TZ_OFFSET | int | Time zone offset for user | Implies 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_DEFAULT | datetime | Time when the workday is closed by default | Displays 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