- 15.5
Description
The OpportunityStatus endpoint provides the API consumer with access to methods pertaining to opportunity statuses and related data objects. The endpoint allows consumers to load opportunity statuses, add new opportunity statuses, and update opportunity statuses.
Methods
- Specification
- GetOpportunityStatus
- GetOpportunityStatuses
- AddOpportunityStatus
- UpdateOpportunityStatus
- DeleteOpportunityStatus
| URL | base/CRM/OpportunityStatus/Specification |
|---|---|
| Action | GET |
| Description | Returns a data dictionary that details the available web service methods related to the OpportunityStatus endpoint. |
| Parameters | None |
| Returns | A JSON object with method descriptions |
| Sample Return Object | |
[
{
"HttpAction": "Get",
"MethodName": "GetOpportunityStatus",
"Description": "Returns the record for a single 'OpportunityStatus' given the passed in ID value (see Path).",
"Path": "/OpportunityStatus/GetOpportunityStatus/25032"
},
{
"HttpAction": "Get",
"MethodName": "GetOpportunityStatuses",
"Description": "Returns all 'OpportunityStatus' records (see Path).",
"Path": "/OpportunityStatus/GetOpportunityStatuses"
},
{
"HttpAction": "Post",
"MethodName": "AddOpportunityStatus",
"Description": "Creates the record for a single 'OpportunityStatus' and returns the OpportunityStatus object",
"Format": {
"Name": "Open",
"Description": "Open"
}
},
{
"HttpAction": "Post",
"MethodName": "UpdateOpportunityStatus",
"Description": "Updates the record for a single 'OpportunityStatus' and returns the OpportunityStatus object",
"Format": {
"ID": 998,
"Name": "Open",
"Description": "Open"
}
},
{
"HttpAction": "Get",
"MethodName": "DeleteOpportunityStatus",
"Description": "Deletes the record for a single 'OpportunityStatus' given the passed in ID value (see Path).",
"Path": "/OpportunityStatus/DeleteOpportunityStatus/25032"
}
]
|
|
| URL | base/CRM/OpportunityStatus/GetOpportunityStatus/ID | ||
|---|---|---|---|
| Action | GET | ||
| Description | Returns a OpportunityStatus object when given an ID of a valid opportunity status in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| ID | Yes | Integer | An integer value representing the ID of a opportunity status in the M4 database. |
| Returns | A JSON OpportunityStatus data object | ||
| Sample Return Object | |||
{
"ID": 1,
"Name": "Open",
"Description": "Open"
}
|
|||
| URL | base/CRM/OpportunityStatus/GetOpportunityStatuses | ||
|---|---|---|---|
| Action | GET | ||
| Description | Returns a collection of all the OpportunityStatus objects in the M4 database. | ||
| Parameters | None | ||
| Returns | A list of JSON OpportunityStatus data objects | ||
| Sample Return Object | |||
[
{
"ID": 1,
"Name": "Open",
"Description": "Open"
},
{
"ID": 2,
"Name": "Stalled",
"Description": "Stalled"
}
]
|
|||
| URL | base/CRM/OpportunityStatus/AddOpportunityStatus | ||
|---|---|---|---|
| Action | POST | ||
| Description | Adds the specified OpportunityStatus object and returns the newly added OpportunityStatus object. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| Name | Yes | String | The name of the opportunity status. |
| Description | No | String | The description of the opportunity status. |
| Sample JSON Package | |||
{
"Name": "Open",
"Description": "Open"
}
|
|||
| Returns | A JSON OpportunityStatus data object | ||
| Sample Return Object | |||
{
"ID": 1,
"Name": "Open",
"Description": "Open"
}
|
|||
| Business Rules | |||
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
|
|||
| URL | base/CRM/OpportunityStatus/UpdateOpportunityStatus | ||
|---|---|---|---|
| Action | POST | ||
| Description | Updates the specified OpportunityStatus object and returns the newly updated OpportunityStatus object. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| ID | Yes | Integer | The ID of the opportunity status. |
| Name | Yes | String | The name of the opportunity status. |
| Description | No | String | The description of the opportunity status. |
| Sample JSON Package | |||
{
"ID": 1,
"Name": "Open",
"Description": "Open"
}
|
|||
| Returns | A JSON OpportunityStatus data object | ||
| Sample Return Object | |||
{
"ID": 1,
"Name": "Open",
"Description": "Open"
}
|
|||
| Business Rules | |||
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
|
|||
| URL | base/CRM/OpportunityStatus/DeleteOpportunityStatus/ID | ||
|---|---|---|---|
| Action | GET | ||
| Description | Deletes a OpportunityStatus object when given an ID of a valid opportunity status in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| ID | Yes | Integer | An integer value representing the ID of a opportunity status in the M4 database. |
| Returns | A JSON data object | ||
| Sample Return Object | |||
{
"Message": "The OpportunityStatus with ID [55] was deleted successfully."
}
|
|||