简要描述:
- 创建报价单
请求URL:
/api/v2/quotations
请求方式:
- POST
请求头:
- 请参考接口必读
请求参数:
字段名 | 是否必填 | 描述 |
---|---|---|
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": "6.000",
"title": "2333",
"effective_date_fr": "2024-08-09",
"effective_date_to": "2024-08-23",
"quotation_date": "2024-08-09",
"additional_discount_amount": "10.000",
"product_total_amount": "16",
"sub_title": "",
"address_attributes": {
"contact_phone": "15201643883",
"contact_email": "xxx@qq.com",
"contact_id": 11784641
},
"custom_field_template_id": 22424,
"product_assets_attributes": [
{
"product_id": 9825099,
"quantity": 1,
"recommended_unit_price": "11.0",
"remark": null
},
{
"product_id": 10418965,
"quantity": 1,
"recommended_unit_price": "5.0",
"remark": null
}
],
"customer_id": 590157333,
"opportunity_id": 10532678,
"contact_id": 129504908,
"user_id": 12492788,
"want_department_id": 11515617,
"subsidiary_id": 7,
"assist_user_ids": [
11978981,
11978984
]
}
返回示例:
正确时返回:
{
"code": 0,
"message": "接口请求成功",
"data": {
"id": 100286,
"name": "test q111",
"title": "2333",
"sub_title": "",
"quotation_no": null,
"status": "63907481",
"customer_id": 590157333,
"contact_id": 129504908,
"opportunity_id": 10532678,
"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": "10.0",
"total_amount": "6.0",
"note": null,
"user_id": 12492788,
"before_user_id": null,
"creator_id": 12492788,
"department_id": 11515617,
"before_department_id": null,
"organization_id": 11508919,
"version": null,
"parent_id": null,
"real_revisit_at": "2024-08-09T11:28:23.996+08:00",
"revisit_remind_at": null,
"approve_status": 3,
"submit_applying_at": null,
"finish_approve_at": null,
"created_at": "2024-08-09T11:28:24.001+08:00",
"updated_at": "2024-08-09T11:28:23.995+08:00",
"lastest_updator_id": 12492788,
"custom_field_template_id": 22424,
"subsidiary_id": 7,
"lock_status": 0
}
}
}
备注:
- 更多返回错误代码请看错误码表描述
文档更新时间: 2025-04-29 14:18 作者:曹勇