Fecify-顾客留言-详细
接口信息
- 接口地址:
{your-site-url}/api/skill/customer/get-contacts-info
- 基础 URL:
{your-site-url} 需替换为你自己的独立站 URL 地址,如 https://your-domain.com/admin
- 请求方式:
GET
- Content-Type:
application/json
- 说明: 获取单条顾客留言的完整详情,包含留言内容、自定义表单属性和客户端环境信息。
认证
请求头中需要携带 skill-access-token:
| Header |
值 |
skill-access-token |
{your-skill-access-token} (请替换为你自己的 token) |
请求参数
| 参数 |
类型 |
必填 |
说明 |
id |
Number |
是 |
留言 ID,从 顾客留言-列表 获取 |
请求示例
cURL
curl --location --request GET '{your-site-url}/api/skill/customer/get-contacts-info?id=101' \
--header 'skill-access-token: {your-skill-access-token}' \
--header 'Content-Type: application/json'
返回结果
code 为 200 表示成功;code 不为 200 表示失败。
成功响应
{
"code": 200,
"data": {
"info": {
"id": 101,
"shop_id": 15,
"status": 1,
"name": "Terry zhao",
"telephone": "32132",
"email": "fecify@126.com",
"comment": "留言内容示例",
"custom_attrs": [
{"attr_name": "我的电子邮件", "attr_value": ""},
{"attr_name": "我的类型", "attr_value": "类型 1"},
{"attr_name": "大小", "attr_value": "我的L"}
],
"updated_at": "2025-03-14 09:24:21",
"created_at": "2025-03-14 09:24:21"
},
"client_details": {
"id": 16,
"shop_id": 15,
"contacts_id": 101,
"country_code": "",
"region_code": "",
"region_name": "",
"city": "",
"timezone": "",
"longitude": "",
"latitude": "",
"client_type": 1,
"browser_ip": "119.166.178.244",
"browser_lang": "en-US",
"browser_height": "945",
"browser_width": "1905",
"user_agent": "Chrome",
"referring_site": "https://diydomain.fecmall.cn/contacts",
"fist_loading_url": "https://diydomain.fecmall.cn/contacts",
"created_at": "2025-03-14 09:24:22",
"updated_at": "2025-03-14 09:24:22",
"country_name": {
"name": "",
"cn_name": ""
}
}
},
"message": "success"
}
返回字段说明
data.info — 留言信息
| 字段 |
类型 |
说明 |
id |
Number |
留言 ID |
shop_id |
Number |
店铺 ID |
status |
Number |
状态:1 = 未处理,2 = 已处理 |
name |
String |
留言人名称 |
telephone |
String |
电话 |
email |
String |
邮箱 |
comment |
String |
留言正文内容 |
custom_attrs |
Array |
顾客提交的自定义表单属性列表 |
created_at |
String |
创建时间 |
updated_at |
String |
更新时间 |
custom_attrs 子项
| 字段 |
类型 |
说明 |
attr_name |
String |
自定义属性名称 |
attr_value |
String / Array |
自定义属性值。单选/文本为字符串,多选时为数组 |
data.client_details — 客户端详情
| 字段 |
类型 |
说明 |
id |
Number |
记录 ID |
shop_id |
Number |
店铺 ID |
contacts_id |
Number |
关联的留言 ID |
country_code |
String |
国家代码 |
region_code |
String |
地区代码 |
region_name |
String |
地区名称 |
city |
String |
城市 |
timezone |
String |
时区 |
longitude |
String |
经度 |
latitude |
String |
纬度 |
client_type |
Number |
客户端类型:1 = PC,2 = 平板,3 = 手机 |
browser_ip |
String |
浏览器 IP |
browser_lang |
String |
浏览器语言 |
browser_height |
String |
浏览器窗口高度(px) |
browser_width |
String |
浏览器窗口宽度(px) |
user_agent |
String |
User Agent |
referring_site |
String |
来源网站 |
fist_loading_url |
String |
首次落地页 URL |
created_at |
String |
创建时间 |
updated_at |
String |
更新时间 |
country_name.name |
String |
国家名称 |
country_name.cn_name |
String |
国家中文名称 |
注意事项
id 通过 顾客留言-列表 获取。
- 详情比列表多出
comment(留言正文)和 client_details(客户端详情)两个内容。
custom_attrs 内容取决于店铺后台的自定义表单配置,字段名和数量可变。