How to get department id?

  • 1
  • Question
  • Updated 2 months ago
  • Answered
  • (Edited)
I am trying "Edit Call Queue Members", for this department ID is must. <br>i tried with extension id but not working,
<img src="https://d2r1vs3d9006ap.cloudfront.net/s3_images/1723515/RackMultipart20180409-25616-14kmywf-Capture_inline.PNG?1523273095" title="Image: https://d2r1vs3d9006ap.cloudfront.net/s3_images/1723515/RackMultipart20180409-25616-14kmywf-Capture_inline.PNG?1523273095"><br>{
  "errorCode": "EXT-400",
  "message": "Not a department extension",
  "errors": [
    {
      "errorCode": "EXT-400",
      "message": "Not a department extension"
    }
  ]
}
Photo of Admin (CC) RPS

Admin (CC) RPS

  • 180 Points 100 badge 2x thumb

Posted 2 months ago

  • 1
Photo of Tyler Long

Tyler Long, Official Rep

  • 5,914 Points 5k badge 2x thumb
Please try https://developer.ringcentral.com/api-docs/latest/index.html#!#RefUserPhoneNumbers.html

GET /restapi/v1.0/account/{accountId}/extension/{extensionId}/phone-number

The returned data with tell you which number is a department number. Search `"type" : "Department"` to locate it.
Photo of Admin (CC) RPS

Admin (CC) RPS

  • 180 Points 100 badge 2x thumb
Only one record and tried for other extensions also.
(Edited)
Photo of Tyler Long

Tyler Long, Official Rep

  • 5,914 Points 5k badge 2x thumb
A department is just a special extension. Get the list of extensions: https://developer.ringcentral.com/api-docs/latest/index.html#!#RefExtensionList.html

If there is none with type equals "Department" then it simply means there is no department in your account.
Photo of Admin (CC) RPS

Admin (CC) RPS

  • 180 Points 100 badge 2x thumb
Do we able to set department in sandbox?
Photo of John Wang

John Wang, Official Rep

  • 5,074 Points 5k badge 2x thumb
Call queue departments can be created in the sandbox. They need to be created in the Online Account Portal for your sandbox account at:

https://service.devtest.ringcentral.com

Follow the instructions here:

https://success.ringcentral.com/articles/RC_Knowledge_Article/How-to-change-the-number-of-your-depar...

You can also search for call queue articles in our Knowledgebase by using the search here:

https://success.ringcentral.com/RCSupportPortalGlobalSearch#q=call%20queue&sort=relevancy

Once you have created the Call Queue, you can manage members via the portal or the API.

Call queues will appear in the following API call:

GET /restapi/v1.0/account/~/extension?type=Department

You can then use the `extensionId` in the response as the `departmentId` in the Get/Update Call Queue Members APIs request.
(Edited)
Photo of Admin (CC) RPS

Admin (CC) RPS

  • 180 Points 100 badge 2x thumb
Hello Tyler Long,

can you help on this: 

how to add phone numbers to users and department in Sandbox?

https://devcommunity.ringcentral.com/ringcentraldev/topics/how-to-add-phone-numbers-to-users-and-department-in-sandbox