Upload Announcement API
http://<domain_name>/api/voice/upload_announcement.php?username=<username>&token=<token>&announcement_path=<announcement_path>
Upload Announcement API through Sarv
{
"username":"01234567",
"token":"abcXYZ"
"announcement_path":"http://your_announcement_domain/your_announcment.mp3"
}
{
"status":"success",
"code":"000",
"desc":"Announcement Uploaded Successfully",
"data":
{
"announcement_id":"1234",
"announcement_name":"filename.mp3"
}
}
{
"status":"error",
"code":"007",
"desc":"Invalid announcement type (mp3 allowed only)"
}
| Parameters |
| username* string |
a valid Sarv username |
| token* string |
a valid token |
| announcement_path* string |
a valid Announcement Path |
* compulsory field
| Return Value: Success |
| struct |
the results of Upload Announcement API
| status string |
success |
| code string |
000 |
| desc array |
{
"announcement_id":"1234",
"announcement_name":"filename.mp3"
} |
|
|
| Return Value: Error |
| struct |
the error results when Upload Announcement API
| status string |
error |
| code string |
007 |
| desc string |
Invalid announcement type (mp3 allowed only) |
|
| Api Response Codes |
| 000 |
Announcement Uploaded Successfully. |
| 001 |
Parameter Missing . |
| 002 |
Parameter is blank. |
| 003 |
Request IP not added in whitelist . |
| 004 |
Invalid user type. |
| 005 |
Invalid Credentials. |
| 006 |
User is InActive. |
| 007 |
Invalid announcement type . |