亮色模式
商机新建/编辑接口
POST
/v1/opportunity/push异常码 | 异常消息 | 异常解决方案 |
---|---|---|
404 | The associated customer cannot be empty use company_id | 检查是否opportunity_id为空时,company_id也为空了 |
400 | Invalid data json | 检查json格式是否正确 |
请求参数
Body 参数application/json
opportunity_id
integer
商机ID
编辑时必填 值来自/v1/opportunity/list 接口
name
string
商机名称
company_id
integer
客户ID
新建时必填 值来自/v1/company/list 接口
customer_id
array[integer]
联系人ID 数组
amount
string
金额
exchange_rate
string
汇率
exchange_rate_usd
string
美元汇率
account_date
string
结束日期
origin_list
array[integer]
商机来源ID 数组
stage
integer
销售流程ID
值来自于/v1/opportunity/fields/selector 接口
currency
string
币种
fail_type
integer
输单原因ID
值来自于/v1/opportunity/fields/selector 接口
fail_remark
string
输单描述
handler
array[integer]
协同跟进人
值来自于/v1/user/list 接口
示例
{
"opportunity_id": "test",//有商机ID为更新操作、没有商机ID为创建商机操作
"name": "test",
"amount": "100000",
"exchange_rate": "700",
"exchange_rate_usd": "100",
"account_date": "2024-04-13",
"origin": 14,
"type": 0,
"serial_id": "O114",
"opportunity_id": 17817953407577,
"stage": 2246138187362,
"currency": "USD",
"user_id": 55281444,
"remark": "备注"
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
code
integer
必需
message
string
必需
now
string
必需
data
object
必需
opportunity_id
integer
商机ID
示例
{
"code": 200,
"message": "success",
"now": "2025-03-07 17:03:25",
"data": {
"opportunity_id": 5203694883
}
}
最后修改时间: 3 个月前