Send SMS
Base URL: https://api.optimummeasures.com
Usage: Use this to send sms
Path: /api/SMS
Method: Send
Action: POST
Parameters:
| Parameter Name | Type | Mandatory | Description |
|---|
Sample Response:
"Destination" : { [{"MobileNo" : "0016175551212"}, {"MobileNo" : "0016175551212"}], "Message" :
"Welcome to Optimum Measures meassaging solution", "Sender" : "OM", "ReferenceID" : "ID09890",
"CallBack" : "Yes" }
Response
API returns a response in json format
Parameters:
| Parameter Name | Type | Description |
|---|
Sample Response:
Success
{ "ID" : "7865", "Status" : "Received" }
Error
{ "Error ID": "125", "Status": "Received with error - Parameter Sender is missing or empty" }
Call back
A client URL that messaging service will POST to, each time the status of the SMS changes in messaging service system. it will POST the following parameters to the URL
Parameters:
| Parameter Name | Type | Description |
|---|
Sample Response:
{ "ID" : "7865", "MobileNo" : "0016175551212", "Status" : "Delivered", "DateTime" : "2017-07-16
12:08:56.690", "ReferenceID" : "ID09890", "Error": "International Number Invalid", "ErrorLogsID": "42" }
Get Status
Usage: Get status of the SMS
Path: /api/SMS
Method: GetStatus
A client URL that messaging service will POST to, each time the status of the SMS changes in messaging service system. it will POST the following parameters to the URL
Parameters:
| Parameter Name | Type | Description |
|---|
Sample Response:
{ "ID" : "1234", "Status" : "Delivered", "Delivery Date" : "2017-07-16 12:08:56.690" }
Voice Call
Usage: Trigger a call
Path: /api/Voice
Method: Call
Action: POST
A client URL that messaging service will POST to, each time the status of the SMS changes in messaging service system. it will POST the following parameters to the URL
Parameters:
| Parameter Name | Type | Mandatory | Description |
|---|
Sample Response with Message:
Sample Request with Message
"Destination" : {
[{"MobileNo" : "0016175551212"}, {"MobileNo" : "0016175551212"}], "Message" : "Welcome to Optimum Measures Voice solution", "Sender" : "00919833111380", "Locale" : "hi-IN"
}
Sample Request with CampaignID:
"Destination" : {
[{"MobileNo" : "0016175551212"}, {"MobileNo" : "0016175551212"}], "CampaignID" : "fc46b682-b939-4fc2-81c3-891cfb23cd92", "Sender" : "00919833111380"
}
Response
API returns a response in json format
Parameters:
| Parameter Name | Type | Description |
|---|
Sample Response:
Success
{ "ID" : "7865", "Status" : "Received" }
Error
{ "ID" : "7865", "ErrorID" : "5000", "Message" : "Received with error - Parameter Destination/Mobile No is missing or empty" }
Call back
A client URL that the callback service will POST to, with the Call Details Record(CDR) details of call triggered. It will POST the following parameters to the URL x`x`
Parameters:
| Parameter Name | Type | Description |
|---|
Sample Response:
{ "GUID" : "a4d5b8e3-f415-45bb-a73d-14629b500240", "MobileNo":"0016175551212", "Status" : "Answered", "Calltime":"2017-07-16 12:08:56.690", "AnswerTime":"2017-07-16 12:08:56.690", "Duration":"10", "Reason":"Blocked" }
| Call Status and Error details |
|---|
| Call Status |
| Answered |
| Busy |
| NoAnswer |
| Failed |
| Reasons may have one of the following values for failed call status |
|---|
| Reasons |
| NA |
| Timeout |
| CallerHangUp |
| Blocked |
| General Error |
| Cancel |
| Error Details (Platform Rejection) | |
|---|---|
| ErrorID | Message |
| 5000 | Received with error - Parameter Destination/Mobile No is missing or empty |
| 5000 | Received with error - Parameter Sender is missing or empty |
| 5000 | Received with error - Parameter Message or CampaignID is missing or empty |
| 5000 | Received with error - Parameter Locale is missing or empty |
| 5001 | Received with error - Invalid Json |
| 5002 | Received with error - Invalid Campaign |
| 5003 | Received with error - Message or CampaignID, either of the two should be present |