Update an opportunity
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
Field values to update — only provided fields are modified; omitted fields are left unchanged. System fields use a $ prefix (e.g. $name, $stage); custom attributes use their bare slug. SINGLE_SELECT and MULTI_SELECT fields accept an option ID or label — call the definitions endpoint for available options. See Fields and relationships for value type details.
Update an opportunity
lightfield opportunity update \
--api-key 'My API Key' \
--id id{
"id": "id",
"createdAt": "createdAt",
"fields": {
"foo": {
"value": "string",
"valueType": "ADDRESS"
}
},
"httpLink": "httpLink",
"relationships": {
"foo": {
"cardinality": "cardinality",
"objectType": "objectType",
"values": [
"string"
]
}
},
"updatedAt": "updatedAt",
"externalId": "externalId"
}Returns Examples
{
"id": "id",
"createdAt": "createdAt",
"fields": {
"foo": {
"value": "string",
"valueType": "ADDRESS"
}
},
"httpLink": "httpLink",
"relationships": {
"foo": {
"cardinality": "cardinality",
"objectType": "objectType",
"values": [
"string"
]
}
},
"updatedAt": "updatedAt",
"externalId": "externalId"
}