Hàm đăng ký template Zalo

Đây là hàm dùng để đăng ký template ZNS

HTTP request

POST https://rest.esms.vn/MainService.svc/json/RegisZNSTemplateJson/

  • Content Type: application/json

  • Response Type: application/json

curl --location 'https://rest.esms.vn/MainService.svc/json/RegisZNSTemplateJson/' \
--header 'Content-Type: application/json' \
--data '{
    "ApiKey":"{{ApiKey}}",
    "SecretKey":"{{SecretKey}}",
    "Content":"{{Content}}",
    "ImageUrl":"{{ImageUrl}}",
    "CTA1":"{{CTA1}}",
    "CTA2":"{{CTA2}}",
    "OAID":"{{OAID}}",
    "SmsType":"{{SmsType}}",
    "CallbackUrl":"{{CallbackUrl}}"
}'
  • Cấu trúc body của request:

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

ApiKey

string

ApiKey của tài khoản.

SecretKey

string

SecretKey của tài khoản.

Content

string

Nội dung mẫu của template cần đăng ký.

ImageURL

string

Link hình ảnh LOGO OA, chấp nhận link đuôi PNG, kích thước 400x69, tách nền màu nền đen hoặc trắng.

CTA 1

string

Link CTA thứ nhất.

CTA 2

string

Link CTA thứ hai.

OAID

string

Zalo OA ID, là ID của trang Zalo Offical Account của doanh nghiệp. Doanh nghiệp cần đăng nhập vào trang quản trị của Zalo OA để lấy phần Zalo OA ID này. Chú ý: sẽ phải đăng ký trước khi sử dụng.

SmsType

string

24: khi đăng ký template zalo ưu tiên. 25: khi đăng ký template zalo bình thường.

CallbackUrl

string

Link nhận trạng thái template đăng ký 0: Đăng ký thất bại. 1: eSMS tiếp nhận thành công. 2: Đăng ký thành công.


  • Response:

{
    "CodeResult": "100",
    "ErrorMessage": "ViHAT is censoring trademark ownership",
    "ServicePreviewId": 52330
}

Request hợp lệ.

  • Cấu trúc body của response:

Thuốc tínhKiểu dữ liệuMô tả

CodeResult

string

Kết quả của Request.

ErrorMessage

string

Thông báo kết quả trả về.

ServicepreviewId

string

ID template yêu cầu đăng ký.

  • Thông tin chi tiết mã lỗi xem ở bảng: Mã lỗi .

  • Lấy code mẫu các ngôn ngữ trên Postman: Link code mẫu.

Last updated