Get Started
Usage API
More information

PUT api/2.0/crm/opportunity/{opportunityid} This function requires authentication

Description

Updates the selected opportunity with the parameters specified in the request.

Parameters
Name Description Type Example
opportunityid
sent in url
Opportunity ID number 1234
contactid
sent in body
New opportunity primary contact ID number 1234
members
sent in body
New opportunity participants
optional
Collection of numbers
collection
1234
title
sent in body
New opportunity title string some text
description
sent in body
New opportunity description
optional
string some text
responsibleid
sent in body
New opportunity responsible ID guid 9924256A-739C-462b-AF15-E652A3B1B6EB
bidType
sent in body
New bid type
Allowed values: FixedBid, PerHour, PerDay,PerWeek, PerMonth, PerYear
FixedBid, PerHour, PerDay, PerWeek, PerMonth, PerYear
bidValue
sent in body
New amount of transactions
optional
System.Decimal
bidCurrencyAbbr
sent in body
New currency (abbreviation)
Allowed values: EUR, RUB etc. You can get the whole list of available currencies by api
optional
string some text
perPeriodValue
sent in body
New amount per period number 1234
stageid
sent in body
New stage ID number 1234
successProbability
sent in body
New opportunity success probability
optional
number 1234
actualCloseDate
sent in body
New actual opportunity closure date
optional
Date and Time Roundtrip format: 2008-04-10T06-30-00.000Z
expectedCloseDate
sent in body
New expected opportunity closure date
optional
Date and Time Roundtrip format: 2008-04-10T06-30-00.000Z
customFieldList
sent in body
New custom field list
optional
Collection of ASC.Api.Collections.ItemKeyValuePair`2[System.Int32,System.String]s
collection
isPrivate
sent in body
New opportunity privacy: private or not Bool value true
accessList
sent in body
New list of users with access rights to the opportunity
optional
Collection of guids
collection
9924256A-739C-462b-AF15-E652A3B1B6EB
isNotify
sent in body
Notifies users from the access list about the opportunity
optional
Bool value true
Example
PUT api/2.0/crm/opportunity/1234
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "contactid": 1234,
  "members": [
    1234
  ],
  "title": "some text",
  "description": "some text",
  "responsibleid": "9924256A-739C-462b-AF15-E652A3B1B6EB",
  "bidType": "fixedbid",
  "bidValue": 0.0,
  "bidCurrencyAbbr": "some text",
  "perPeriodValue": 1234,
  "stageid": 1234,
  "successProbability": 1234,
  "actualCloseDate": "2008-04-10T06-30-00.000Z",
  "expectedCloseDate": "2008-04-10T06-30-00.000Z",
  "customFieldList": [
    {
      "Key": 0,
      "Value": null
    }
  ],
  "isPrivate": true,
  "accessList": [
    "00000000-0000-0000-0000-000000000000"
  ],
  "isNotify": true
}
Returns

Updated opportunity

Example Response

application/json

{
  "status": 0,
  "response": {
    "createBy": {
      "id": "00000000-0000-0000-0000-000000000000",
      "displayName": "Mike Zanyatski",
      "title": "Manager",
      "avatarSmall": "url to small avatar",
      "profileUrl": ""
    },
    "created": "2021-10-27T06:29:16.4876706Z",
    "contact": {
      "smallFotoUrl": "url to foto",
      "displayName": "Tadjeddine Bachir",
      "isCompany": false,
      "isPrivate": true,
      "isShared": false,
      "shareType": 0,
      "currency": null,
      "canEdit": false,
      "canDelete": false,
      "id": 0
    },
    "title": "Hotel catalogue",
    "description": "",
    "responsible": {
      "id": "00000000-0000-0000-0000-000000000000",
      "displayName": "Mike Zanyatski",
      "title": "Manager",
      "avatarSmall": "url to small avatar",
      "profileUrl": ""
    },
    "stage": {
      "successProbability": 20,
      "stageType": 0,
      "title": "Discussion",
      "description": "The potential buyer showed his\/her interest and sees how your offering meets his\/her goal",
      "color": "#B9AFD3",
      "sortOrder": 2,
      "id": 30
    },
    "successProbability": 65,
    "expectedCloseDate": "2021-10-27T06:29:16.4876706Z",
    "isPrivate": false,
    "canEdit": false,
    "id": 0
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <createBy>
      <id>00000000-0000-0000-0000-000000000000</id>
      <displayName>Mike Zanyatski</displayName>
      <title>Manager</title>
      <avatarSmall>url to small avatar</avatarSmall>
      <profileUrl></profileUrl>
    </createBy>
    <created>2021-10-27T06:29:16.4876706Z</created>
    <contact>
      <smallFotoUrl>url to foto</smallFotoUrl>
      <displayName>Tadjeddine Bachir</displayName>
      <isCompany>false</isCompany>
      <isPrivate>true</isPrivate>
      <isShared>false</isShared>
      <shareType>0</shareType>
      <currency />
      <canEdit>false</canEdit>
      <canDelete>false</canDelete>
      <id>0</id>
    </contact>
    <title>Hotel catalogue</title>
    <description></description>
    <responsible>
      <id>00000000-0000-0000-0000-000000000000</id>
      <displayName>Mike Zanyatski</displayName>
      <title>Manager</title>
      <avatarSmall>url to small avatar</avatarSmall>
      <profileUrl></profileUrl>
    </responsible>
    <stage>
      <successProbability>20</successProbability>
      <stageType>0</stageType>
      <title>Discussion</title>
      <description>The potential buyer showed his/her interest and sees how your offering meets his/her goal</description>
      <color>#B9AFD3</color>
      <sortOrder>2</sortOrder>
      <id>30</id>
    </stage>
    <successProbability>65</successProbability>
    <expectedCloseDate>2021-10-27T06:29:16.4876706Z</expectedCloseDate>
    <isPrivate>false</isPrivate>
    <canEdit>false</canEdit>
    <id>0</id>
  </response>
</result>