- CategoryAPI
- ProductAPI
- Prices&StocksAPI
- Promos
- PricingStrategyAPI
- WarehouseAPI
- PolygonAPI
- FBS&rFBSMarks
- FBS
- ReturnsAPI
- CancellationAPI
- ChatAPI
- ReportAPI
- AnalyticsAPI
- FinanceAPI
聊天清单
POST
/v1/chat/list
ChatAPI
last_message_id = 0
的聊天记录,并且没有消息。这种情况发生在买家与卖家开了一个聊天记录,但什么也没写。请求参数
Header 参数
Client-Id
string
用户识别号。
示例值:
{{Client-Id}}
Api-Key
string
API-密钥。
示例值:
{{Api-Key}}
Body 参数application/json
chat_id_list
array[string]
可选
page
integer <int32>
答复中的页数。
page_size
integer <int32>
可选
with
object (object)
可选
first_unread_message_id
boolean
可选
first_unread_message_id
参数生成属性。如果true
,您将得到答复中第一条未读信息的识别码。unread_count
boolean
可选
unread_count
参数生成属性。如果true
,您将在答复中得到未读聊天信息的数量。示例
{
"chat_id_list": [
"83ef37bf-f13d-494c-a906-1e444d633d27"
],
"page": 1,
"page_size": 10,
"with": {
"first_unread_message_id": true,
"unread_count": true
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api-seller.ozon.ru/v1/chat/list' \
--header 'Client-Id: ' \
--header 'Api-Key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"chat_id_list": [
"83ef37bf-f13d-494c-a906-1e444d633d27"
],
"page": 1,
"page_size": 10,
"with": {
"first_unread_message_id": true,
"unread_count": true
}
}'
返回响应
🟢200聊天清单
application/json
Body
result
array[object (Chat models) {5}]
可 选
first_unread_message_id
integer <uint64>
可选
id
string
聊天识别码。
last_message_id
integer <uint64>
可选
unread_count
integer <int64>
可选
users
array[object (object) {2}]
可选
total_unread_count
integer <int64>
未读消息的总数。
示例
{
"result": [
{
"id": "83ef37bf-f13d-494c-a906-1e444d633d27",
"users": [
{
"id": "123",
"type": "seller"
},
{
"id": "71252940",
"type": "customer"
}
],
"last_message_id": 3000000001834744300,
"unread_count": 0,
"first_unread_message_id": 0
}
],
"total_unread_count": 0
}
🟠400参数有误
🟠403拒绝访问
🟠404未找到答复
🟠409请求冲突
🔴500内部服务器出错
修改于 2023-11-03 06:04:11