简要描述:
- 客户下合同列表接口
请求URL:
/api/v2/customers/:id/opportunities
请求方式:
- GET
请求头:
- 请参考接口必读
请求参数:
字段名 | 是否必填 | 描述 |
---|---|---|
id | true | 这是 客户id, 替换url里的 :id |
page | false | 这是 page |
per_page | false | 这是 per_page |
1.&entity=customer&entity_id=831
返回示例:
正确时返回:
{
"code": 0,
"data": {
"opportunities": [
{
"id": 258,
"user_id": 254,
"user_name": "周星驰",
"title": "经理1的商机",
"customer_id": 831,
"customer_name": "经理1的客户",
"stage": "3515",
"stage_mapped": "赢单",
"expect_amount": "200000.0",
"expect_sign_date": "2014-11-07",
"source": "3500",
"sign_possibility": 100,
"sign_possibility_display": "100%",
"source_mapped": "电话来访",
"real_revisit_at": "2014-11-07 10:17",
"is_user_self": false,
"approve_status": "approved",
"approve_status_i18n": "已通过",
"updated_at": "2015-03-26 20:10",
"created_at": "2014-11-07 10:17"
}
],
"counts_by_stage": [
{
"id": 3511,
"value": "初步接洽",
"count": 0,
"amount": 0.0
},
{
"id": 3512,
"value": "需求确定",
"count": 0,
"amount": 0.0
},
{
"id": 3513,
"value": "方案/报价",
"count": 0,
"amount": 0.0
},
{
"id": 3514,
"value": "谈判/合同",
"count": 0,
"amount": 0.0
},
{
"id": 3515,
"value": "赢单",
"count": 1,
"amount": 200000.0
},
{
"id": 3516,
"value": "输单",
"count": 0,
"amount": 0.0
}
],
"total_count": 1,
"per_page": 15,
"page": 1
}
}
错误时返回:
{
"code": 100401,
"data": null,
"message": "你的帐号已在其他地方登录,本地已经下线"
}
返回参数说明:
参数名 | 类型 | 说明 |
---|---|---|
is_user_self | boolean | 是否自己的数据 |
approve_status | string | 审批状态 |
备注:
- 更多返回错误代码请看错误码表描述
文档更新时间: 2025-04-29 14:18 作者:陈胜海