Restore an opportunity
opportunity.restore(strid, OpportunityRestoreParams**kwargs) -> OpportunityRestoreResponse
POST/v1/opportunities/{id}/restore
Restores a trashed opportunity, bringing it back to active. Find trashed opportunities via GET /v1/opportunities?status=trashed.
Calling restore on an opportunity that is not trashed is a no-op and returns the existing record.
Required scope: opportunities:restore
Rate limit category: Write
Restore an opportunity
from lightfield import Lightfield
client = Lightfield(
api_key="My API Key",
)
opportunity_restore_response = client.opportunity.restore(
id="id",
)
print(opportunity_restore_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"
}