Update Opportunity
Endpoint
PUT /api/v6.1/opportunity
Request Example
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": "Customer XYZ",
"account_phone": "0123456789",
"account_email": "[email protected]",
"contact_name": "Contact Person A",
"contact_email": "[email protected]",
"contact_phone": "0987654321",
"recipient_username": "user_example",
"current_opportunity_code": "CH2055057",
"description": "Opportunity update note"
}'
Request Parameters
Field | Type | Required | Description |
---|---|---|---|
campaign_code | string | ✔ | Campaign code containing the opportunity |
account_code | string | ✔ | Customer code |
account_name | string | ✔ | Customer name |
account_phone | string | ✘ | Customer phone number |
account_email | string | ✘ | Customer email |
contact_name | string | ✘ | Contact person name |
contact_email | string | ✘ | Contact email |
contact_phone | string | ✘ | Contact phone |
recipient_username | string | ✔ | New assigned user's username |
current_opportunity_code | string | ✔ | Current opportunity code to update |
description | string | ✘ | Opportunity description note |
Sample Response
{
"message": "Update successful",
"data": {
"id": 2055057,
"description": "Update note",
"account_id": 11973,
"contact_id": 9753,
"recipient": 1,
"receipt_date": 1751013960,
"updated_at": 1751013960,
"opportunity_code": "CH2055057",
"opportunity_name": "Contact Person A - Customer 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
}
}
Notes
- The
current_opportunity_code
field is required to identify the record to update.