Hàm đăng ký template SMS

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

curl --location 'http://rest.esms.vn/MainService.svc/json/SubServicePreviewJson/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "ApiKey": "{{ApiKey}}",
    "AssetsUrl": "{{AssetsUrl}}",
    "Brandname": "{{Brandname}}",
    "CallbackUrl": "{{CallbackUrl}}",
    "Content": "{{Content}}",
    "IsUnicode": "0",
    "CustomerEmail": "{{CustomerEmail}}",
    "CustomerName": "{{CustomerName}}",
    "CustomerPhone": "{CustomerPhone}}",
    "SecretKey": "{{SecretKey}}",
    "ServiceType": 2,
    "SmsType": {{SmsType}}
}'
  • Thông tin request

BiếnĐịnh nghĩa

ApiKey *

ApiKey của tài khoản

SecretKey *

SecretKey của tài khoản

Content *

Nội dung mẫu của template cần đăng ký Ví dụ: {Biến:Số lượng ký tự mong muốn}

AssetsUrl

Là đường dẫn để tài 1 tài liệu nào đó ở server của đối tác. tài liệu này phục vụ cho việc xác thực đăng ký.

Brandname *

BrandName cần đăng ký template (lưu ý: Brandname này phải được add vào tài khoản thì mới đăng ký được)

IsUnicode

Đăng ký nội dung có dấu 1: Có dấu 0: Không dấu

CustomerEmail

Email tài khoản KH cuối cần đăng ký brandname

CustomerName

Số điện thoại KH cuối cần Đăng ký brandname

CustomerPhone

CustomerPhone

ServiceType *

ServiceType = 2 là đăng ký Template CSKH hoặc Cố định giá rẻ

SmsType *

2: khi đăng ký template CSKH 8: khi đăng ký template Cố định giá rẻ

CallbackUrl

Sẽ nhận kết quả trả về của eSMS sau khi yêu cầu đăng ký template. 0: Đăng ký thất bại. 1: eSMS tiếp nhận thành công. 2: Đăng ký thành công.

  • Mẫu kết quả trả về

{
    "CodeResult": "100",
    "ErrorMessage": "ViHAT is moderating your template",
    "ServicePreviewId": 52353
}
  • Thông tin kết quả trả về

BiếnĐịnh nghĩa

CodeResult

Kết quả của Request

ErrorMessage

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

ServicepreviewId

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

Last updated