MyChat Integration API: MCIAPI_CS_GetDepartmentIDByTextPath
A command for getting group ID in the tree-like common contact list via full path.
Syntax
{
"cmd" : "001C",
"ServerKey" : "iddqd",
"APIStype" : "mydata",
"Path" : "USA\New York\Tech dept"
}
Parameters
Parameter |
Type |
Value |
ServerKey |
string |
IntegrationAPI key; you can set it in the server settings; |
APIStype |
string |
integration type. You can set any string; |
Path |
string |
full path to a department from the tree root; text string with a group separator, the symbol "\". |
Work result
{
"cmd" : "001C",
"Path" : "USA\New York\Tech dept",
"GroupID" : 12
}
Field |
Type |
Value |
cmd |
integer |
command name that was executed successfully; equal to 24 (HEX 0018). |
Path |
string |
tree path from the initial request; |
GroupID |
integer |
group ID in the common contact list. |
Possible errors
#5: MCIAPI_Error_WrongIntegrationKey
#32: MCIAPI_Error_WrongDepartmentPath