Opportunities / Entity
Update Opportunity
This endpoint allows you to update a specific Opportunity. If the specified Opportunity does not exist, the response will be a "bad request".
You will only be able to update a Opportunity after first providing the Session Key. To know how you can obtain the Session Key, go to Authentication.
HEADERS
| Parameter | Value | Description |
|---|---|---|
| Content-Type | application/json | Language in which all request and response bodies are encoded |
| Accept | */* | Any data of whatever mime type is accepted |
| X-Session-Key | AUTH_TOKEN | This field must be completed with the token obtained at the authentication |
REQUEST
This endpoint allows updating the information of a specific Opportunity. In order to update an Opportunity, you just have to specify the attributes you want to modify and complete with the up to date information. It is not necessary to send all attributes.
| Attribute | Type | Description |
|---|---|---|
| accountId1 | Integer | First Account to whom the Opportunity is linked to (see Accounts resource) |
| accountId2 | Integer | Second Account to whom the Opportunity is linked to (see Accounts resource) |
| accountId3 | Integer | Third Account to whom the Opportunity is linked to (see Accounts resource) |
| address1 | String | First address to whom the Opportunity is linked |
| address2 | String | Second address to whom the Opportunity is linked |
| branchId | Integer | Branch to whom the Opportunity has been assigned (see Branches resource) |
| city | String | City name |
| closedDate | String | Date when the Opportunity was closed |
| comments | String | Comment added to the Opportunity |
| countryId | Integer | Country ID (see Countries resource) of the Opportunity address |
| currencyId | Integer | Currency ID (see Currencies resource) related to the Opportunity amount |
| extId | String | External ID of the Opportunity from a third party system (ERP, CRM, Accounting System) |
| geocoded | Boolean | If true, the Opportunity has been geolocated |
| geocodingAccuracy | Integer | Accuracy radius based on information about cell towers and WiFi nodes that the mobile client can detect |
| latitude | Number | Geocode address for the latitude coordinates |
| longitude | Number | Geocode address for the longitude coordinates |
| lostDate | String | Date when the Opportunity was lost |
| permissionLevel | String | Defines the visibility of the Opportunity. Set from 1 to 5 being 5 the highest level of permission |
| postcode | String | The Opportunity's address postal code |
| readOnly | Boolean | If true, the Opportunity can not be modified or deleted |
| reference | String | Opportunity's name |
| region | String | Region/State name |
| salesForeCastDate | String | Forecast sale date |
| salesProbability (Required) | Integer | Probability of sale, it is a number between 0 and 10 |
| salesRepId | Integer | Unique identifier of the User associated to the Opportunity (see Users resource) |
| type_id | Integer | Type of the Opportunity (see Types resource) |
| statusId | Integer | Status of the Opportunity (see Statues resource) |
| total | Number | Total amount of the Opportunity |
| wonDate | String | Date when the Opportunity was won |
RESPONSE
Returns a JSON with information about the Opportunity just updated.
| Attribute | Description |
|---|---|
| Message | Shows the operation status |
RESPONSE CODES
| Status | Description |
|---|---|
| 200 OK | Shows if operation succeeded |
| 400 Bad Request | Shows when an invalid request or the requested service is not available |
put/opportunities/{ID}
Request
- Base URL: https://api.forcemanager.com/api/v4
- URL: https://api.forcemanager.com/api/v4/opportunities/{ID}
- Auth: API key in header X-Session-Key
Headers
Acceptstring
Request body
Response
Update Opportunity
Changes
No recorded changes to this operation across all 1 revision of this API.