MyChat Integration API: MCIAPI_CS_MoveUserToDepartment

MyChat Integration API: MCIAPI_CS_MoveUserToDepartment

Moving a user from one department of the common contact list to another. A common contact list will be automatically refreshed in a few minutes and sent to all online users.

 

Syntax

{

 "cmd"       : "0017",

 "ServerKey" : "iddqd",

 "APIStype"  : "mydata",

 

 "UIN"       : 17,

 "GroupID"   : 34

}

 

Parameters

Parameter

Type

Value

ServerKey

string

IntegrationAPI key that is set in the server settings;

APIStype

string

integration type. You can set any string;

UIN

integer

user ID that you need to move;

GroupID

string

department ID in the common contact list.

 

Work result

{

"Cmd"       : 23,

"UIN"       : 17,

"GroupID"   : 34

}

 

Parameter

Type

Value

Cmd

Integer

command number that was executed successfully; equal to 23 (HEX 0017);

UIN

Integer

user ID that was moved;

GroupID

Integer

user's new department ID in the common contact list.

 

Possible errors

MCIAPI_Error_WrongIntegrationKey

MCIAPI_CS_MoveUserToDepartment

MCIAPI_Error_CannotWorkWithRobot

MCIAPI_Error_CommonContactListIsEmpty

MCIAPI_Error_UINIsNotInTheCommonContactList

MCIAPI_Error_UINNotFound

 

See also

MCIAPI_CS_CommonContactsRebuild