Send request for calling permission
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"
}
Request body structure
call_type
string
audio: Voice call
video: Video Call
audio_and_video: Both voice and video calls
id
int64
OA ID
phone
string
Recipient phone number
reason_code
string
product_service_consulting : Product / service consulting
order_appointment_confirmation : Order / appointment confirmation
delivery_notification : Delivery notification
flight_announcement : Flight announcement
update_order : Update order
Return data attribute structure
id
int64
Message ID on eTelecom system
shop_id
int64
Store ID on eTelecom system
user_id
int64
Sender ID on eTelecom system
id
int64
OA ID
call_type
string
audio: Voice call
video: Video Call
audio_and_video: Both voice and video calls
error_code
int
Error code
error_message
string
Error message
is_charged
boolean
True
: Paid news
False
: News is not charged
status
string
Status
P
: Success
N
: Failure
phone
string
Recipient phone number
delivery_status
string
Unkown
: Unknown
Received
: Received
Seen
: Viewed
delivery_time
string<date-time>
Time the user's device receives the notification
updated_at
string<date-time>
Update date
created_at
string<date-time>
Date created
Last updated