Hàm lấy danh sách template Zalo
HTTP request
POST https://api-portal.senbac.com/MainService.svc/json/GetTemplate/
Content Type: application/json
Response Type: application/json
curl --location 'https://api-portal.senbac.com/MainService.svc/json/GetTemplate/' \
--header 'Content-Type: application/json' \
--data '{
"ApiKey": "{{ApiKey}}",
"SecretKey": "{{SecretKey}}",
"OAId": "{{OAId}}",
"SmsType": "{{SmsType}}"
}'Cấu trúc body của request:
Tham số
Kiểu dữ liệu
Tính bắt buộc
Mô tả
ApiKey
string
Yes
ApiKey của tài khoản.
SecretKey
string
Yes
Secretkey của tài khoản.
OAId
string
Yes
ID của OA cần lấy template.
SmsType
string
Yes
Loại tin 24: Zalo ưu tiên. 25: Zalo bình thường.
Response:
{
"CodeResult": "100",
"ErrorMessage": "success",
"ZNSTemplates": [
{
"TempContent": "<div class=\"group-desc\" style=\"box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: #131820; font-family: Muli, sans-serif; font-size: 16px;\"> <p style=\"box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; color: #394e60; font-size: 0.875rem; line-height: 20px;\">Mã OTP của bạn là</p> </div> <p><span class=\"otp-code\" style=\"box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: bold; color: #131820; font-size: 1.5rem; letter-spacing: 3.75px; line-height: 24px; display: block; padding: 12px 0px; font-family: Muli, sans-serif;\">{{otp}}</span></p> <div class=\"group-desc\" style=\"box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: #131820; font-family: Muli, sans-serif; font-size: 16px;\"> <p style=\"box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; color: #394e60; font-size: 0.875rem; line-height: 20px;\">Không tiết lộ cho bất kỳ ai, Mã xác nhận sẽ có hiệu lực trong 5 phút.</p> </div>",
"TempId": 205644,
"TempName": "Xác nhận đăng ký dịch vụ",
"ZNSTempDetail": [
{
"Limit": 10,
"Param": "otp",
"ParamLevel": 1,
"RequireType": "type_text"
}
]
}
]
}Request hợp lệ.
Sai thông tin ApiKey/SecretKey.
Cấu trúc body response:
Thuộc tính
Kiểu dữ liệu
Mô tả
TempContent
string
Nội dung của template.
Tempid
string
Template ID.
TempName
string
Tên template.
ZNSTempDetail
string
Chi tiết của template.
Limit
string
Độ dài của template.
Param
string
Tên biến.
ParamLevel
string
Thứ tự biến.
RequireType
string
Kiểu dữ liệu của biến.
Thông chi tiết mã lỗi xem ở bảng: Mã lỗi .
Last updated