Get Zalo template details

HTTP request

GET https://rest.esms.vn/MainService.svc/json/GetZnsTemplateInfo?TemplateId={{TemplateId}}&ApiKey={{ApiKey}}&SecretKey={{SecretKey}}&OAId={{OAId}}

  • Response Type: application/json

curl --location -g 'https://rest.esms.vn/MainService.svc/json/GetZnsTemplateInfo?TemplateId={{TemplateId}}&ApiKey={{ApiKey}}&SecretKey={{SecretKey}}&OAId={{OAId}}'
  • Request body:

Parameter
Type
Required
Description

TemplateId

string

The ID of template for the OA that is registered and provided by eSMS at Zalo to partner.

ApiKey

string

Your API key.

SecretKey

string

Your Secret key.

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.


  • Response:

{
    "Data": {
        "ApplyTemplateQuota": false,
        "ListParams": [
            {
                "AcceptNull": false,
                "MaxLength": 10,
                "MinLength": 0,
                "Name": "otp",
                "Require": true,
                "Type": "STRING"
            }
        ],
        "PreviewUrl": "https://zns.oa.zalo.me/znspreview/SZk01CLsjXTYpn_B4agO0g==",
        "Status": "ENABLE",
        "TemplateDailyQuota": null,
        "TemplateId": 205644,
        "TemplateName": "Xác nhận đăng ký dịch vụ",
        "TemplateQuality": "UNDEFINED",
        "TemplateRemainingQuota": null,
        "TemplateTag": "OTP",
        "Timeout": 15000
    },
    "Error": 0,
    "Message": "Success"
}

Valid request.

  • Response body:

Parameter
Type
Description

ApplyTemplateQuota

string

This parameter indicates that whether the template is applied the daily quota limit or not. Note: The daily quota is only applied for some special templates that are for testing and directly register to Zalo. The normal template is not affected by this limit.

PreviewUrl

string

The link of review version of template.

Status

string

Status of template.

TemplateDailyQuota

string

The number of ZNS can be sent by the template of OA per day. Note: This field is returned only once the applyTemplateQuota is true.

TemplateId

string

ID of template.

TemplateName

string

Name of template.

TemplateQuality

string

The quality of ZNS in last 48 hours of OA. The values are returned as following

  • HIGH - Good quality.

  • MEDIUM - Medium quality.

  • LOW - Bad quality.

  • UNDEFINED - Not acknownledge (in case of no ZNS is sent)

TemplateRemainingQuota

string

The remaining of ZNS can be sent by the OA for the day. emplate of OA per day. Note: This field is returned only once the applyTemplateQuota is true.

TemplateTag

string

Loại nội dung của template. Các giá trị trả về: The type of template content:

  • OTP – OTP

  • IN_TRANSACTION – Confirm/Update transaction.

  • POST_TRANSACTION – Related post-transaction support.

  • ACCOUNT_UPDATE – Update account information.

  • GENERAL_UPDATE – Update service information.

  • FOLLOW_UP – Notify promotion to old customer.

Timeout

string

The timeout of template.

AcceptNull

string

The field indicates that whether the template parameter can be empty or not

MaxLength

string

Maximum length of characters for the value.

MinLength

string

Minimun length of characters for the value.

Name

string

Parameter name.

Require

string

The obligation of field.

Type

string

The regular expression for validating the value.

Last updated