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. Send SMS API

Send Journey ZNS message

PreviousSend Zalo messages to request user's informationNextSend auto-generated SMS

Last updated 4 months ago

The endpoint is ideal for sending the message to the Zalo users.

To send the journey message to Zalo

Below is the requirement that is required to send the journey message to Zalo.

  • Register and authorize Zalo Official Account (Zalo OA).

  • Register the journey message template.

You can contact your sale man or contact us via Hotline 0901888484 to complete the requirement. Below is the journey message sample:

HTTP request

  • Content Type: application/json

  • Response Type: application/json

curl --location 'https://rest.esms.vn//MainService.svc/json/SendZaloMessage_V4_post_json/' \
--header 'Content-Type: application/json' \
--data '{
    "ApiKey": "{{APIKEY}}",
    "SecretKey": "{{SecretKey}}",
    "Phone": "{{Phone}}",
    "Params": ["{{PARAM1}}","{{PARAM2}}","{{PARAM3}}"],
    "IsJourney": true,
    "OrderId": "{{ORDERID}}",
    "TempID": "{{TempID}}",
    "OAID": "{{OAID}}",
    "RequestId": "{{RequestId}}",
    "campaignid": "{{campaignid}}",
    "CallbackUrl":"{{CallbackUrl}}"
}'
  • Request body

Tham số
Kiểu dữ liệu
Tính bắt buộc
Mô tả

ApiKey

string

Your API Key

SecretKey

string

Your SecretKey

Phone

string

The Zalo user's phone number.

Params

Array

The array values of parameters in your template. Note: 1. The input value have to put in the same of its order in your template. 2. If it's duplicated, just place it once.

IsJourney

string

True: it's the journey message. False: it's not the journey message. Normal ZNS message.

OrderId

string

Id of the journey, it is used for marking the journey and required if sending the journey message.

TempID

string

The template of Zalo OA that you have registered at eSMS. For ZNS journey message, you have to register the template at Zalo.

OAID

string

Zalo OA Id is the Zalo Official Account Id of the organization. It can be obtained by accessing to the Zalo administrator page.

Note: Pre-registration is required.

campaignid

string

The campaign name of request

RequestId

string

The identification value for the request to prevent the the request from duplicated. Max length: 50

CallbackUrl

string

The webhook URL that will receive the status of message after it processed to the operator. It is used for determine whether the SMS is succcessfully delivered to the receiver or failed.

Sandbox

string

Sandbox option value (default is 0): 1: For testing purpose to verify the validation of the request. Message is not charged and sent to the receiver. 0: Message will be processed to the receiver properly.


  • Response:

{
    "CodeResult": "100",
    "CountRegenerate": 0,
    "SMSID": "d8e0f1f0702544b2acb456ca9ccfd111250"
}

Valid request.

{
    "CodeResult": "101",
    "CountRegenerate": 0,
    "ErrorMessage": "Authorize Failed"
}

Invalid credential.

  • Response body

Parameter
Type
Description

CodeResult

string

Response code.

SMSID

string

The message id eSMS system.

ErrorMessage

string

The error message if the request is invalid.

POST

See the sample request at . More detail at .

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/SendZaloMessage_V4_post_json/
Table of error codes
Link of code samples
here
here