Gửi tin tư vấn dạng hình ảnh

Lưu ý:

  • Đối với các API sử dụng cho Shop thì API_KEY: <api_key>.Thông tin base_url của Shop

  • Đối với các API sử dụng cho Partner thì API_KEY: <shop_key>.Thông tin base_url của Partner

OASendImage

post
Body
oa_idstring · int64Optional
Responses
200
A successful response
application/json
post
POST /v1/shop.Zalo/OASendImage HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 101

{
  "message": {
    "attachment_id": "text",
    "image_url": "text"
  },
  "oa_id": "text",
  "recipient": {
    "user_id": "text"
  }
}
200

A successful response

{
  "direction": "in",
  "msg_id": "text",
  "oa_id": "text",
  "quota": {
    "expired_date": "text",
    "owner_id": "text",
    "owner_type": "text",
    "quota_type": "text",
    "remain": "text",
    "total": "text"
  },
  "recipient_id": "text",
  "sender_id": "text",
  "shop_id": "text",
  "type": "unknown",
  "user_id": "text",
  "wl_partner_id": "text",
  "zl_user_id": "text"
}

Request:

curl --location 'BASE_URL.Zalo/OASendImage' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer $API_KEY' \
--data '{
  "message": {
    "attachment_id": "string",
    "image_url": "string"
  },
  "oa_id": "string",
  "recipient": {
    "user_id": "string"
  }
}'

Response:

{
  "direction": "in",
  "msg_id": "string",
  "oa_id": "string",
  "quota": {
    "expired_date": "string",
    "owner_id": "string",
    "owner_type": "string",
    "quota_type": "string",
    "remain": "string",
    "total": "string"
  },
  "recipient_id": "string",
  "sender_id": "string",
  "shop_id": "string",
  "type": "unknown",
  "user_id": "string",
  "wl_partner_id": "string",
  "zl_user_id": "string"
}

Cấu trúc body của request

Tham số
Kiểu dữ liệu
Mô tả

attachment_id

string

ID hình ảnh, có được khi dùng API upload

image_url

string

URL hình ảnh

oa_id

int64

ID của OA

user_id

string

ID người dùng Zalo

Cấu trúc thuộc tính dữ liệu trả về

Tham số
Kiểu dữ liệu
Mô tả

direction

string (nzMessageDirection)

in out

msg_id

string

ID của thông báo

oa_id

string

ID của OA

expired_date

string

Ngày hết hạn sử dụng tin Tư vấn miễn phí theo gói dịch vụ OA

remain

string

  • Số lượt gửi tin tin Tư vấn miễn phí trong hạn mức 8 tin 48 giờ còn lại (Tin gửi ra là tin trong khung 8 tin 48h - “reply”)

  • Số lượt gửi tin Tư vấn miễn phí theo gói dịch vụ OA còn lại (Tin gửi ra là tin nằm trong hạn mức miễn phí theo gói - “sub_quota”)

total

string

Tổng số lượng gửi tin Tư vấn miễn phí theo gói dịch vụ OA

owner_id

ID thực thể sở hữu Quota Package Giá trị: OA ID hoặc App ID

owner_type

string

Thực thể sở hữu Quota Package Giá trị: OA: Thực thể sở hữu là OA App: Thực thể sở hữu là App

quota_type

string

Nguồn quota sử dụng Mang giá trị: “reply”: Tin gửi ra là tin trong khung 8 tin 48h “sub_quota”: Tin gửi ra là tin nằm trong hạn mức miễn phí theo gói “purchase_quota”: Tin gửi ra là tin nằm trong hạn mức gói tính năng lẻ “reward_quota”: Tin gửi ra là tin nằm trong hạn mức Redeem code

recipient_id

string

ID của người nhận

sender_id

string

ID người gửi

shop_id

string

ID của shop trên eTelecom

type

string (vqUIDType)

"unknown" "text" "audio" "video" "photo" "GIF" "link" "file" "sticker" "location" "business_card"

user_id

string

ID user trên eTelecom

Last updated