open-api
首页
open-api
  • 快速开始
  • 授权登录
  • 客户
  • 销售订单
  • 采购订单
  • 产品
  • 回款登记
  • 回款单
  • 付款单
  • 费用单
  • 报价单
  • 供应商
  • 商机
    • 商机
    • 查询商机的销售流程 商机阶段 输单原因GET
    • 商机删除接口POST
    • 商机列表GET
    • 商机数据查询GET
    • 商机数据字典GET
    • 商机新建/编辑接口POST
  • 用户
  • 销售出库单
  • 库存
  • 线索
  • 资金
  • 采购入库单
  • 采购退货单
  • 统计分析
  • 示例接口(勿用)
  • 阿里账号信息GET
  • 阿里资金账户信息GET
亮色模式
  1. 商机

商机新建/编辑接口

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 个月前