联系人

查询客户/供应商联系人

查询客户联系人
curl -i -X GET --header "Authorization: Token token=<user_token>, uid=<uid>" \
  http://example.com/api/contacts.json?customer_id=1

查询供应商联系人
curl -i -X GET --header "Authorization: Token token=<user_token>, uid=<uid>" \
  http://example.com/api/contacts.json?supplier_id=1
{
    "status": {
        "code": 200,
        "message": "OK"
    },
    "contacts": [
        {
            "id": 31,
            "name": "联系人1",
            "telephone": "021-78945612",
            "mobile": "13512345678",
            "address": "上海市浦东新区张江高科技园区亮秀路112号Y1座705室",
            "note": "",
            "is_primary": "primary"
        },
        {
            "id": 112,
            "name": "联系人2",
            "telephone": "",
            "mobile": "13612345678",
            "address": "",
            "note": "",
            "is_primary": "not_primary"
        }
    ]
}
  • HTTP请求

    GET api/contacts.json?customer_id=1

  • 请求参数说明

参数名 是否必填 默认值 字段说明
customer_id 客户ID
supplier_id 供应商ID
  • 返回字段说明
返回值字段 字段类型 字段说明
id integer 联系人ID
name string 名称
telephone string 电话号码
mobile string 手机号
address string 地址
note string 备注
is_primary string 是否主要联系人,primary表示是,not_primary表示不是
文档更新时间: 2025-03-17 14:52   作者:姜河