eSMS for Developers
Đăng nhập
EN - eSMS for Developers
EN - eSMS for Developers
  • Overview
    • Getting started
    • Mechanism
    • Access to the API information
  • eSMS API
    • Send SMS API
      • Send OTP/Customer care message
      • Send adveritising message
      • Send message via Zalo
      • Send message via Viber
      • Send fixed number with cheap price
      • Send multi-channel message via Zalo and SMS
      • Send personized message via Zalo
      • Send Zalo message Consulting in text form
      • Send Zalo message with attached photo
      • Send Zalo message Consulting button
      • Send Zalo Trading message
      • Send Zalo messages to request user's information
      • Send Journey ZNS message
      • Send auto-generated SMS
      • The multichannel auto-generated OTP
    • Retrive and register functions
      • Get balance
      • Get the message status
      • Get SMS by SMSID
      • Get message details
      • Get list registered brandnames
      • Get list customer care templates
      • Summary your customer care submit
      • Summary your advertising submit
      • Get list OA
      • Get list templates of OA
      • Summary Zalo message
      • Get the daily quota of OA
      • Get rating information of Zalo users
      • Check the OA quality
      • Get list Zalo's followers
      • Get callback data
      • Get Zalo template details
      • Purchase OA package
      • Registering the Zalo template
      • Registering SMS template
    • Other APIs
      • Send customer care message using GET
      • Send customer care message using POST X-Form
      • Send customer care message using POST TEXT
      • Send fixed number using GET
      • Send advertising message using POST TEXT
      • Send Zalo message (old version)
      • Send Zalo message using POST X-FORM
      • Send Zalo message full template
      • Send Viber message using GET
      • Check code
    • Svoucher Connect
      • Connect to shortcode service
    • Voice
      • Create voice OTP call
      • Create an auto-call using template
      • Create a call from recording file
      • Get voice call status
    • Table of error codes
    • Test environment ( Sandbox)
    • Callback Url
Powered by GitBook
On this page
  1. eSMS API
  2. Retrive and register functions

Get the message status

PreviousGet balanceNextGet SMS by SMSID

Last updated 5 months ago

This endpoint is ideal for retriving the SMS data in a time range.

HTTP request

POST

  • Content Type: application/json

  • Response Type: application/json

curl --location 'https://rest.esms.vn/MainService.svc/json/GetSmsSentData_V2' \
--header 'Content-Type: application/json' \
--data '{
    "ApiKey":"{{ApiKey}}",
    "SecretKey":"{{SecretKey}}",
    "SmsType":"{{SmsType}}",
    "From": "{{DateFrom}}",
    "To":"{{DateTo}}",
    "Page":{{Page}},
    "PageSize":{{PageSize}}
}'
  • Body request:

Parameter
Type
Required
Description

ApiKey

string

Your API Key.

SecretKey

string

Your Secret Key.

From

string

Start date Format: yyyy-MM-dd HH:mm:ss

To

string

End date Format: yyyy-MM-dd HH:mm:ss

Page

string

The start page.

PageSize

string

The number of SMS per page. Max: 500 SMS

SmsType

string

Type of SMS 1: Advertising SMS. 2: Customer care SMS. 8: Fixed number. 23: Viber OTT. 24: Priority ZNS. 25: Normally ZNS. 26: Zalo Follower.


  • Response:

{
    "CodeResult": "100",
    "CountTotal": 2
    "SentData": [
        {
            "Campaign": "Chiến dịch 02/10/2023",
            "Content": "Cam on quy khach da su dung dich vu cua chung toi. Chuc quy khach mot ngay tot lanh!",
            "Phone": "0901888484",
            "ReferenceId": "35781d6c25524e40a035c26663189549",
            "SellPrice": 345.0,
            "SendResult": 0,
            "SendStatus:5,
            "SentTime": "/Date(1705484048995+0700)/",
            "SmsId": 29028845,
            "SmsType": 2
        },
        {
            "Campaign": "Chiến dịch 02/10/2023",
            "Content": "Cam on quy khach da su dung dich vu cua chung toi. Chuc quy khach mot ngay tot lanh!",
            "Phone": "0901888484",
            "ReferenceId": "0aac72e0-ba9b-4348-8530-d18d105778db18",
            "SellPrice": 790.0000,
            "SendResult": 1,
            "SendStatus:5,
            "SentTime": "/Date(1705484048995+0700)/",
            "SmsId": 29028845,
            "SmsType": 2
        }
    ]

Valid request.

{
    "CodeResult": "101",
    "ErrorMessage": "Authorize Failed."
}

Invalid credentials.

  • Response body:

Parameter
Type
Description

CodeResult

string

Response code.

CountTotal

string

The total SMS in this period.

Campaign

string

Campaign name.

Content

string

The message content

Phone

string

The phone number of receiver.

RefercenceId

string

The id that returned on sending function.

Sellprice

string

Unit price of message.

SendResult

string

State of message.

1: Success 0: Failed 2: Not acknowdege

SendStatus

string

0: Composing 1: On review. 2: Enqueue. 4: Rejected. 5: SENT. 7: SENT (waiting for last result)

SentTime

string

The time that message is sent out.

SmsId

string

ID of message in portal.

SmsType

string

Type of SMS 1: Advertising SMS. 2: Customer care SMS. 8: Fixed number. 23: Viber OTT. 24: Priority ZNS. 25: Normally ZNS. 26: Zalo Follower.

The detail of error code can refer at .

Get the sample of code for programing languagues to use in Postman refer at .

https://rest.esms.vn/MainService.svc/json/GetSmsSentData_V2
Table of error codes
Link of code samples