Gửi yêu cầu cấp quyền gọi
POST /RequestConsent HTTP/1.1
Host: $BASE_URL.Zalo
Content-Type: application/json
Accept: */*
Content-Length: 77
{
"call_type": "unknown",
"oa_id": "text",
"phone": "text",
"reason_code": "unknown"
}
A successful response
{
"call_type": "unknown",
"created_at": "2025-08-02T16:16:32.593Z",
"delivery_status": "unknown",
"delivery_time": "2025-08-02T16:16:32.593Z",
"error_code": 1,
"error_message": "text",
"expires_at": "2025-08-02T16:16:32.593Z",
"id": "text",
"is_charged": true,
"oa_id": "text",
"phone": "text",
"reason_code": "unknown",
"reply_status": "Z",
"shop_id": "text",
"status": "Z",
"updated_at": "2025-08-02T16:16:32.593Z",
"user_id": "text"
}
Request:
curl --location '$BASE_URL.Zalo/RequestConsent' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer $API-KEY' \
--data '{
"call_type": "video",
"oa_id": "<int64>",
"phone": "<string>",
"reason_code": "product_service_consulting"
}'
Response:
{
"call_type": "unknown",
"created_at": "2019-08-24T14:15:22Z",
"delivery_status": "unknown",
"delivery_time": "2019-08-24T14:15:22Z",
"error_code": 0,
"error_message": "string",
"expires_at": "2019-08-24T14:15:22Z",
"id": "string",
"is_charged": true,
"oa_id": "string",
"phone": "string",
"reason_code": "unknown",
"reply_status": "Z",
"shop_id": "string",
"status": "Z",
"updated_at": "2019-08-24T14:15:22Z",
"user_id": "string"
}
Cấu trúc body của request
call_type
string
audio: Cuộc gọi thoại
video: Cuộc gọi video
audio_and_video: Cả gọi thoại và video
oa_id
int64
ID của OA
phone
string
Số điện thoại người nhận
reason_code
string
product_service_consulting: Tư vấn sản phẩm / dịch vụ
order_appointment_confirmation: Xác nhận đơn hàng / cuộc hẹn
delivery_notification: Thông báo giao hàng
flight_announcement: Thông báo chuyến bay
update_order: Cập nhật đơn hàng
Cấu trúc thuộc tính dữ liệu trả về
id
int64
ID tin nhắn trên hệ thống của eTelecom
shop_id
int64
ID cửa hàng trên hệ thống của eTelecom
user_id
int64
ID người gửi tin trên hệ thống của eTelecom
oa_id
int64
ID của OA
call_type
string
audio: Cuộc gọi thoại
video: Cuộc gọi video
audio_and_video: Cả gọi thoại và video
error_code
int
Mã lỗi
error_message
string
Thông báo lỗi
is_charged
boolean
True
: Tin được tính phí
False
: Tin không được tính phí
status
string
Trạng thái
P
: Thành công
N
: Thất bại
phone
string
Số điện thoại người nhận
delivery_status
string
Unkown
: Không xác định
Received
: Đã nhận
Seen
: Đã xem
delivery_time
string<date-time>
Thời gian thiết bị của người dùng nhận được thông báo
updated_at
string<date-time>
Ngày cập nhật
created_at
string<date-time>
Ngày tạo
Last updated