Loại tin nhắn
Loại tin nhắn
Bối cảnh
API này cho phép bạn truy xuất thông tin thẻ được chuẩn hóa để hiển thị dữ liệu hội thoại. Bạn có thể chọn sử dụng nó dựa trên yêu cầu cụ thể của mình.
Dữ liệu tổng thể của chúng tôi được chia thành ba phần, và nội dung trong ba phần này có thể khác nhau tùy thuộc vào tình huống, người dùng hoặc mục đích.
Content
Trường content chứa metadata của nội dung tin nhắn, chỉ bao gồm một tập hợp giới hạn các trường quan trọng.
Custom UI? Build from Raw Data
Trường data đóng gói dữ liệu nghiệp vụ liên quan đến tin nhắn, chẳng hạn như thông tin đơn hàng, sản phẩm hoặc logistics.
Nhà phát triển có thể sử dụng trường này để xây dựng các biểu diễn UI tùy chỉnh dựa trên yêu cầu riêng của họ. Trường này chỉ được trả về khi request.query.need_data=true. Lưu ý rằng dữ liệu nghiệp vụ có thể nhạy cảm với thời gian.
Need Speed? Use Plaintext.
Trường plaintext là biểu diễn văn bản thuần túy của tin nhắn nhằm mục đích hiển thị UI.
Nó đã bao gồm sẵn thông tin nghiệp vụ liên quan, và nhà phát triển có thể sử dụng trực tiếp trường này để render UI mà không cần xử lý thêm. Trường này chỉ được trả về khi request.query.need_plaintext=true. Lưu ý rằng dữ liệu nghiệp vụ có thể nhạy cảm với thời gian.
TEXT
content
Properties
| Properties | Type | Description |
|---|---|---|
| content | string | Nội dung văn bản |
Example
JSONWord Wrap
{
"content": "simple text"
}
IMAGE / EMOTICONS
content
JSONWord Wrap
{
"url": "https://tosv.boei18n.byted.org/obj/temai-im/FszkJ53nSapYG6KDaJQmqR3jjoZGwww304-290",
"width": 300,
"height": 300
}
Properties
| Properties | Type | Description |
|---|---|---|
| url | string | URL của hình ảnh |
| width | int | Chiều rộng của hình ảnh |
| height | int | Chiều cao của hình ảnh |
VIDEO
content
JSONWord Wrap
{
"url": "https://video-boei18n.byted.org/storage/v1/tos-boei18n-v-c72c01/e8240f35244646428df9c3244d1a7408?x-tos-algorithm=v2&x-tos-authkey=5bf25627da095a5cba28ace592de46cc&x-tos-expires=1681980481&x-tos-signature=r_bRxtrvGhXAuZgMmNhlZ_Upqzg",
"cover": "https://p-boei18n.byted.org/tos-boei18n-v-c72c01/o8keEOhzTcNCcJyAbkWZwpLIyTfkJxcGbRBvLP~tplv-jvtte31kaf-origin-jpeg.jpeg?",
"width": 640,
"height": 360,
"duration": "20.504",
"vid": "v0e30cg700f7cgcmu8jc77u9e2bdp95g",
"expire_time": "1681980481",
"format": "mp4",
"size": 400000,
"bit_rate": 156067,
"quality": "original",
"codec_type": "h264"
}
Properties
| Properties | Type | Description |
|---|---|---|
| url | string | URL của video |
| width | int | Chiều rộng của video |
| height | int | Chiều cao của video |
| duration | string | Thời lượng của video |
| vid | string | Định danh của video |
| expire_time | int | Thời điểm hết hạn của video, theo Unix timestamp |
| format | string | Định dạng tệp video |
| size | int | Kích thước tệp tính bằng byte |
| bit_rate | int | Bit rate của video tính bằng kbps |
| quality | string | Mức chất lượng video |
| codec_type | string | Codec của video |
ORDER_CARD
content
Properties
| Properties | Type | Description |
|---|---|---|
| order_id | string | Định danh đơn hàng |
Example
JSONWord Wrap
{
"order_id": "123"
}
data
Properties
| Properties | Type | Description |
|---|---|---|
| order_id | string | Định danh đơn hàng |
| order_status | string | Trạng thái hiện tại của đơn hàng |
| product_name | string | Tên sản phẩm |
| product_image | string | URL hình ảnh sản phẩm |
| paid_price | string | Tổng số tiền đã thanh toán |
| quantity | int | Số lượng mặt hàng trong đơn hàng |
| order_link | string | URL đến trang chi tiết đơn hàng |
Example
JSONWord Wrap
{
"order_id": "123",
"order_status": "Delivered",
"product_id": "1234",
"product_name": "abc",
"product_image": "https://p16-oec-sg.ibyteimg.com/tos-alisg-i-aphluv4xwc-sg/1a80a431f63f447dbcb7f19b666757ea~tplv-aphluv4xwc-resize-webp:800:800.webp?dr=15582&t=555f072d&ps=933b5bde&shp=f359665f&shcp=5566cfe3&idc=my2&from=4082722399",
"paid_price": "Rp16.000",
"quantity": 3,
"order_link": "https://seller-us.tiktok.com/order/detail?order_no=123"
}
plaintext
Example
YAMLWord Wrap
Order card shared:
- Order ID: 582362672348497014;
- Current order status: Delivered;
- Number of items: 3;
- Order payment amount: Rp16.000.
View full details at: https://abc.com/
PRODUCT_CARD
content
Properties
| Properties | Type | Description |
|---|---|---|
| product_id | string | Định danh sản phẩm |
Example
JSONWord Wrap
{
"product_id": "1234"
}
data
Properties
| Properties | Type | Description |
|---|---|---|
| product_id | string | Định danh sản phẩm |
| product_name | string | Tên hiển thị của sản phẩm |
| product_image | string | URL hình ảnh sản phẩm |
| product_highest_price | string | Giá cao nhất trong khoảng giá của sản phẩm |
| product_lowest_price | string | Giá thấp nhất trong khoảng giá của sản phẩm |
| sold_quantity | int | Tổng số đơn vị đã bán |
| product_link | string | URL đến trang chi tiết sản phẩm |
Example
JSONWord Wrap
{
"product_id": "1234",
"product_name": "abc",
"product_image": "https://p16-oec-sg.ibyteimg.com/tos-alisg-i-aphluv4xwc-sg/1a80a431f63f447dbcb7f19b666757ea~tplv-aphluv4xwc-resize-webp:800:800.webp?dr=15582&t=555f072d&ps=933b5bde&shp=f359665f&shcp=5566cfe3&idc=my2&from=4082722399",
"product_highest_price": "139.000₫",
"product_lowest_price": "119.000₫",
"sold_quantity": 40013,
"product_link": "https://seller-us.tiktok.com/product/manage?search_content=1234"
}
plaintext
Example
YAMLWord Wrap
Product card shared:
- Product ID: 1732529206731441911;
- Product name: abc;
- Product lowest price: 119.000₫;
- Product highest price: 139.000₫;
- Sold: 40642.
View full details at: https://abc.com/
RETURN_REFUND_CARD
content
Properties
| Properties | Type | Description |
|---|---|---|
| order_id | string | Định danh đơn hàng liên quan |
| sku_id | string | Định danh SKU sản phẩm cụ thể cho việc trả hàng/hoàn tiền |
Example
JSONWord Wrap
{
"order_id": "123",
"sku_id": "1234"
}
data
Properties
| Properties | Type | Description |
|---|---|---|
| sku_id | string | Định danh SKU sản phẩm cụ thể |
| order_id | string | Định danh đơn hàng liên quan |
| order_status | string | Trạng thái hiện tại của đơn hàng |
| product_name | string | Tên của sản phẩm đang được trả/hoàn tiền |
| product_image | string | URL của hình ảnh sản phẩm |
| paid_price | string | Số tiền đã thanh toán cho SKU |
| quantity | int | Số lượng mặt hàng của SKU |
| order_link | string | URL đến trang chi tiết đơn hàng gốc |
Example
JSONWord Wrap
{
"sku_id": "1",
"order_id": "123",
"order_status": "Delivered",
"product_id": "1234",
"product_name": "abc",
"product_image": "https://p16-oec-sg.ibyteimg.com/tos-alisg-i-aphluv4xwc-sg/1a80a431f63f447dbcb7f19b666757ea~tplv-aphluv4xwc-resize-webp:800:800.webp?dr=15582&t=555f072d&ps=933b5bde&shp=f359665f&shcp=5566cfe3&idc=my2&from=4082722399",
"paid_price": "Rp10.667",
"quantity": 2,
"order_link": "https://seller-us.tiktok/com/order/detail?order_no=123"
}
plaintext
Example
YAMLWord Wrap
Return/refund form shared:
- SKU ID: 1;
- Order ID: 123;
- Order status: Delivered;
- Product ID: 1234;
- Product name: abc;
- Number of items: 2;
- Reverse amount: Rp10.667.
COUPON_CARD
content
Properties
| Properties | Type | Description |
|---|---|---|
| coupon_id | string | Định danh coupon |
Example
JSONWord Wrap
{
"coupon_id": "12"
}
data
Properties
| Properties | Type | Description |
|---|---|---|
| coupon_id | string | Định danh coupon |
| coupon_title | string | Tiêu đề hiển thị của coupon |
| coupon_type | string | Loại coupon (ví dụ: "Regular") |
| discount | string | Số tiền hoặc phần trăm giảm giá |
| threshold | string | Điều kiện cần đáp ứng để sử dụng coupon |
| scope | string | Phạm vi sản phẩm mà coupon áp dụng |
| start_time | int | Thời điểm bắt đầu hiệu lực của coupon (Unix timestamp) |
| end_time | int | Thời điểm kết thúc hiệu lực của coupon (Unix timestamp) |
| coupon_link | string | URL đến trang chi tiết coupon |
Example
JSONWord Wrap
{
"coupon_id": "12",
"coupon_title": "cheap",
"coupon_type": "Regular",
"discount": "₱26.00 off",
"threshold": "on order over ₱196.00",
"scope": "Selected products",
"start_time": 1768634640,
"end_time": 1773829080,
"coupon_link": "https://seller-us.toktok.com/promotion/marketing-tools/voucher/view/12"
}
plaintext
Example
YAMLWord Wrap
Coupon shared:
- Coupon ID: 12;
- Coupon title: cheap;
- Coupon discount: ₱26.00 off;
- Coupon scope: Selected products;
- Coupon condition: on order over ₱196.00;
- Coupon validity: Jan 17, 2026 3:24 PM to Mar 18, 2026 6:18 PM GMT+08:00.
View full details at: https://abc.com/
LOGISTICS_CARD
content
Properties
| Properties | Type | Description |
|---|---|---|
| order_id | string | Định danh đơn hàng liên quan |
| package_id | string | Định danh kiện hàng cụ thể để theo dõi |
Example
JSONWord Wrap
{
"order_id": "123",
"package_id": "12345"
}
data
Properties
| Properties | Type | Description |
|---|---|---|
| packages | list | Một mảng các đối tượng kiện hàng, mỗi đối tượng chứa thông tin logistics và sản phẩm. |
- Package
| Properties | Type | Description |
|---|---|---|
| package_id | string | Định danh kiện hàng |
| product_name | string | Tên hiển thị của sản phẩm |
| product_image | string | URL hình ảnh sản phẩm |
| paid_price | string | Tổng số tiền đã thanh toán |
| quantity | int | Số lượng mặt hàng trong kiện hàng |
| predict_delivery_time_min | int | Thời gian giao hàng dự kiến tối thiểu |
| predict_delivery_time_max | int | Thời gian giao hàng dự kiến tối đa |
| delivery_option | string | Tùy chọn giao hàng đã chọn cho đơn hàng |
| tracking_number | string | Mã theo dõi do nhà cung cấp vận chuyển cung cấp |
| shipping_provider_name | string | Tên của nhà cung cấp vận chuyển hoặc đơn vị vận chuyển |
| tracking | list | Danh sách các bản ghi theo dõi mô tả lịch sử trạng thái của lô hàng |
- Tracking
| Properties | Type | Description |
|---|---|---|
| description | string | Mô tả về cập nhật trạng thái của lô hàng |
| update_time_millis | int | Thời điểm khi trạng thái lô hàng được cập nhật |
Example
JSONWord Wrap
{
"packages": [
{
"package_id": "12345",
"product_name": "abc",
"product_image": "https://p16-oec-sg.ibyteimg.com/tos-alisg-i-aphluv4xwc-sg/1a80a431f63f447dbcb7f19b666757ea~tplv-aphluv4xwc-resize-webp:800:800.webp?dr=15582&t=555f072d&ps=933b5bde&shp=f359665f&shcp=5566cfe3&idc=my2&from=4082722399",
"paid_price": "$0.01",
"quantity": 1,
"predict_delivery_time_min": 1763198750000,
"predict_delivery_time_max": 1763457950000,
"delivery_option": "Standard shipping",
"tracking_number": "1ZCIETST0422222228",
"shipping_provider_name": "UPS",
"tracking": [
{
"description": "Package has been delivered!",
"update_time_millis": 1763954669267
},
{
"description": "Arrived at the carrier's facility.",
"update_time_millis": 1763954598311
}
]
}
]
}
plaintext
Example
YAMLWord Wrap
Logistics card shared:
- Order ID: 123;
- Package ID: 12345;
- Number of items: 1;
- Order payment amount: Rp63.852;
- Delivery option: Economy shipping
- J&T Express: JX7053814071;
- Estimated delivery date: Jan 17, 2026 3:24 PM - Mar 18, 2026 6:18 PM GMT+08:00;
- Logistics latest update:
Jan 30, 2026 2:35 AM
Your package has left the sorting center in Tangerang City.
Jan 30, 2026 1:48 AM
Your package has arrived at the sorting center in Tangerang City.
Jan 29, 2026 9:03 PM
Your package has been collected by our carrier in Tangerang Regency.
Jan 29, 2026 1:34 PM
The seller is preparing your package, and will hand it over to our carrier for shipping..
View full details at: https://abc.com/
[Others]
OTHER / NOTIFICATION / ALLOCATED_SERVICE / BUYER_ENTER_FROM_TRANSFER
content
Properties
| Properties | Type | Description |
|---|---|---|
| content | string | Nội dung văn bản |
Example
JSONWord Wrap
{
"content": "...."
}
Nội dung này có hữu ích không?Hữu ích
Không hữu ích
PreviousNext