Send message Consulting with attached photo

Note:

  • For APIs used for Shop, the API key is: <api_key>. The base_url information of the Shop.

  • For APIs used for Partner, the API key is: <shop_key>. The base_url information of the 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"
}

Request body structure

Parameters
Data type
Describe

attachment_id

string

Image ID, obtained using the upload API

image_url

string

Image URL

id

string

OA ID

user_id

string

Zalo User ID

Return data attribute structure

Parameters
Data type
Describe

direction

string (nzMessageDirection)

in out

msg_id

string

Notification ID

oa_id

string

OA ID

expired_date

string

Expiration date of Free Consulting news according to OA vervice package

remain

string

  • Number of messages sent Free consultation within the remaining 8 messages 48 hours limit (Messages sent are messages within the 8 messages 48 hour frame - "reply")

  • Number of messages sent for Free Consulting according to the remaining OA service package (Messages sent are messages within the free limit of the package - “sub_quota”)

total

string

Total number of messages sent Free consultation according to OA service package

owner_id

Entity ID owning Quota Package Value: OA ID or App ID

owner_type

string

Quota Package Owning Entity Value: OA: Owning entity is OA App: Owning entity is App

quota_type

string

Quota source used Carrying value: “reply” : Message sent out is message within 8 messages 48h frame “sub_quota” : Message sent out is message within free limit of package “purchase_quota” : Message sent out is message within limit of odd feature package “reward_quota” : Message sent out is message within limit of Redeem code

recipient_id

string

Recipient ID

sender_id

string

Sender ID

shop_id

string

Shop ID on eTelecom

type

string (vqUIDType)

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

user_id

string

User ID on eTelecom

Last updated