question

it9477 avatar image
it9477 asked it9477 commented

How to get department id?

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"      }    ]  }
call queues
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Tyler Liu avatar image
Tyler Liu answered it9477 commented
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.


7 comments
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

it9477 avatar image it9477 commented ·
Thanks for response Tyler,

i tried the same but department number is not showing!


0 Likes 0 ·
Tyler Liu avatar image Tyler Liu ♦ commented ·
How many "records" are there?

And could you please try other extension IDs?  /extension/{ extensionId}/phone-number


0 Likes 0 ·
it9477 avatar image it9477 commented ·
Only one record and tried for other extensions also.
0 Likes 0 ·
Tyler Liu avatar image Tyler Liu ♦ commented ·
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.
0 Likes 0 ·
it9477 avatar image it9477 commented ·
Do we able to set department in sandbox?
0 Likes 0 ·
John Wang avatar image John Wang ♦♦ commented ·
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.
0 Likes 0 ·
it9477 avatar image it9477 commented ·
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
0 Likes 0 ·

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys