侧边栏

文档首页


CRM扩展

数据接口

呼叫能力

Android IM SDK手册(暂停使用)

iOS IM SDK手册(暂停使用)

Android SIP SDK手册

iOS SIP SDK手册

客户端标准版快速集成

帮我吧远程SDK版本

网页在线客服集成

微信接入

帮我吧文档:数据接口:客服:客服组

客服分组接口


JSON格式

名称 类型 只读 必填 注释
sgId int 客服分组ID,系统自动生成
url varchar 该客服分组的资源url
sgName varchar 客服分组名称

JSON示例

{
     "sgId": 1,
     "url": "https://www.bangwo8.com/api/v1/supportgroups/1.json",
     "sgName": "北京办"
}

获取客服分组列表

GET /api/v1/supportgroups.json

调用者权限

管理员

调用示例

curl https://www.bangwo8.com/api/v1/supportgroups.json \
  -v -u {account}:{password}

返回值示例

Status: 200 OK

{
	"supportgroups": [
		{
			"sgId": 1,
			"sgName": "北京办"
		},
		{
			"sgId": 2,
			"sgName": "上海办"
		}
	]
}

查看指定客服分组信息

GET /api/v1/supportgroups/{id}.json

调用者权限

管理员

调用示例

curl https://www.bangwo8.com/api/v1/supportgroups/{id}.json \
  -v -u {account}:{password}

返回值示例

Status: 200 OK

{
  "supportgroup": {
    "sgId":   1,
    "sgName": "北京办"
  }
}

获取多个客服分组信息

GET /api/v1/supportgroups/show_many.json?ids={ids}

调用者权限

管理员

调用示例

curl https://www.bangwo8.com/api/v1/supportgroups/show_many.json?ids=1,2,3 \
  -v -u {account}:{password}

返回值示例

Status: 200 OK

{
  "supportgroups": [
    {
      "sgId": 1,
      "sgName": "北京办"
    },
    {
      "sgId": 2,
      "sgName": "上海办"
    }
  ]
}

创建客服分组

POST /api/v1/supportgroups.json

调用者权限

管理员

调用示例

curl -v -u {account}:{password} https://www.bangwo8.com/api/v1/supportgroups.json \
  -H "Content-Type: application/json" -X POST -d '{"supportgroup": {"sgName": "北京办"}}'

说明:创建客服分组时,cgName必填。

返回值示例

Status: 200 OK
Location: https://www.bangwo8.com/api/v1/supportgroups/{id}.json

{
  "supportgroup": {
    "sgId":   1,
    "sgName": "北京办"
  }
}

修改客服分组信息

PUT /api/v1/supportgroups/{id}.json

调用者权限

管理员

调用示例

curl -v -u {account}:{password} https://www.bangwo8.com/api/v1/supportgroups/123.json \
  -H "Content-Type: application/json" -X PUT -d '{"supportgroup": {"sgName": "上海办"}}'

返回值示例

Status: 200 OK

{
  "supportgroup": {
    "sgId":   1,
    "sgName": "北京办"
  }
}

删除客服分组信息

DELETE  /api/v1/supportgroups/{id}.json

调用者权限

管理员

调用示例

curl -v -u {account}:{password} https://www.bangwo8.com/api/v1/supportgroups/765607.json \
  -H "Content-Type: application/json"
  -X DELETE

返回值示例

Status: 200 OK
{
"supports": 
    {
    "sgId": "765607",
    "sgName": "gnwaycs",
    "url": "https://www.bangwo8.com/api/v1/supportgroups/765607.json"
    }
}

查看客服分组下的客服

GET /api/v1/supportgroups/supports/{sgId}.json

调用者权限

管理员

调用示例

curl https://www.bangwo8.com/api/v1/supportgroups/supports/3232.json \
  -H "Content-Type: application/json" \
   -v -u {account}:{password} -X GET

返回值示例

Status: 200 OK
{
   "sgId": 1,
   "sgName": "北京办",
   "supports": [
            {
            "sId": "563562",
            "sPassportName": "gzcs005",
            "groupId": "",
            "sNum": "005",
            "name": "刘经理",
            "gnder": "2",
            "email": "",
            "fixnumber": "",
            "mobile": "13076869445",
            "QQ": "",
            "isAdmin": "0",
            "createDT": "2019-08-15 16:29:05"
        },
        {
            "sId": "563570",
            "sPassportName": "gzcs006",
            "groupId": "",
            "sNum": "006",
            "name": "陈主管",
            "gnder": "1",
            "email": "",
            "fixnumber": "",
            "mobile": "15939833813",
            "QQ": "",
            "isAdmin": "0",
            "createDT": "2019-08-15 16:30:33"
        },
        {
            "sId": "563578",
            "sPassportName": "gzcs003",
            "groupId": "134254",
            "sNum": "003",
            "name": "卢园",
            "gnder": "1",
            "email": "",
            "fixnumber": "",
            "mobile": "15506843513",
            "QQ": "",
            "isAdmin": "0",
            "createDT": "2019-08-15 16:32:20"
        },
        {
            "sId": "644242",
            "sPassportName": "kssq001",
            "groupId": "143371",
            "sNum": "007",
            "name": "售前1",
            "gnder": "1",
            "email": "",
            "fixnumber": "",
            "mobile": "15506843512",
            "QQ": "",
            "isAdmin": "0",
            "createDT": "2019-10-22 17:06:36"
        },
        {
            "sId": "644245",
            "sPassportName": "kssq002",
            "groupId": "143374",
            "sNum": "008",
            "name": "售后1",
            "gnder": "1",
            "email": "",
            "fixnumber": "",
            "mobile": "15506843512",
            "QQ": "",
            "isAdmin": "0",
            "createDT": "2019-10-22 17:07:24"
        }
    ],
    "count": "4",
    "previous_page": "",
    "next_page": ""
}

页面工具