ข้ามไปที่เนื้อหา

Version 1.1

Changelog

  • Fix notify image: notify/text => nofity/image
  • Fix notify carousel

notify text

ส่งข้อความถึงผู้รับคนเดียว

curl -v -X POST {endpoint}/notify/text \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access token}' \
-d '{
    "customer_uid":"U53c7dd1da9...",
    "customer_ref":"5B704181C08BAB1D7E...",
    "text": "<< ข้อความ >>"
}'

notify image

ส่งรูปภาพถึงผู้รับคนเดียว

curl -v -X POST {endpoint}/notify/image \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access token}' \
-d '{
    "customer_uid":"U53c7dd1da9...",
    "customer_ref":"5B704181C08BAB1D7E...",
    "image": "https://<< รูปภาพ >>",
    "url": "https://tiplife-api.ecart2u.app",

    // Optional
    "altText": "ทดสอบข้อความ",
    "aspectRatio": "1:1",
    "size": "full",
    "align": "center",
    "gravity": "center"
}'

notify flexImage

ส่งรูปภาพแบบลิงค์ถึงผู้รับคนเดียว

curl -v -X POST {endpoint}/notify/flexImage \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access token}' \
-d '{
    "customer_uid":"U53c7dd1da9...",
    "customer_ref":"5B704181C08BAB1D7E...",
    "image": {
      "url": "https://<< รูปภาพ >>",
      "size": "full",
      "ratio": "1:1",
      "mode": "cover",
      "gravity": "center"
    },
    "action": {
      "label": "ดูรายละเอียด",
      "url": "https://tiplife-api.ecart2u.app",
      "color": "#ffffff",
      "background_color": "#ffdf01"
    }
}'

notify button

ส่งรูปภาพแบบลิงค์ถึงผู้รับคนเดียว

curl -v -X POST {endpoint}/notify/button \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access token}' \
-d '{
    "customer_uid":"U53c7dd1da9...",
    "customer_ref":"5B704181C08BAB1D7E...",
    "title": "ทดสอบหัวข้อ",
    "text": "ข้อความ 1",
    "alt_text": "ข้อความ 2",
    "image": "https://<< รูปภาพ >>",
    "action": {
      "label": "ดูรายละเอียด",
      "url": "https://tiplife-api.ecart2u.app",
      "color": "#ffffff",
      "background_color": "#ffdf01"
    }
}'