为什么Clio Users端点总是返回一个null的联系人对象?

时间:2019-04-17 18:11:12

标签: api clio-api

我正在尝试创建有关事件的指标,并将这些指标与关联的用户和联系人联系起来。我能够成功地从“事项”,“用户”和“联系人”端点中提取数据;但是,API文档建议应该有一个“联系人”对象,该对象可以从具有联系人ID的“用户”端点返回。问题在于该对象始终为null。谁能告诉我这是为什么以及如何解决?

以下是文档:

https://app.clio.com/api/v4/documentation#operation/User#index

这是我的邮递员请求,我正在使用该请求来验证是否在我的应用程序到达端点之前正在检索所需的数据。

https://www.getpostman.com/collections/4f7e3660330fe912c2d5

这是我可能会检索到的json的示例:

{
"data": [
{
"account_owner": true,
"clio_connect": true,
"court_rules_default_attendee": true,
"default_calendar_id": 0,
"email": "string",
"enabled": true,
"etag": "string",
"first_name": "string",
"id": 0,
"initials": "string",
"last_name": "string",
"name": "string",
"phone_number": "string",
"rate": 0,
"subscription_type": "Attorney",
"time_zone": "string",
"roles": [],
"created_at": "2019-04-17T15:23:02Z",
"updated_at": "2019-04-17T15:23:02Z",
"default_activity_description": [],
"notification_methods": [],
"account": [],
"avatar": [],
***"contact": [
{
"id": 0,
"etag": "string",
"name": "string",
"first_name": "string",
"middle_name": "string",
"last_name": "string",
"type": "Company",
"created_at": "2019-04-17T15:23:02Z",
"updated_at": "2019-04-17T15:23:02Z",
"prefix": "string",
"title": "string",
"initials": "string",
"clio_connect_email": "string",
"locked_clio_connect_email": true,
"client_connect_user_id": 0,
"primary_email_address": "string",
"primary_phone_number": "string",
"ledes_client_id": "string",
"is_client": true
}
]***,
"job_title": []
}
]
}

这实际上是我得到的:

注意:我没有检索所有可能的属性。

{
    "data": [
        {
            "id": 344993632,
            "etag": "\"14902f605c2616c56a68f6d0d2c36334\"",
            "name": "Clio SetUp",
            "first_name": "Clio",
            "last_name": "SetUp",
            "phone_number": null,
            "initials": "CS",
            "default_calendar_id": 852014,
            "subscription_type": "Attorney",
            "email": "frances.bourikas+h@clio.com",
            "created_at": "2017-06-22T15:16:10-06:00",
            "updated_at": "2018-12-28T05:27:49-07:00",
            "roles": [
                "admin"
            ],
            "job_title": null,
            "account": {
                "id": 809498454,
                "etag": "\"303ff7565c8c22be6a68f6d0d2c36334\"",
                "name": "Hoglund, Chwialkowski & Mrozik",
                "state": "paid"
            },
            ***"contact": null***
        },

...
}

1 个答案:

答案 0 :(得分:0)

检查GET请求的语法。语法很棘手,但是应该类似于:

https://app.clio.com/api/v4/users.json?fields=id,name,first_name,last_name,email,enabled,account_owner,phone_number,rate,subscription_type,time_zone,account {id},联系人{id,姓名,名字,姓氏,类型,主要电子邮件地址,主要电话号码,is_client}创建时间,更新时间

当然是URL编码的。