Reserve Available Telephony Number
Info! This is Beta version, if you have any problem in using API, please mail us at support@sarv.com
https://manage.sarv.com/api/telephony/reserveTelephonyNumber
Reserved New Telephonic Number through Sarv
try:
import requests
result = requests.post("https://manage.sarv.com/api/telephony/reserveTelephonyNumber", data={'user_id': 01234567, 'token': 'abcXYZ'})
print result
'''
{
"msg" : "success",
"data" : "Successfully Reserved for 7 Days"
}
'''
except e:
print 'A error occurred: %s - %s' % (e.__class__, e)
{
"msg" : "success",
"msg_text" : "Successfully Reserved for 7 Days"
}
{
"msg": "error",
"msg_text": "Human Readable Message"
}
| Parameters |
| user_id* string |
a valid Sarv User Id |
| token* string |
a valid token |
| did_number* string |
a valid Telephonic Number |
* compulsory field
| Return Value: Success |
| struct |
the results of Reserving Telephonic Number
| msg string |
success |
| msg_text string |
Successfully Reserved for 7 Days |
|
|
| Return Value: Error |
| struct |
the error results when attempt to Reserving Telephonic Number
| msg string |
error |
| msg_text string |
human readable message |
|
|
| Error types |
| ValidationError |
The parameters passed to the API call are invalid or not provided when required. |
| GeneralError |
An unexpected errors occurred processing the request. Sarv Developers will be notified. |
| AuthenticationError |
Provided owner_id and token was not matched. |