- CategoryAPI
- ProductAPI
- Prices&StocksAPI
- Promos
- PricingStrategyAPI
- WarehouseAPI
- PolygonAPI
- FBS&rFBSMarks
- FBS
- ReturnsAPI
- CancellationAPI
- ChatAPI
- ReportAPI
- AnalyticsAPI
- FinanceAPI
- DeliveryFBS
- DeliveryrFBS
- Pass
- RFBSReturnsAPI
- BetaMethod
- Examples
- ReviewAPI
聊天历史记录
POST
/v2/chat/history
ChatAPI
请求参数
Header 参数
Client-Id
string
用户识别号。
Api-Key
string
API-密钥。
Body 参数application/json
chat_id
string
聊天识别码。
direction
string
可选
Forward
— 从旧到新。Backward
— 从新到旧。Backward
。消息的数量可以在 limit
参数中设置。from_message_id
integer <uint64>
可选
limit
integer <int64>
必需
示例
{
"chat_id": "18b8e1f9-4ae7-461c-84ea-8e1f54d1a45e",
"direction": "Forward",
"from_message_id": "3000000000118032000",
"limit": 1
}
示例代码
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/v2/chat/history' \
--header 'Client-Id;' \
--header 'Api-Key;' \
--header 'Content-Type: application/json' \
--data-raw '{
"chat_id": "18b8e1f9-4ae7-461c-84ea-8e1f54d1a45e",
"direction": "Forward",
"from_message_id": "3000000000118032000",
"limit": 1
}'
返回响应
🟢200成功
application/json
Body
has_next
boolean
可选
messages
array[object (object) {5}]
可选
direction
参数排序的信息数组。created_at
string <date-time>
信息创建日期。
data
array[string]
可选
is_read
boolean
表示信息已读。
messageId
integer <uint64>
信息识别码。
user
object (object)
可选
示例
{
"has_next": true,
"messages": [
{
"message_id": "3000000000817031942",
"user": {
"id": "115568",
"type": "Сustomer"
},
"created_at": "2022-07-18T20:58:04.528Z",
"is_read": true,
"data": [
"Здравствуйте, у меня вопрос по вашему товару \"Стекло защитное для смартфонов\", артикул 11223. Подойдет ли он на данную [ модель ](https://www.ozon.ru/product/smartfon-samsung-galaxy-a03s-4-64-gb-chernyy) телефона?"
]
}
]
}
🟠400请求有误
🟠403禁止访问
🟠404记录不存在
🟠409409
🔴500服务器错误
修改于 2025-06-10 08:30:17