querysms
Overview
- API URL: /api/v1/zoloz/globalsms/querysms
- API Description: This interface is used to query the details of SMS sending, including the status of the SMS, the time the SMS was sent, and the number of successfully sent messages.
Request parameters
Field name | Data type | Max length | Description | Example |
transactionId | String | 32 | Required. The transaction ID to be queried. Only one transaction ID can be passed at a time, which can be obtained through the sendsms API. | "G0062000061MT20230325dAqiXBpQUbVB9h****" |
Response parameters
Field name | Data type | Description | Example |
result | Required. API response, including status, code, and message. | { "resultStatus": "S", "resultCode": "SUCCESS", "resultMessage": "Success" } | |
status | int | Required. SMS Sending Status:
| "Delivered" |
smsNum | String | Optional. The number of SMS messages used for billing, as detailed in the billing description. | 1 |
sendDate | String | Optional. SMS sending time. | "2024-03-14T20:26:22+08:00" |
deliveredDate | String | Optional. Carrier receipt time for successfully sent SMS. Note: This field is only returned when the | "2024-03-14T20:26:36+08:00" |
Result
For different request results, different actions are to be performed. See the following for details:
- If the value of the result.resultStatus is
S
, the ZOLOZ Global SMS querysms API is invoked successfully, and it returns details of the SMS sent. - If the value of the result.resultStatus is
F
, the invocation of the ZOLOZ Global SMS querysms API fails. Check the error code and get more information about the possible reasons.
Common result codes
For the full list of common result codes, see the Common result codes section in the Error handling topic.
API-specific result codes
The following table shows the possible result codes that are specific for the ZOLOZ Global SMS querysms API.
resultCode | resultSatus | Description |
SUCCESS | S | Success |
MERCHANT_INFO_MISSING | F | Merchant info missing |
EXTERNAL_ERROR | F | External error |
ILLEGAL_STATE | F | Illegal state |
PARAM_ERROR | F | Param error |
UNKNOWN_EXCEPTION | F | Unknown exception |
TRANSACTION_ID_NOT_EXISTED | F | Transaction id does not exist |
Sample
Request Sample
{
"transactionId": "G0062000061MT20230325dAqiXBpQUbVB9h****"
}
Response Sample
{
"result": {
"resultStatus": "S",
"resultCode": "SUCCESS",
"resultMessage": "Success"
},
"deliveredDate": "2024-03-14T20:26:36+08:00",
"sendDate": "2024-03-14T20:26:22+08:00",
"status": "Delivered",
"smsNum": 1
}