Chuyển tới nội dung chính

Cập nhật cơ hội

Endpoint

PUT /api/v6.1/opportunity

Ví dụ yêu cầu

curl --location --request PUT 'https://demo.getflycrm.com/api/v6.1/opportunity' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: YOUR_API_KEY' \
--header 'Cookie: v6_getflycrm_session=YOUR_SESSION_TOKEN' \
--data-raw '{
"campaign_code": "CD0008",
"account_code": "KH/2024/119270",
"account_name": "Khách hàng XYZ",
"account_phone": "0123456789",
"account_email": "[email protected]",
"contact_name": "Người liên hệ A",
"contact_email": "[email protected]",
"contact_phone": "0987654321",
"recipient_username": "user_example",
"current_opportunity_code": "CH2055057",
"description": "Ghi chú cập nhật cơ hội"
}'

Tham số yêu cầu

TrườngKiểuBắt buộcMô tả
campaign_codestringMã chiến dịch chứa cơ hội
account_codestringMã khách hàng
account_namestringTên khách hàng
account_phonestringSố điện thoại khách hàng
account_emailstringEmail khách hàng
contact_namestringTên người liên hệ
contact_emailstringEmail người liên hệ
contact_phonestringĐiện thoại người liên hệ
recipient_usernamestringTên đăng nhập người nhận xử lý mới
current_opportunity_codestringMã cơ hội hiện tại cần cập nhật
descriptionstringGhi chú mô tả cơ hội

Phản hồi mẫu

{
"message": "Cập nhật thành công",
"data": {
"id": 2055057,
"description": "Ghi chú cập nhật",
"account_id": 11973,
"contact_id": 9753,
"recipient": 1,
"receipt_date": 1751013960,
"updated_at": 1751013960,
"opportunity_code": "CH2055057",
"opportunity_name": "Người liên hệ A - Khách hàng XYZ",
"opportunity_status": 31,
"create_user": null,
"amount": 0,
"actual_amount": 0,
"campaign_id": 8,
"probability": 0,
"status": 0,
"copy_source_opportunity": null,
"copy_source_campaign": null,
"est_finish_date": null,
"finished_date": null,
"type_source": "",
"source_content": "",
"created_at": 1751013849
}
}

Ghi chú

  • Trường current_opportunity_code là bắt buộc để xác định bản ghi cần cập nhật.