DoCheckIn
Performs a checkin on an object
objecttype | string | The object type to check in on. Can be: Customer Todo |
objectid | number | The ID of the object to check in on. In case of a Customer this will be the Customer ID and in case of a Todo this will be the Todo ID |
checkindate | date | Date of checkin |
checkintime | time | Time of checkin |
longitude | float | GPS longitude from where the user performed the checkin |
latitude | float | GPS latitude from where the user performed the checkin |
toolid | number | If a tool is to be included in this checkin, then the ID of the tool can be provided here. |
Output
daycheckindate | date | Daycheckin date, if checked in on a day |
checkinid | number | The MB ID of the check in, should be quoted when calling DoCheckOut |
If the command completes, the checkin is successful.
DoDayCheckIn
Performs a checkin from the day.
checkindate | date | Date of checkin |
checkintime | time | Time of checkin |
longitude | float | GPS longitude from where the user performed the checkin |
latitude | float | GPS latitude from where the user performed the checkin |
Output
daycheckindate | date | Daycheckin date, if checked in on a day |
daycheckintime | time | Daycheckin time, if checked in on a day |
If the command completes, the checkin is successful.
DoCheckInForUser
Performs a checkin on an object, for another user
objecttype | string | The object type to check in on. Can be: Customer Todo |
objectid | number | The ID of the object to check in on. In case of a Customer this will be the Customer ID and in case of a Todo this will be the Todo ID |
checkindate | date | Date of checkin |
checkintime | time | Time of checkin |
longitude | float | GPS longitude from where the user performed the checkin |
latitude | float | GPS latitude from where the user performed the checkin |
userid | number | The ID of the user who will be checked in |
Output
None. If the command completes, the checkin is successful. | - | - |
GetCheckIn
Get a current checkin (if any) on a user.
Output
ischeckedin | boolean | True if checked in |
checkinid | number | The MB ID of the check in |
readable | string | A readable representation of the current checked in object |
objecttype | string | The object type checked in on. Can be: Customer Todo |
objectid | number | The ID of the object to check in on. In case of a Customer this will be the Customer ID and in case of a Todo this will be the Todo ID |
checkindate | date | Date of checkin, only set if ischeckedin=1 |
checkintime | time | Time of checkin, only set if ischeckedin=1 |
daycheckindate | date | The current date that the user is checked in on, if any |
daycheckintime | time | When the user checked in on the day, if any |
checkoutdate | date | Date of last checkout, only set if ischeckedin=0 |
checkouttime | time | Time of last checkout, only set if ischeckedin=0 |
toolid | number | The ID of an equipment that was selected when checking in, or 0 if nothing was selected |
GetCheckinsByLastChange
Get all checkins since a given time.
changedate | date | Return all checkins changed on or after the provided date. |
changetime | time | If this is provided only return checkins changed after the provided date and time. |
resumekey | string | If a partial result is returned, provide the resumekey received along with the partial result, to get the rest of the entries |
Output
checkins | collection[checkin] | A collection of the relevant checkins or an empty collection if none is found. |
resumekey | string | Sometimes the entire result cannot be returned because it's to large. In that case a resumekey is returned along with the results. Execute the command again with this resumekey to get the remaining results. |
GetAllCheckins
Get all checkins for a given task or company.
objecttype | string | Either the string "Todo" or the string "Customer" |
objectid | number | The Microbizz ID of a task or company. |
Output
checkins | collection[checkin] | A collection of the relevant checkins or an empty collection if none is found. |
DoCheckOut
Performs a checkout of the currently checked in object. As this is always given, there is no need to provide information about what one is checking out from.
checkoutdate | date | Date of checkin |
checkouttime | time | Time of checkin |
longitude | float | GPS longitude from where the user performed the checkout |
latitude | float | GPS latitude from where the user performed the checkout |
registration | registrationentry | Optional time registration. The only fields used in this object is the workarea, the note and the stars, so the rest can be ignored. |
checklist | collection[number] | A list of checkpoints completed on this checkin. |
answer | answer | An optional answer for the checkout form for a task |
checkinid | number | The MB ID of the check in, from DoCheckIn; used for additional validation |
dodrive | boolean | If product use should be registered for driving (only if the Drive module is installed and configured for manual registration) |
Output
daycheckindate | date | Daycheckin date, if checked in on a day |
If the command completes, the checkout is successful.
DoDayCheckOut
Performs a checkout from the day.
checkoutdate | date | Date of checkout |
checkouttime | time | Time of checkout |
longitude | float | GPS longitude from where the user performed the checkout |
latitude | float | GPS latitude from where the user performed the checkout |
Output
daycheckindate | date | Daycheckin date, if checked in on a day |
daycheckintime | time | Daycheckin time, if checked in on a day |
If the command completes, the checkout is successful.
DoCheckOutForUser
Performs a checkout of the currently checked in object, for another user. As this is always given, there is no need to provide information about what one is checking out from.
checkoutdate | date | Date of checkin |
checkouttime | time | Time of checkin |
longitude | float | GPS longitude from where the user performed the checkout |
latitude | float | GPS latitude from where the user performed the checkout |
Userid | Number | The ID of the user to check out |
registration | registrationentry | Optional time registration. The only fields used in this object is the workarea, the note and the stars, so the rest can be ignored. |
checklist | collection[number] | A list of checkpoints completed on this checkin. |
dodrive | boolean | If product use should be registered for driving (only if the Drive module is installed and configured for manual registration) |
Output
None. If the command completes, the checkout is successful. | - | - |
GetGPSConfig
Retrieve the current GPS configuration from the system. This is used to track the users location.
The gps_policy
 field determines if the user should be tracked always or during work hours or never.
Output
resolution | number | 1 – Use low resolution. 2 – Use medium resolution. 3 – Use high resolution. |
interval | number | Number of minutes between each poll; if seconds  is specified and is > 0 then ignore interval |
seconds | number | Number of seconds between each poll, if == 0 or not specified then use interval  minutes |
workweek | set | Contains daystart  and dayend  which specifies the work hours for each day. |
workplan | collection | The workplan for the next week |
gps_policy | number | 1: never track the user, 2: only track during work hours, 3: always track |
gps_interval | number |
|
interval
 or seconds
 are used to determined how often to call RegisterRawGPSLocation.
If workweek
 is specified then it can be used to determine the work hours for each week day.
If workplan
 is specified then it specifies the workplan for the next week or so. Each object contains the fields date
 and atwork
. If the atwork
 field is set to 0 then the user isn't at work on that date.
RegisterIMEIGPSLocation
Register the location of a unit with an IMEI.
imei | string | IMEI number |
longitude | float | GPS longitude |
latitude | float | GPS latitude |
date | date | Date at position. If not provided, the current date is used. |
time | time | Time at position. If not provided, the current time is used. |
routeid | number | The ID of a route, if a route is currently being driven |
Output
RegisterRawGPSLocation
Register the location of a given user, without other context than the GPS position
longitude | float | GPS longitude |
latitude | float | GPS latitude |
date | date | Date at position. If not provided, the current date is used. |
time | time | Time at position. If not provided, the current time is used. |
precision | float | Optional accuracy in meters |
Output
A mobile app should call this regularly if the function LocationLogging is enabled (see GetMobileAppSettings). The interval and other settings is returned by GetGPSConfig.
ProcessQRCode
Send a QR code to the Microbizz system for processing.
qr | string | The scanned QR code. |
longitude | float | GPS longitude where the code was scanned |
latitude | float | GPS latitude where the code was scanned |
Output
accepted | boolean | Indicate if the Microbizz system could handle the code. |
response | string | A message to display to the user |