v1

latestOpenAPI 3.0.02026-07-24161215397.4 KB
Opportunities

Update opportunity

Update opportunity by id

Required scopes: flex.community.opportunities.update

put/api/v2/organizations/{orgSlug}/opportunities/{opportunityId}

Path parameters

opportunityIdstring required

opportunity id

orgSlugstring required

organization slug

Request body

propertiesobject

An object that contains all custom properties that can be applied to the item.

namestring

The full name of the opportunity.

startDatestring date-time

The start date of the opportunity.

statusstring

The _id of the status of the opportunity.

Example request

{
  "properties": {
    "customProperty1": "value1",
    "customProperty2": "value2"
  },
  "name": "John Doe 2",
  "startDate": "2024-02-08T10:00:00.000Z",
  "status": "6a59d07f856fad4ee41952e5"
}

Response

propertiesobject

An object that contains all custom properties that can be applied to the item.

_idstring

The _id of the opportunity.

namestring

The full name of the opportunity.

companystring

The _id of the contact company associated with the opportunity. Either a member or a company is necessary to create an opportunity.

memberstring

The _id of the contact member associated with the opportunity. Either a member or a company is necessary to create an opportunity.

statusstring

The _id of the status associated with the opportunity.

probabilitynumber

The probability of the deal, it should match the percentage associated with the status of the opportunity.

startDatestring date-time

The start date of the opportunity.

dealSizenumber

The size of the deal in currency.

membersCountnumber

The number of members that come with the opportunity.

resourcesstring

Array containing all the _ids of resources associated with the opportunity.

requestedPlansstring

Array containing all the _ids of plans that were requested for the opportunity.

createdAtstring

The date when the opportunity has been created.

createdBystring

The id of the user that created the opportunity.

modifiedAtstring

The date of the last update of the opportunity.

modifiedBystring

The id of user that did the last updated the opportunity.

Example response

{
  "properties": {
    "customProperty1": "value1",
    "customProperty2": "value2"
  },
  "_id": "6a59d07f856fad4ee41952d4",
  "name": "John Doe",
  "company": "6a59d07f856fad4ee41952d5",
  "member": "6a59d07f856fad4ee41952d6",
  "status": "6a59d07f856fad4ee41952d7",
  "probability": 10,
  "startDate": "2024-02-08T10:00:00.000Z",
  "dealSize": 500,
  "membersCount": 5,
  "createdAt": "2022-02-07T10:03:33.169Z",
  "createdBy": "6a59d07f856fad4ee41952dc",
  "modifiedAt": "2022-02-08T10:03:33.169Z",
  "modifiedBy": "6a59d07f856fad4ee41952dd"
}