Update an opportunity

You can update an existing opportunity.

 

Request Path Parameters
Parameter Type Required Description
org_id number Yes The unique identifier of your organization
id number Yes The unique identifier of the opportunity

 

Request Body Parameter
Attribute Type Required Description
status number Yes Id of the pipeline status
estimated_close Date Yes
value number Yes Amount
lead number Yes The id of the lead
assigned_user number Yes Id of the user the opportunity is assigned to
contact number No Id of the contact
notes string No
confidence number No

Example Request & Response


$ curl https://api.custerem.com/<org_id>/opportunities/<id>/ \
-X PUT \
-H 'Authorization: X-API-KEY <Your API Key>' \
-H 'Content-Type: application/json' \
-d '{
    "status": 16,
    "estimated_close": "2022-02-22",
    "value": 200,
    "lead": 8,
    "assigned_user": 2,
    "contact": 5,
    "notes": "This is notes field",
    "confidence": 22
}'

 

204 No Content

{
    "status": 16,
    "estimated_close": "2022-02-22T00:00:00Z",
    "value": "200.00",
    "contact": 5,
    "value_cycle": "A",
    "lead": 8,
    "notes": "This is notes field",
    "assigned_user": 2,
    "confidence": 22
}

 

404 Not Found

{
    "status_code": 404,
    "message": "Opportunity with id 50 not found"
}