如何通过 API 获取 RingCentral 联络中心路由号码列表?

How to get a list of RingCentral Contact Center Routing Numbers via API?

RingCentral has a type of phone number called Contact Center Routing Number (CCRN) 与 RingCentral Office 和 Contact Center 一起使用。是否可以通过 API 获得这些号码的列表?

在在线帐户门户中,这些号码位于:

"Phone System" > "Phone Numbers" > "Contact Center".

我查看了 RingCentral API Reference,但没有看到联系中心部分。

可以使用此处记录的列表帐户 Phone 号码 API 检索联络中心路由号码 (CCRN) 列表:

https://developers.ringcentral.com/api-reference/Phone-Numbers/listAccountPhoneNumbers

CCRN Phone 号码将 usageType 设置为 ContactCenterNumber

查询API时,可以设置usageType查询字符串参数来过滤结果。在响应中,phone 个数字记录中存在相同的参数。

contactCenterProvider 属性 为 CCRN 填充,如下所示:

这是一个例子:

GET /restapi/v1.0/account/11111111/phone-number?usageType=ContactCenterNumber&perPage=10

HTTP 200 OK

{
  "uri" : "https://platform.ringcentral.com/restapi/v1.0/account/11111111/phone-number?page=1&perPage=10",
  "records" : [ {
    "uri" : "https://platform.ringcentral.com/restapi/v1.0/account/11111111/phone-number/22222222",
    "id" : 22222222,
    "phoneNumber" : "+18005550100",
    "paymentType" : "TollFree",
    "type" : "VoiceOnly",
    "usageType" : "ContactCenterNumber",
    "status" : "Normal",
    "contactCenterProvider": {
      "id": "1",
      "name": "In-Contact NA"
    }
  } ]
}

可以更新 phone 号码的 contactCenterProvider,如下所示:

PUT /restapi/v1.0/account/11111111/phone-number/22222222

{
  "usageType": "ContactCenterNumber",
  "contactCenterProvider": {
    "id": "3"
  }
}

更新响应:

{
  "uri" : "https://platform.ringcentral.com/restapi/v1.0/account/11111111/phone-number/22222222",
  "id" : 22222222,
  "phoneNumber" : "+18005550100",
  "paymentType" : "TollFree",
  "type" : "VoiceOnly",
  "usageType" : "ContactCenterNumber",  
  "status" : "Normal",
  "contactCenterProvider": {
    "id": "3",
    "name": "In-Contact APAC"
  }
}

要添加到上面 Grokify 的回答中,这些是 contactCenterProvider ID:

1 = In-Contact NA
2 = In-Contact EU
3 = In-Contact APAC
4 = In-Contact AUS