Update Site Number plan failing PUT /api/v2/telephony/providers/edges/sites/{siteId}/numberplans

Hello, I'm trying to use PUT /api/v2/telephony/providers/edges/sites/{siteId}/numberplans to update a new number plan on existing Sites.

This is failing as will not allow me to create a new Classification string.
Seems it will only use the existing default Classifications resulting in 400 response as are already in use.

Body ;
[
{
"name": "ArronTest",
"state": "active",
"priority": 0,
"numbers": [
{
"start": "",
"end": ""
}
],
"classification": "NEW",
"matchType": "e164NumberList"
}
]

Hello,

The reason is that when using the PUT /api/v2/telephony/providers/edges/sites/{siteId}/numberplans endpoint, you have to submit all number plans (the ones already defined on the site, the ones you want to modify but which were already defined on the site, and the new ones).

So you should invoke GET /api/v2/telephony/providers/edges/sites/{siteId}/numberplans first. Then add/modify what you need in the response content. And use it for your PUT endpoint.

Also note that if you use an e164NumberList, you must have at least one range defined. I don't know if you had set something in yoru numbers[0].start and numbers[0].end attributes. If not, you must set a range.

Regards,

1 Like

Hi Jerome, Numbers removed for the post. Actually thought I tested this but ran into a different error. Have just retried with all properties returned on GET and its working fine.

Thank you,

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.