✏️API đăng ký gói cước viễn thông
API lấy mã OTP
API dùng để lấy mã OTP đăng ký gói cước viễn thông
POST https://api.dmall.com.vn/api-customer/public/order/partner/get-otp
Headers
Name
Type
Description
api-key*
String
Mã api-key dùng để xác thực
Request Body
Name
Type
Description
phone*
String
Số thuê bao đăng ký gói cước
utmSource
String
utmMedium
String
utmContent
String
utmCampaign
String
productCode*
Double
Mã gói cước nhà mạng cung cấp. Ví dụ V200B
telcoCode*
String
Mã nhà mạng. Hiện tại hỗ trợ VIETTEL, MOBIFONE
{
"data": {
"orderCode": "DG20231113172059456724",
"telcoTransId": "102996904"
},
"errorCode": 200,
"message": "Tạo giao dịch thành công",
"success": true,
}Ví dụ
{
"telcoCode": "MOBIFONE",
"productCode": "6C120",
"phone": "0936004420",
"utmCampaign": "",
"utmContent": "",
"utmMedium": "",
"utmSource": ""
}curl --location 'https://api.dmall.com.vn/api-customer/public/order/partner/get-otp'
--header 'api-key: 6vZNjMXffyBXCqqSw3dMULc5OZgSxZnN'
--header 'Content-Type: application/json'
--data '{ "telcoCode": "VIETTEL", "productCode": "MP5X", "phone": "0337880699", "utmCampaign": "", "utmContent": "", "utmMedium": "", "utmSource": "" }'API đăng ký gói cước với OTP
API dùng để đăng ký gói cước viễn thông qua OTP
POST https://api.dmall.com.vn/api-customer/public/order/partner/register_with_otp
Headers
Name
Type
Description
api-key*
String
Mã api-key dùng để xác thực
Request Body
Name
Type
Description
otp*
String
Mã OTP nhận được ở tin nhắn gửi về
orderCode*
String
Mã giao dịch nhận được khi tạo giao dịch thành công
{
"success": true,
"errorCode": 200,
"message": "Đăng ký gói cước thành công",
"data": {
"type": "CALL/SMS",
"code": "MP5X",
}
}Ví dụ
{
"orderCode": "DG20231113172847592599",
"otp": "246595"
}curl --location 'https://api.dmall.com.vn/api-customer/public/order/partner/register_with_otp' \
--header 'api-key: 6vZNjMXffyBXCqqSw3dMULc5OZgSxZnN' \
--header 'Content-Type: application/json' \
--data '{
"orderCode": "DG20231113172847592599",
"otp": "246595"
}'Last updated