Delete an opportunity
opportunity.delete(strid, OpportunityDeleteParams**kwargs) -> OpportunityDeleteResponse
DELETE/v1/opportunities/{id}
Moves an opportunity to the trash. The opportunity is soft-deleted and may be restored from the Lightfield UI. Associated tasks, notes, and meetings are not deleted.
Calling delete on an already-trashed opportunity is a no-op and returns the existing record.
Required scope: opportunities:delete
Rate limit category: Write
Delete an opportunity
from lightfield import Lightfield
client = Lightfield(
api_key="My API Key",
)
opportunity_delete_response = client.opportunity.delete(
id="id",
)
print(opportunity_delete_response.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"
}