Skip to content

查看客户详情

接口信息

  • 接口: /agent-api/user/{user_id}/customer/detail/{customer_id}
  • 请求方式: GET

路由参数

参数类型示例解释必填
user_idstring5832d184-dd53-42a0-8ace-0bf8d660f4cc用户 id
customer_idstring780f7216-b131-462b-ba30-de7cd1f527de客户 id

请求示例

cURL
curl -X GET "https://ai.api.longlonglong.cn/agent-api/user/5832d184-dd53-42a0-8ace-0bf8d660f4cc/customer/detail/780f7216-b131-462b-ba30-de7cd1f527de" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN"
Go
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    client := &http.Client{}
    req, _ := http.NewRequest("GET", "https://ai.api.longlonglong.cn/agent-api/user/5832d184-dd53-42a0-8ace-0bf8d660f4cc/customer/detail/780f7216-b131-462b-ba30-de7cd1f527de", nil)
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("Authorization", "Bearer YOUR_TOKEN")
    resp, _ := client.Do(req)
    defer resp.Body.Close()
    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
JavaScript
const response = await fetch("https://ai.api.longlonglong.cn/agent-api/user/5832d184-dd53-42a0-8ace-0bf8d660f4cc/customer/detail/780f7216-b131-462b-ba30-de7cd1f527de", {
    method: "GET",
    headers: {
        "Content-Type": "application/json",
        "Authorization": "Bearer YOUR_TOKEN"
    }
});
const data = await response.json();
console.log(data);
Java
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        URL url = new URL("https://ai.api.longlonglong.cn/agent-api/user/5832d184-dd53-42a0-8ace-0bf8d660f4cc/customer/detail/780f7216-b131-462b-ba30-de7cd1f527de");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setRequestMethod("GET");
        conn.setRequestProperty("Content-Type", "application/json");
        conn.setRequestProperty("Authorization", "Bearer YOUR_TOKEN");
        BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
        String line;
        StringBuilder response = new StringBuilder();
        while ((line = br.readLine()) != null) {
            response.append(line);
        }
        br.close();
        System.out.println(response.toString());
    }
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://ai.api.longlonglong.cn/agent-api/user/5832d184-dd53-42a0-8ace-0bf8d660f4cc/customer/detail/780f7216-b131-462b-ba30-de7cd1f527de");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Content-Type: application/json",
    "Authorization: Bearer YOUR_TOKEN"
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
Python
import requests

url = "https://ai.api.longlonglong.cn/agent-api/user/5832d184-dd53-42a0-8ace-0bf8d660f4cc/customer/detail/780f7216-b131-462b-ba30-de7cd1f527de"
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_TOKEN"
}
response = requests.get(url, headers=headers)
print(response.json())
C++
#include <iostream>
#include <curl/curl.h>

int main() {
    CURL* curl = curl_easy_init();
    if (curl) {
        struct curl_slist* headers = NULL;
        headers = curl_slist_append(headers, "Content-Type: application/json");
        headers = curl_slist_append(headers, "Authorization: Bearer YOUR_TOKEN");
        curl_easy_setopt(curl, CURLOPT_URL, "https://ai.api.longlonglong.cn/agent-api/user/5832d184-dd53-42a0-8ace-0bf8d660f4cc/customer/detail/780f7216-b131-462b-ba30-de7cd1f527de");
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
        CURLcode res = curl_easy_perform(curl);
        curl_easy_cleanup(curl);
    }
    return 0;
}

返回示例

json
{
    "code": 200,
    "status": "success",
    "message": "查看客户详情成功",
    "data": {
        "id": "780f7216-b131-462b-ba30-de7cd1f527de",
        "user_id": "4fab5764-63c4-4d36-b4ef-1dcb670df629",
        "phone": "13667679151",
        "company": "3谔谔威威呃",
        "email": "34242424@qq.com",
        "name": "ai_7227840",
        "sex": 0,
        "created_at": "2023-09-21 11:23:12",
        "updated_at": "2023-10-11 10:18:55",
        "revision_logs": {
            "2025-08-21 00:00:00": [
                {
                    "id": 26137,
                    "record_id": null,
                    "task_id": null,
                    "customer_id": "780f7216-b131-462b-ba30-de7cd1f527de",
                    "component_id": "f2738134-02ec-4a20-98f3-ec8dacae5a02",
                    "component_name": "药店名称",
                    "value": "aiosf",
                    "created_at": "2025-08-21 00:00:00"
                }
            ]
        },
        "components": [
            {
                "id": "823c2978-6c93-402c-b2a0-a92e56853382",
                "name": "姓名",
                "type": "text",
                "data": {
                    "value": "wula"
                }
            }
        ]
    }
}

字段说明

字段说明
revision_logs修订记录,按日期分组
components组件列表
component_name组件名称
value修改内容

基于 MIT 许可发布