Update an opportunity
opportunity.update(strid, OpportunityUpdateParams**kwargs) -> OpportunityUpdateResponse
POST/v1/opportunities/{id}
Updates an existing opportunity by ID. Only included fields and relationships are modified.
The $opportunityStatus field is read-only and cannot be updated. The $task and $note relationships are also read-only — manage them via the $opportunity relationship on the task, or the $account/$opportunity note relationships instead.
Supports idempotency via the Idempotency-Key header.
Required scope: opportunities:update
Rate limit category: Write
Parameters
id: str
Unique identifier of the opportunity to update.
Returns
Update an opportunity
from lightfield import Lightfield
client = Lightfield(
api_key="My API Key",
)
opportunity_update_response = client.opportunity.update(
id="id",
)
print(opportunity_update_response.id){
"id": "id",
"createdAt": "createdAt",
"fields": {
"foo": {
"value": "string",
"valueType": "ADDRESS"
}
},
"httpLink": "httpLink",
"relationships": {
"foo": {
"cardinality": "cardinality",
"objectType": "objectType",
"values": [
"string"
]
}
}
}Returns Examples
{
"id": "id",
"createdAt": "createdAt",
"fields": {
"foo": {
"value": "string",
"valueType": "ADDRESS"
}
},
"httpLink": "httpLink",
"relationships": {
"foo": {
"cardinality": "cardinality",
"objectType": "objectType",
"values": [
"string"
]
}
}
}