Opportunity Object
When you create a Salesforce opportunity with a contact role that’s associated with an Account Engagement prospect, we create a read-only opportunity in Account Engagement. To use Account Engagement opportunities, first set up the Account Engagement-Salesforce connector. Learn more about opportunities in Salesforce Help.
The API to access the Opportunity object follows the conventions described in Version 5 Overview.
Operation | HTTP Verb | URL Format | Ability Requirements |
---|---|---|---|
Query | GET | https://pi.pardot.com/api/v5/objects/opportunities?<params> | Prospect > Opportunities > View |
Read | GET | https://pi.pardot.com/api/v5/objects/opportunities/<id>?<params> | Prospect > Opportunities > View |
Add Tag | POST | https://pi.pardot.com/api/v5/objects/opportunities/<id>/do/addTag | Prospect > Opportunities > Create AND Marketing > Segmentation > Tags > Create |
Remove Tag | POST | https://pi.pardot.com/api/v5/objects/opportunities/<id>/do/removeTag | Prospect > Opportunities > Create AND Marketing > Segmentation > Tags > Create |
Field | Type | Description |
---|---|---|
campaignId | Integer | Account Engagement ID of the campaign associated with this opportunity. Information about an opportunity's campaign association can be returned using the Campaign relationship. |
closedAt | DateTime | The opportunity's closed date. When left blank, the Closed Date field in Account Engagement isn’t set, even when the opportunity's stage, status, or probability are set to indicate that the opportunity is closed. |
createdAt | DateTime | Time opportunity is created in Account Engagement; Time is reported in API user's preferred timezone. |
createdById | Integer | ID of the user who created this object. |
id | Integer | Account Engagement ID for this opportunity. |
name | String | The opportunity's name |
probability | Integer | The opportunity's probability. Must be a positive numeric value from 0 through 100, inclusive. |
salesforceId | String | The ID of the associated opportunity in Salesforce. |
stage | String | The opportunity's stage. |
status | String | The opportunity's status. Status must be either won, lost, or open. |
type | String | The opportunity's type. |
updatedAt | DateTime | Last time opportunity was updated in Account Engagement; Time is reported in API user's preferred timezone. |
updatedById | Integer | ID of the user who last updated this object. |
value | Float | The opportunity's value. Must be a positive numeric value. |
createdBy | User | User object representing the user who created this object. See documentation for User for fields. |
updatedBy | User | User object representing the user who last updated this object. See documentation for User for fields. |
campaign | Campaign | Campaign object representing the campaign that was set on Create. See documentation for Campaign for fields. |
Retrieve a single opportunity following the conventions described in the Version 5 Overview.
Example request:
Example response:
Retrieve a collection of opportunities following the conventions described in the Version 5 Overview.
Example request:
Example response:
When executing a query, the following fields can be specified in the orderBy
parameter. See the conventions for query described in the Version 5 Overview.
id
updatedAt
createdAt
closedAt
When executing a query, the following parameters can be used to filter the returned results. These parameters can be specified in the request along with any shared parameters defined in Version 5 Overview. When specifying more than one parameter, all parameters must match the record in order for it to be returned in the results.
Parameter | Description |
---|---|
id | Returns any opportunities where ID is equal to the given integer value. |
idList | Returns any opportunities where ID is included in the given list of values. |
idGreaterThan | Returns any opportunities where ID is greater than the specified value, non-inclusive. |
idGreaterThanOrEqualTo | Returns any opportunities where ID is greater than or equal to the specified value. |
idLessThan | Returns any opportunities where ID is less than the specified value, non-inclusive. |
idLessThanOrEqualTo | Returns any opportunities where ID is less than or equal to the specified value. |
createdAt | Returns any opportunities where CreatedAt is equal to the given datetime value. |
createdAtAfter | Returns any opportunities where CreatedAt is after the given datetime value, non-inclusive. |
createdAtAfterOrEqualTo | Returns any opportunities where CreatedAt is after or equal to the given datetime value. |
createdAtBefore | Returns any opportunities where CreatedAt is before the given datetime value, non-inclusive. |
createdAtBeforeOrEqualTo | Returns any opportunities where CreatedAt is before or equal to the given datetime value. |
updatedAt | Returns any opportunities where UpdatedAt is equal to the given datetime value. |
updatedAtAfter | Returns any opportunities where UpdatedAt is after the given datetime value, non-inclusive. |
updatedAtAfterOrEqualTo | Returns any opportunities where UpdatedAt is after or equal to the given datetime value. |
updatedAtBefore | Returns any opportunities where UpdatedAt is before the given datetime value, non-inclusive. |
updatedAtBeforeOrEqualTo | Returns any opportunities where UpdatedAt is before or equal to the given datetime value. |
closedAt | Returns any opportunities where closedAt is equal to the given datetime value. |
closedAtAfter | Returns any opportunities where closedAt is after the given datetime value, non-inclusive. |
closedAtAfterOrEqualTo | Returns any opportunities where closedAt is after or equal to the given datetime value. |
closedAtBefore | Returns any opportunities where closedAt is before the given datetime value, non-inclusive. |
closedAtBeforeOrEqualTo | Returns any opportunities where closedAt is before or equal to the given datetime value. |
Adds a Tag to the Opportunity object, which creates a TaggedObject.
Example Request
Example Response
Remove a tag from an Opportunity object. When you remove a tag, the associated TaggedObject record is deleted.
Example Request
Example Response
Returns code 204 no content
.