Reputation: 16354
Is there any way to access the emergency contact info? I cannot find it in the API Reference but it is available in the RingCentral Online Account Portal as shown below:
Upvotes: 1
Views: 85
Reputation: 16354
The emergency address contact info is available in the Device Info emergencyServiceAddress
property.
The Device Info object with this property is available in both the account and extension APIs:
GET /restapi/v1.0/account/{accountId}/device/{deviceId}
GET /restapi/v1.0/account/{accountId}/extension/{extensionId}/device/{deviceId}
To get a list of deviceId
values to query, call the Device List APIs:
GET /restapi/v1.0/account/{accountId}/device
GET /restapi/v1.0/account/{accountId}/extension/{extensionId}/device
The Device List APIs do not include the emergencyServiceAddress
so you need to use this to find the deviceId
to get the info for the specific device.
The emergencyServiceAddress
property looks like the following:
"emergencyServiceAddress": {
"street": "20 Davis Drive",
"city": "Belmont",
"state": "CA",
"country": "US",
"zip": "94402",
"customerName": "John RingForce"
},
You can also update the emergency service address by using the Update Device endpoint:
PUT /restapi/v1.0/account/{accountId}/extension/{extensionId}/device/{deviceId}
{
"emergencyServiceAddress": {
"street": "19 Davis Drive",
"city": "Belmont",
"state": "CA",
"country": "US",
"zip": "94402",
"customerName": "John RingForce"
}
}
Some demo code for this is available for Go in the repo for the go-ringcentral
SDK:
https://github.com/grokify/go-ringcentral/blob/master/examples/e911_address/e911_address.go
Upvotes: 2