简体   繁体   中英

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) which is used with RingCentral Office and Contact Center. Is it possible to get a list of these numbers via API?

In the Online Account Portal, these numbers are found under:

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

I looked in the RingCentral API Reference but didn't see a section for Contact Center.

To add to Grokify's answer above, these are the contactCenterProvider IDs:

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

A list of Contact Center Routing Numbers (CCRNs) can be retrieved using the List Account Phone Numbers API documented here:

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

CCRN Phone Numbers will have usageType set to ContactCenterNumber .

When querying the API, the usageType query string parameter can be set to filter results. In the response, the same parameter is present in the phone numbers records.

The contactCenterProvider property is populated for CCRNs as shown below:

Here's an example:

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"
    }
  } ]
}

It is possible to update the phone number's contactCenterProvider as shown:

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

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

Update Response:

{
  "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"
  }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM