简要描述:

  • 商机下创建合同数据转换接口

请求URL:

  • /api/v2/contracts/new_from_opportunity

请求方式:

  • GET

请求头:

请求参数:

字段名 是否必填 描述
opportunity_id true 商机ID

返回示例:

正确时返回:


{
  "code": 0,
  "data": {
    "id": 0,
    "category": "",
    "category_mapped": "",
    "payment_type": "",
    "payment_type_mapped": "",
    "status": "",
    "status_mapped": "",
    "is_editable": true,
    "organization_id": 49,
    "title": "CRM集团版",
    "total_amount": "19800.0",
    "start_at": "2015-09-09",
    "end_at": "",
    "customer_signer": "",
    "need_hidden_dispose": false,
    "revisit_remind_at": "",
    "received_payments_plan_count": 0,
    "received_payments_plan_amount": 0,
    "times_display": "2015-09-09 - ",
    "received_payments_amount": 0.0,
    "unreceived_amount": 19800.0,
    "unchecking_payments_amount": 19800.0,
    "checking_payments_amount": 0.0,
    "sign_date": "",
    "times": "2015-09-09 - ",
    "sn": "",
    "approve_status": "",
    "approve_status_i18n": null,
    "approve_deny_type": 0,
    "all_attachments": [

    ],
    "attachments": "暂无附件",
    "owned_department": {

    },
    "is_own": true,
    "is_has_policy_for_assist_user": false,
    "before_user": {

    },
    "is_my_assist_entity": false,
    "product_assets_for_new_record": [

    ],
    "our_signer": "",
    "special_terms": "0",
    "created_at": "",
    "updated_at": "",
    "product_assets": "暂无产品",
    "before_owned_department": {

    },
    "creator": {

    },
    "user": {
      "id": 364513,
      "email": "110112119@qq.com",
      "created_at": "2018-01-10 10:09",
      "name": "个比唠忘",
      "organization_id": 49,
      "phone": "18699999999",
      "role_id": 169,
      "workflow_state": "organization_staff",
      "job": "扯吧",
      "tel": "",
      "avatar_url": "https://e.ikcrm.com/assets/female_uc.jpg",
      "department_name": "总经理办公室"
    },
    "opportunity": {
      "id": 576543,
      "title": "CRM集团版",
      "title_pinyin": "CRMjituanban",
      "user_id": 254,
      "user_name": "周星驰",
      "expect_amount": "19800.0",
      "sign_possibility": "10%",
      "get_time": "2015-09-08",
      "stage": "3511",
      "stage_mapped": "初步接洽",
      "expect_sign_date": "2015-09-09",
      "customer_requirement": "",
      "source": "15171",
      "source_mapped": "广告",
      "kind": "3517",
      "kind_mapped": "普通商机",
      "customer_id": 23481906,
      "customer_name": "向导",
      "is_own": true,
      "is_my_assist_entity": false,
      "created_at": "2019-02-25 13:30",
      "creator": {
        "id": 419462,
        "email": "denghuang@ikcrm.com",
        "created_at": "2018-05-09 10:05",
        "name": "邓煌",
        "organization_id": 49,
        "phone": "18428362926",
        "role_id": 169,
        "workflow_state": "organization_staff",
        "job": "",
        "tel": "",
        "avatar_url": "https://e.ikcrm.com/assets/male_uc.jpg",
        "department_name": "总经理办公室"
      },
      "is_user_self": false
    },
    "customer": {
      "id": 23481906,
      "name": "向导",
      "name_pinyin": "xiangdao",
      "user_id": 419462,
      "user_name": "邓煌",
      "contacts": [
        {
          "id": 6123784,
          "name": "123",
          "address": {
            "id": 11302860,
            "tel": "",
            "tel_hidden_result": "",
            "phone": "",
            "phone_hidden_result": "",
            "qq": "",
            "email": "",
            "lng": 0.0,
            "lat": 0.0,
            "detail_address": "",
            "off_distance": -1,
            "url": "",
            "gaode_staticmap": "",
            "full_address": "中国 辽宁 抚顺市 顺城区 "
          }
        },
        {
          "id": 6136312,
          "name": "1234",
          "address": {
            "id": 11315388,
            "tel": "",
            "tel_hidden_result": "",
            "phone": "",
            "phone_hidden_result": "",
            "qq": "",
            "email": "",
            "lng": 0.0,
            "lat": 0.0,
            "detail_address": "",
            "off_distance": -1,
            "url": "",
            "gaode_staticmap": "",
            "full_address": "中国 辽宁 抚顺市 顺城区 "
          }
        }
      ],
      "company_name": "",
      "address": {
        "id": 27001400,
        "tel": "",
        "tel_hidden_result": "",
        "phone": "",
        "phone_hidden_result": "",
        "qq": "",
        "email": "",
        "lng": 0.0,
        "lat": 0.0,
        "detail_address": "",
        "off_distance": -1,
        "url": "",
        "gaode_staticmap": "",
        "full_address": "中国 辽宁 抚顺市 顺城区 "
      },
      "revisit_at": "2019-02-25T13:30:28.000+08:00",
      "is_own": true,
      "status": "3464",
      "status_mapped": "报价",
      "category": "",
      "category_mapped": "",
      "qixinbao_id": "",
      "created_at": "2018-10-19 14:04",
      "updated_at": "2018-10-21 11:52",
      "creator": {
        "id": 419462,
        "email": "denghuang@ikcrm.com",
        "created_at": "2018-05-09 10:05",
        "name": "邓煌",
        "organization_id": 49,
        "phone": "18428362926",
        "role_id": 169,
        "workflow_state": "organization_staff",
        "job": "",
        "tel": "",
        "avatar_url": "https://e.ikcrm.com/assets/male_uc.jpg",
        "department_name": "总经理办公室"
      },
      "is_user_self": false,
      "approve_status": "approved",
      "approve_status_i18n": "已通过"
    },
    "can_approve": true,
    "step_can_approve": false,
    "step": 0,
    "notify_users": [

    ],
    "can_revert_applying": false,
    "need_approve_step": 1,
    "attachments_count": 0,
    "file_attachments_count": 0,
    "is_user_self": true,
    "custom_field_template": {

    },
    "text_asset_1ca6ef": [

    ],
    "text_asset_238a59": null,
    "text_asset_90d3e6": null,
    "numeric_asset_e0a85b": null,
    "text_asset_90d3e6_display": null,
    "text_asset_1ca6ef_display": ""
  }
}

错误时返回:

{
  "code": 100000,
  "message": "device参数错误",
  "error": "invalid_app_error"
}

返回参数说明:

暂无

备注:

文档更新时间: 2025-04-29 14:18   作者:陈胜海