timeman.close
This method closes current workday.
Parameters
Parameter | Decription |
---|---|
USER_ID | User ID. Optional, by default, current user settings are returned. |
TIME | Workday 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. |
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. |
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 | 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 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_DEFAULT | datetime | Time when a workday is closed by default | Displays 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. |
Examples
Call example:
https://portal.bitrix24.com/rest/timeman.close?auth=xxxxx&time=2017-04-21T17%3A30%3A00%2B09%3A00&report=test&lat=52.5162434&lon=13.3774829&user_id=5
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": "192.168.0.1", "IP_CLOSE": "192.168.0.100", "LAT_OPEN": 54.7199881, "LON_OPEN": 20.4879224, "LAT_CLOSE": 52.5162434, "LON_CLOSE": 13.3774829, "TZ_OFFSET": 28800 } }
© «Bitrix24», 2001-2024