新增合同订单接口

该接口用于向合同列表中增加新的合同订单,调用该接口需要有新增合同的权限。

请求方式:GETHTTPS
请求地址:/open/contract/create_contract?access_token=asdad154ad5545ad5d445a4d56a

请求包体:

{
    "username": "zhangsan",
    "contact_id":"aTozOTYwMDs",
    "customer_id":"aToyNTIxNTs",
    "customer_name":"客户名称",
    "contact_name": "李四",
    "contract_title": "合同标题",
    "sign_day": "2020-03-05",
    "sign_man": "李四",
    "amount": "300",
    "standard_amount": "300",
    "contract_no": "huilan1001",
    "contract_memo":"合同标题",
    "products":
    [
      {
        "product_id": "aToxMTEyMTss",
        "fee_term": "0",
        "standard_price": "150.00",
        "product_name": "产品授权部门",
        "num": "1",
        "month": "",
        "standard_amount": "150.00",
        "actual_amount": "150.00",
        "price": "150.00",
        "discount": "0%",
        "product_type": "1",
        "unit": "台"
      }, {
        "product_id": "aToxMTEyMTss",
        "fee_term": "0",
        "standard_price": "150.00",
        "product_name": "测试产品授权",
        "num": "1",
        "month": "",
        "standard_amount": "150.00",
        "actual_amount": "150.00",
        "price": "150.00",
        "discount": "0%",
        "product_type": "1",
        "unit": "件"
      }
    ],
    "contract_pay_plan":{
        "expect_day_str":{
            "0":"2020-03-06",
            "1":"2020-03-07"
        },
        "scale_str":{
            "0":"30",
            "1":"70"
        },
        "amount_str":{
            "0":"90",
            "1":"210"
        }
    }
}

参数说明:

参数 必须 说明
access_token 授权凭证,参考:access_token接口
username 账号
contact_id 联系人唯一标识,新增联系人后获得
customer_id 客户唯一标识,新增客户后获得
customer_name 客户名称
contract_title 合同标题
sign_day 签订日期,例:2020-03-04
sign_man 合同签订人
amount 合同金额
standard_amount 合同标准金额
products 产品标的,支持多个,格式同请求包体
∟product_id 产品id
∟fee_term 收费周期,例:0
∟standard_price 产品价格,例:150.00
∟product_name 产品名称
∟num 购买数量,例::1
∟month 购买时间,例:12
∟standard_amount 标准价格,例:150.00
∟actual_amount 实际价格,例:150.00
∟price 价格,例:150
∟discount 折扣,例:0%
∟product_type 产品类型,例:1
∟unit 产品单位,例:台
contract_no 合同编号
contract_memo 补充信息
contract_pay_plan 该字段非必填,若存在则会给合同新增回款计划
∟expect_day_str 回款日期,多个回款计划用数组表示
∟scale_str 回款比例,多个回款计划用数组表示,比例之和必须为100
∟amount_str 回款金额,多个回款计划用数组表示,金额之和必须为合同总额

返回结果:

{
    "code": 0,
    "msg": "ok",
    "contract_id": "aToxMjs"
}

参数说明:

参数 说明
code 出错返回码,为0表示成功,非0表示调用失败
msg 返回码提示语
contract_id 合同的唯一标识

关于惠岚|用户协议|帮助中心© 2012- 2020 Huilan Inc. All Rights Reserved

results matching ""

    No results matching ""