简要描述:

  • 更新报价单

请求URL:

  • /api/v2/quotations/:id

  • url请求参数说明
字段名 是否必填 描述
id true 报价单的id,替换掉url的:id

请求方式:

  • PUT

请求头:

请求参数:

字段名 是否必填 描述
quotation[name] true 报价单名称
quotation[title] false 报价单主标题
quotation[sub_title] false 报价单副标题
quotation[quotation_no] false 报价单编号
quotation[status] false 报价单状态
quotation[customer_id] false 对应客户
quotation[contact_id] false 对应联系人
quotation[opportunity_id] false 对应商机
quotation[quotation_date] false 报价日期
quotation[effective_date_fr] false 有效开始日期
quotation[effective_date_to] false 有效结束日期
quotation[product_total_amount] false 产品费用合计
quotation[whole_discount] false 整单折扣
quotation[additional_discount_amount] false 额外优惠金额
quotation[total_amount] false 报价总金额
quotation[note] false 备注
quotation[user_id] false 负责人
quotation[creator_id] false 创建人
quotation[want_department_id] false 所属部门
quotation[subsidiary_id] false 乙方主体id
quotation[custom_field_template_id] false 业务类型id
quotation[address_attributes][contact_id] false 乙方联系人id
quotation[address_attributes][contact_email] false 乙方联系人邮箱
quotation[address_attributes][contact_phone] false 乙方联系人手机
quotation[product_assets_attributes][][product_id] false 关联产品id
quotation[product_assets_attributes][][recommended_unit_price] false 产品售价
quotation[product_assets_attributes][][quantity] false 产品数量
quotation[product_assets_attributes][][remark] false 产品描述
quotation[assist_user_ids] false 协作人ids

请求参数json例子:

{
    "quotation": {
        "name": "test q111",
        "status": 63907481,
        "whole_discount": "1",
        "total_amount": "16.000",
        "title": "2333",
        "effective_date_fr": "2024-08-09",
        "effective_date_to": "2024-08-23",
        "quotation_date": "2024-08-09",
        "additional_discount_amount": "0.000",
        "product_total_amount": "16.000",
        "address_attributes": {
            "contact": 11784641,
            "contact_phone": "15201643883",
            "contact_email": "xxx123@qq.com",
            "contact_id": 11784641
        },
        "custom_field_template_id": 22424,
        "product_assets_attributes": [
            {
                "id": 14756080,
                "product_id": 9825099,
                "quantity": "1.0",
                "recommended_unit_price": "11.0",
                "remark": ""
            },
            {
                "id": 14756081,
                "product_id": 10418965,
                "quantity": "1.0",
                "recommended_unit_price": "5.0",
                "remark": ""
            }
        ],
        "customer_id": 590157333,
        "opportunity_id": 10532678,
        "contact_id": 129504908,
        "user_id": 12492788,
        "want_department_id": 11515617,
        "subsidiary_id": 7,
        "assist_user_ids": [
            11978981,
            11978984
        ],
        "id": "100286"
    }
}

返回示例:

正确时返回:

