Purpose

Request to get a list of employees

Request typeasynchronous, synchronous
Supported agent versionv2
PluggetSystemTypeRKRef

Request format


JSON

{
  "taskType": "GetEmployees",
  "params": {
 
    "async": {
      "objectId": number,
       "timeout": number
    },
    "sync": {
      "objectId": number,
       "timeout": number
    }
 
  }
}

Parameter

Type

Mandatory

Description

taskType

Task type
-async

Asynchronous method call: either synchronous or asynchronous
-sync

Synchronous method call: either synchronous or asynchronous
--timeoutintnoAgent response timeout in seconds, default is 120 seconds
--objectIdintyesRestaurant code in the licensing system

Response format


JSON

{
 "responseCommon": {
   "taskGuid": "string",
   "taskType": "GetEmployees",
   "objectId": 0
 },
 "taskResponse": {
   "Employees": [
        {
            "id": 0,
            "name": "string",
            "altName": "string",
            "visualTypeImage": "string",
            "visualTypeBColor": "string",
            "visualTypeTextColor": "string",
            "visualTypeFlags": "string",
            "cardCode": "string",
            "largeImagePath": "string",
            "eMail": "string",
            "pagerCode": "string",
            "pagerType": "string",
            "groups": [0,1],
            "restaurantRoles": [
                {
                  "restaurantId": 1,
                  "roleId": 1000050,
                  "name": "Administrators"
                }
  ],
  "brigade": "string",
  "defServPosition": "string",
  "defaultRestaurantId": 0
}
  ]
 
}

Parameter

Type

Mandatory


Parameter

Type

Mandatory


-taskGuidguid
Unique code for this task. Used when receiving a task via the queue
-taskTypestring enum
Task type
-objectIdint
Restaurant code in the licensing system
taskResponseobject

--idintyesEmployee record ID
--namestringyesFull name of the employee
--altNamestringnoEmployee's full name in an alternative language
--visualTypeImagestringnoThe image assigned to the element
--visualTypeBColorstringnoElement button background color
--visualTypeTextColorstringnoColor of text on element button
--visualTypeImagestringnoThe image assigned to the element
--cardCodestringnoEmployee card code, which the employee uses to log in at the cash register
--largeImagePathstringnoName of the file with the large image
--eMailstringnoUser's email
--pagerCodestringnoUnique pager number
--pagerTypestringnoPager type
--brigadestringnoThe team to which the worker belongs
--defServPositionstringnoDefault worker service position
--defaultRestaurantIdintnoCurrent restaurant ID
--groups

int[]

yesArray of group IDs to which the employee is included
--restaurantRolesarrayyesArray of employee roles
---restaurantIdintyesThe ID of the restaurant to which the role is assigned
---roleIdintyesRole ID 

Example request

JSON

{
  "taskType": "GetEmployees",
  "params": {
    "sync": {
      "objectId": 199990106,
      "timeout": 60
    }
  }
}