Call this API to send a HLR request to us
If you need to send same HLR request to 3 different number, call this API 3 times with different "to" parameter.
https://api.esms.com.my/hlr/send
POST, supported content-type is JSON:
* charset behind is necessary when you're sending in Unicode messages, such as Chinese characters.
| Name | Type | Required | Description |
|---|---|---|---|
| user | String | Mandatory | This would be your account's api key. |
| pass | String | Mandatory | This would be your account's api secret. |
| to | String | Mandatory |
The phone number of target recipient you'd like to send HLR to. Phone number must be supplied along with country code. Do not include any non-numeric character, eg: - ( ) or space. Example: 60123456789 |
| dlr-url | String | Mandatory |
Specify your own DLR receiving endpoint to receive our DR report. Example: https://www.yourownsite.com/dlrreceiver |
Response would be returned in application/json format.
An example of Successful response would be:
{"status":0,"creditDeducted":1,"message":"ok","id":"88ce9c6e-1707-41b8-95a2-91d228001fc7","parts":1,"type":12}
An example of Failed response would be:
{"status":9,"message":"Invalid phone number, please do not include any non-numeric character","id":"c8d6bb1c-bff6-47d5-9e01-dc2596bbdbe7"}
| Name | Type | Description |
|---|---|---|
| status | Numeric | Status code of the request, kindly refer to below Status mapping table for more details |
| message | String | A short description of given status, for more information you may contact our support team at support@esms.com.my |
| id | String | ID of this particular request, you may want to keep this ID in your own table for future reference, our DR would be based on this ID. |
| creditDeducted | Numeric | The total credit amount deducted from your account. |
| parts | Numeric | To show how many parts of HLR this message requires, its usually 1 for HLR. |
| type | Numeric |
Type of this message, its usually 12 for HLR. |
| Status Code | Description |
|---|---|
| 0 | Success. |
| 1 | Insufficient parameters Please make sure all mandatory parameter exists. |
| 2 | Invalid calling IP You are getting this error because you've previously requested your account to be able to call only from certain IP, and you're not calling from the designated IP. |
| 3 | Invalid username/password combination. If you believe this is an error, kindly contact our support team at support@esms.com.my. |
| 4 | Invalid country code The country code of the phone number you provides is not recognized. For Malaysia recipients, do remember to send to 60123456789 instead of 0123456789. |
| 5 | Insufficient credits Contact your account manager for reload procedures. |
| 6 | Internal error You may retry again shortly. |
| 9 | Invalid "to" parameter Please include only numeric in "to" parameter For example, please send 60123456789 instead of 60-12 345 6789 |
| Request Body |
|---|
|