{
  "code": 0,
  "message": "接口请求成功",
  "data": {
    "ref": {
      "contact": {
        "address": {
          "phone": "",
          "phone_hidden_result": "",
          "email": ""
        },
        "id": 129504908,
        "is_user_self": false,
        "is_creator_self": false
      },
      "subsidiary": {
        "address": {
          "detail_address": "上海市浦东新区软件园201",
          "region_info": "中国 上海 上海市 黄浦区",
          "phone": "18901012223",
          "phone_hidden_result": "18901012223",
          "tel": "18901012222",
          "tel_hidden_result": "18901012222",
          "fax": "18901012244"
        },
        "id": 7,
        "is_user_self": null,
        "is_creator_self": null
      },
      "customer": {
        "address": {
          "region_info": "",
          "detail_address": null,
          "phone": "07654323456",
          "phone_hidden_result": "07654323456",
          "tel": null,
          "tel_hidden_result": "",
          "fax": null
        },
        "id": 590157333,
        "is_user_self": false,
        "is_creator_self": false
      }
    },
    "intl_extra": {
      "pol_type": null,
      "pol": null,
      "pod_type": null,
      "pod": null,
      "carrier": null,
      "route": null,
      "trade_clause": null,
      "currency": null,
      "pallet_desc": null,
      "pol_currency": null,
      "pod_currency": null,
      "pol_total_amount": null,
      "pod_total_amount": null,
      "pol_display": null,
      "pod_display": null,
      "pol_type_display": null,
      "pod_type_display": null,
      "carrier_display": null,
      "trade_clause_display": null,
      "pol_exchanges": null,
      "pod_exchanges": null,
      "all_exchanges": null,
      "currency_total_amount": null
    },
    "intl_details": [],
    "quotations": [],
    "id": 100286,
    "name": "test q111",
    "title": "2333",
    "sub_title": "",
    "quotation_no": "",
    "status": "63907481",
    "status_mapped": "未报价",
    "customer": {
      "id": 590157333,
      "name": "686868686"
    },
    "contact": {
      "id": 129504908,
      "name": "33"
    },
    "opportunity": {
      "id": 10532678,
      "title": "3333"
    },
    "quotation_date": "2024-08-09",
    "effective_date_fr": "2024-08-09",
    "effective_date_to": "2024-08-23",
    "product_total_amount": "16.0",
    "whole_discount": "1.0",
    "additional_discount_amount": "0.0",
    "total_amount": "16.0",
    "has_contract": false,
    "note": "",
    "assist_users": [
      {
        "id": 11978981,
        "email": "",
        "created_at": "2020-12-10 18:42",
        "name": "王欢",
        "organization_id": 11508919,
        "phone": "18721667830",
        "role_id": 223558,
        "workflow_state": "organization_staff",
        "job": "",
        "tel": "",
        "avatar_url": "https://lxcrm.weiwenjia.com/assets/female_uc.jpg",
        "department_name": "研发中心",
        "third_userid": null,
        "third_dept_id": null,
        "uid": 12561443
      },
      {
        "id": 11978984,
        "email": "",
        "created_at": "2020-12-10 18:44",
        "name": "王乐",
        "organization_id": 11508919,
        "phone": "13701649175",
        "role_id": 223557,
        "workflow_state": "organization_staff",
        "job": "",
        "tel": "",
        "avatar_url": "https://lxcrm.weiwenjia.com/assets/male_uc.jpg",
        "department_name": "CRM开发部",
        "third_userid": null,
        "third_dept_id": null,
        "uid": 12561447
      }
    ],
    "created_at": "2024-08-09 11:28",
    "updated_at": "2024-08-09 14:39",
    "revisit_remind_at": "",
    "is_user_self": true,
    "is_editable": true,
    "is_creator_self": true,
    "product_assets": "规格型号显示,wdqw",
    "product_assets_for_new_record": [],
    "history_quotation_id": null,
    "parent_id": null,
    "is_own": true,
    "approve_status": "approved",
    "custom_field_template": {
      "id": 22424,
      "name": "业务类型1",
      "position": 1,
      "status": 0,
      "is_usable": true,
      "apply_type": "all_roles",
      "business_name": null
    },
    "custom_field_template_id": 22424,
    "custom_field_template_i18n": "业务类型1",
    "subsidiary": {
      "id": 7,
      "name": "测试主题"
    },
    "process_can_resubmission": false,
    "lock_status": false,
    "all_attachments": [],
    "attachments_count": 0,
    "attachments": "暂无附件",
    "file_attachments_count": 0,
    "text_area_asset_4a8f7c": null,
    "text_asset_391f96": null,
    "text_area_asset_d1257b": null,
    "text_area_asset_e73ae6": null,
    "text_asset_7a8dc3": null,
    "text_area_asset_d5ccfc": null,
    "text_asset_7c8eb7": null,
    "text_area_asset_87f443": null,
    "text_area_asset_44df50": null,
    "text_area_asset_d7209a": null,
    "text_area_asset_d0d14e": null,
    "text_area_asset_400abf": null,
    "text_area_asset_5accd8": null,
    "text_area_asset_27d8f6": null,
    "text_area_asset_e39485": null,
    "text_area_asset_b1004b": null,
    "file_asset_6c701f": [],
    "text_asset_0069a3": null,
    "file_asset_15495c": [],
    "text_asset_b3c2e7": null,
    "numeric_asset_5e7750": 1,
    "text_asset_aaf35a": null,
    "text_area_asset_40fdc9": null,
    "numeric_asset_74c58b": null,
    "datetime_asset_3224ae": "",
    "text_asset_9d69b5": null,
    "text_asset_6f9a5b": [],
    "text_asset_8b2060": "",
    "text_asset_c8f244": "",
    "user_field_asset_82b4ec": [],
    "user_field_asset_3d7507": [],
    "text_asset_0069a3_hidden_result": "",
    "need_hidden_dispose": false,
    "text_asset_391f96_display": null,
    "text_asset_7a8dc3_display": null,
    "text_asset_9d69b5_display": null,
    "text_asset_6f9a5b_display": "",
    "text_asset_c8f244_display": null,
    "user_field_asset_82b4ec_display": [],
    "user_field_asset_3d7507_display": [],
    "user": {
      "id": 12492788,
      "email": "",
      "created_at": "2023-06-09 05:35",
      "name": "谷姜花",
      "organization_id": 11508919,
      "phone": "18716530615",
      "role_id": 223557,
      "workflow_state": "organization_staff",
      "job": "",
      "tel": "",
      "avatar_url": "https://lxcrm.weiwenjia.com/assets/male_uc.jpg",
      "department_name": "上海洲傲",
      "third_userid": null,
      "third_dept_id": null,
      "uid": 22119456
    },
    "before_user": null,
    "owned_department": {
      "id": 11515617,
      "name": "上海洲傲",
      "third_dept_id": null
    },
    "before_owned_department": null,
    "creator": {
      "id": 12492788,
      "email": "",
      "created_at": "2023-06-09 05:35",
      "name": "谷姜花",
      "organization_id": 11508919,
      "phone": "18716530615",
      "role_id": 223557,
      "workflow_state": "organization_staff",
      "job": "",
      "tel": "",
      "avatar_url": "https://lxcrm.weiwenjia.com/assets/male_uc.jpg",
      "department_name": "上海洲傲",
      "third_userid": null,
      "third_dept_id": null,
      "uid": 22119456
    },
    "address": {
      "id": 100286,
      "name": "",
      "contact_phone": "15201643883",
      "contact_email": "xxx123@qq.com",
      "contact_phone_hidden_result": "15201643883",
      "contact": {
        "id": 11784641,
        "name": "张秀",
        "third_userid": null
      }
    }
  }
}

备注:

文档更新时间: 2025-04-29 14:18   作者:曹勇