合同列表
请求接口
/agent-api/user/{user_id}/contract/{type}
请求方式
GET
路由参数
参数
类型
示例
解释
必填
user_id
string
5832d184-dd53-42a0-8ace-0bf8d660f4cc
用户id
是
type
string
uncompleted(签约回款中),completed(回款完成),remind(续约提醒)
合同的类型
是
请求参数
参数
类型
示例
解释
必填
page
int
1
页码
是
ended_at
array
[“2021-12-14”,“2021-12-17”]
合同到期时间
否
sign_at
array
[“2021-12-14”,“2021-12-17”]
合同签约时间
否
fee
array
[10000,20000]
合同签约金额
否
customer_name
string
客户
客户名称
否
product_name
string
产品
产品名称
否
customer_id
string
9992f0da-25e0-48eb-acab-7950959a7b71
客户ID
否
name_phone
string
合同
合同名称/客户名称/号码(组合查询)
否
返回示例
{
"code": 200,
"status": "success",
"message": "查看签约回款中成功",
"meta": {
"has_pages": false,
"total": 1,
"last_page": 1,
"current_page": 1,
"per_page": 15
},
"data": [{
"id": 1,//合同ID
"name": "合同1号",//合同名称
"fee": 60000,//签约金额
"signatory": "签约方1号",//签约方名称
"signed_at": "2021-12-16 00:00:00",//签约时间
"ended_at": "2021-12-17 00:00:00",//到期时间
"customer_id": "01ff0167-5cae-4c93-9678-3bdef3ae1b6c",//客户ID
"created_user_id": "f00c8abc-433f-4666-a9d6-70479605ced1",//创建者ID
"sale_user_id": "efd49f55-8793-4393-ab77-465f99f3a292",//销售人员ID
"contract_attachments": [
"contract-attachment/mxvFJHNU51u6SSv8kH7KLnw7LvE9o0TYZ84iUQZz.jpg"
],
"invoice_attachments": [
"invoice-attachment/yHVd4G4XKAOXkBNbDT2P84TErnUROpzfTGfvD9XR.jpg"
],
"party_a": "甲方负责人1号",//甲方负责人名称
"party_b": "乙方负责人1号",//乙方负责人名称
"status": 0,//合同状态(见下方解释)
"renewal_status": 0,
"remarks": "我是备注",//备注
"created_at": "2021-12-16 10:55:34",//合同创建时间
"updated_at": "2021-12-16 10:55:34",
"is_overdue": true,//是否逾期(true代表逾期,fasle代表还未逾期)
"status_str": "未回款",//合同状态具体含义
"schedules": [{//计划回款
"id": "bde976a0-9afd-4ad2-ad9a-dd7e1704d503",
"contract_id": 1,//合同ID
"plan_payment_time": "2021-12-16 00:00:00",//计划回款时间
"plan_payment_fee": 10000,//计划回款金额
"actual_payment_time": null,//实际回款时间
"actual_payment_fee": 0,//实际回款金额
"status": false,//是否回款
"remark": null,
"created_at": "2021-12-16 10:55:35",
"updated_at": "2021-12-16 10:55:35"
}
],
"creator": {//合同创建人具体信息
"id": "f00c8abc-433f-4666-a9d6-70479605ced1",
"name": "1121",
"type": 4,
"type_note": "会员"
},
"sale_user": {//销售人员具体信息
"id": "efd49f55-8793-4393-ab77-465f99f3a292",
"name": "测试陈帮骐",
"type": 8,
"type_note": "子账户"
},
"customer": {//具体的客户信息
"id": "01ff0167-5cae-4c93-9678-3bdef3ae1b6c",
"user_id": "f00c8abc-433f-4666-a9d6-70479605ced1",
"created_user_id": "f00c8abc-433f-4666-a9d6-70479605ced1",
"phone": "18361206587",//客户号码
"is_back": 0,
"source_id": 14,
"industry_id": 23,
"grade_id": 18,
"name": "我是签约客户1号",//客户名称
"sex": 1,
"sort": 0,
"created_at": "2021-12-16 10:50:24",
"updated_at": "2021-12-16 10:59:58",
"inputted_at": "2021-12-16 10:49:35",
"province_id": 432,
"city_id": 526,
"operator": 3,
"flow": 2,
"extra": null,
"expect_transaction_at": null,
"expect_transaction_fee": "0.00",
"unfollow_back_at": null,
"unsettled_back_at": null,
"followed_at": null,
"crm_sign": {//具体的签约信息
"id": "e4e3513d-790c-49c3-ae18-b0c6ea62fd17",
"customer_id": "01ff0167-5cae-4c93-9678-3bdef3ae1b6c",
"fee": "50000.00",
"signed_at": "2021-12-16 00:00:00",
"created_at": "2021-12-16 10:50:25",
"updated_at": "2021-12-16 10:50:25",
"products": [{//签约的产品(可签约多个)
"sign_id": "e4e3513d-790c-49c3-ae18-b0c6ea62fd17",
"product_id": 1,
"product_name": "AI呼出机器人",//产品名称
"product": {
"id": 1,
"user_id": "f00c8abc-433f-4666-a9d6-70479605ced1",
"name": "AI呼出机器人",
"price": "1500.00",
"image": "crm-product/v1h7P9TYFLedYPgotz0zqo5sP051fgmWwLZpSgrd.jpg",
"created_at": "2021-11-09 11:32:56",
"updated_at": "2021-11-09 11:32:56",
"image_url": "http://www.xxx.com/api/public-resource/crm-product/v1h7P9TYFLedYPgotz0zqo5sP051fgmWwLZpSgrd.jpg"//产品地址
}
}]
},
"province": {
"id": 432,
"pid": null,
"city": "江苏",
"area_code": "0519",
"post_code": "213000",
"created_at": "2019-05-11 02:26:27",
"updated_at": "2019-05-11 02:26:27"
},
"city": {
"id": 526,
"pid": 432,
"city": "徐州",
"area_code": "0516",
"post_code": "221000",
"created_at": "2019-05-11 02:26:28",
"updated_at": "2019-05-11 02:26:28"
}
},
"invoiceAttachmentUrl": [//发票地址
"http://www.xxx.com/api/public-resource/invoice-attachment/yHVd4G4XKAOXkBNbDT2P84TErnUROpzfTGfvD9XR.jpg"
],
"contractAttachmentUrl": [//合同地址
"http://www.xxx.com/api/public-resource/contract-attachment/mxvFJHNU51u6SSv8kH7KLnw7LvE9o0TYZ84iUQZz.jpg"
]
}]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
签约回款中,回款完成,续约提醒的列表均通过此接口进行查询,通过在路由中传相应的参数进行请求,uncompleted(签约回款中),completed(回款完成),remind(续约提醒)
合同中的status含义,0:未还款,1:部分还款,2:已结清