ListOpportunities
This request accepts a list of filters that retrieve opportunity subsets as well as
sort options. This feature is available to partners from Partner CentralListOpportunities
API action.
To synchronize your system with AWS, only list the opportunities that
were newly created or updated. We recommend you rely on events emitted by the service
into your AWS account’s Amazon EventBridge default event bus, you can
also use the ListOpportunities
action.
We recommend the following approach:
-
Find the latest
LastModifiedDate
that you stored, and only use the values that came from AWS. Don’t use values generated by your system. -
When you send a
ListOpportunities
request, submit the date in ISO 8601 format in theAfterLastModifiedDate
filter. -
AWS only returns opportunities created or updated on or after that date and time. Use
NextToken
to iterate over all pages.
Request Syntax
{
"Catalog": "string
",
"CustomerCompanyName": [ "string
" ],
"Identifier": [ "string
" ],
"LastModifiedDate": {
"AfterLastModifiedDate": "string
",
"BeforeLastModifiedDate": "string
"
},
"LifeCycleReviewStatus": [ "string
" ],
"LifeCycleStage": [ "string
" ],
"MaxResults": number
,
"NextToken": "string
",
"Sort": {
"SortBy": "string
",
"SortOrder": "string
"
}
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
Note
In the following list, the required parameters are described first.
- Catalog
-
Specifies the catalog associated with the request. This field takes a string value from a predefined list:
AWS
orSandbox
. The catalog determines which environment the opportunities are listed in. UseAWS
for listing real opportunities in the AWS catalog, andSandbox
for testing in secure, isolated environments.Type: String
Pattern:
^[a-zA-Z]+$
Required: Yes
- CustomerCompanyName
-
Filters the opportunities based on the customer's company name. This allows partners to search for opportunities associated with a specific customer by matching the provided company name string.
Type: Array of strings
Array Members: Minimum number of 0 items. Maximum number of 10 items.
Required: No
- Identifier
-
Filters the opportunities based on the opportunity identifier. This allows partners to retrieve specific opportunities by providing their unique identifiers, ensuring precise results.
Type: Array of strings
Array Members: Minimum number of 0 items. Maximum number of 20 items.
Pattern:
^O[0-9]{1,19}$
Required: No
- LastModifiedDate
-
Filters the opportunities based on their last modified date. This filter helps retrieve opportunities that were updated after the specified date, allowing partners to track recent changes or updates.
Type: LastModifiedDate object
Required: No
- LifeCycleReviewStatus
-
Filters the opportunities based on their current lifecycle approval status. Use this filter to retrieve opportunities with statuses such as
Pending Submission
,In Review
,Action Required
, orApproved
.Type: Array of strings
Array Members: Minimum number of 0 items. Maximum number of 10 items.
Valid Values:
Pending Submission | Submitted | In review | Approved | Rejected | Action Required
Required: No
- LifeCycleStage
-
Filters the opportunities based on their lifecycle stage. This filter allows partners to retrieve opportunities at various stages in the sales cycle, such as
Qualified
,Technical Validation
,Business Validation
, orClosed Won
.Type: Array of strings
Array Members: Minimum number of 0 items. Maximum number of 10 items.
Valid Values:
Prospect | Qualified | Technical Validation | Business Validation | Committed | Launched | Closed Lost
Required: No
- MaxResults
-
Specifies the maximum number of results to return in a single call. This limits the number of opportunities returned in the response to avoid providing too many results at once.
Default: 20
Type: Integer
Valid Range: Minimum value of 1. Maximum value of 100.
Required: No
- NextToken
-
A pagination token used to retrieve the next set of results in subsequent calls. This token is included in the response only if there are additional result pages available.
Type: String
Required: No
- Sort
-
An object that specifies how the response is sorted. The default
Sort.SortBy
value isLastModifiedDate
.Type: OpportunitySort object
Required: No
Response Syntax
{
"NextToken": "string",
"OpportunitySummaries": [
{
"Arn": "string",
"Catalog": "string",
"CreatedDate": "string",
"Customer": {
"Account": {
"Address": {
"City": "string",
"CountryCode": "string",
"PostalCode": "string",
"StateOrRegion": "string"
},
"CompanyName": "string",
"Industry": "string",
"OtherIndustry": "string",
"WebsiteUrl": "string"
}
},
"Id": "string",
"LastModifiedDate": "string",
"LifeCycle": {
"ClosedLostReason": "string",
"NextSteps": "string",
"ReviewComments": "string",
"ReviewStatus": "string",
"ReviewStatusReason": "string",
"Stage": "string",
"TargetCloseDate": "string"
},
"OpportunityType": "string",
"PartnerOpportunityIdentifier": "string",
"Project": {
"DeliveryModels": [ "string" ],
"ExpectedCustomerSpend": [
{
"Amount": "string",
"CurrencyCode": "string",
"EstimationUrl": "string",
"Frequency": "string",
"TargetCompany": "string"
}
]
}
}
]
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- OpportunitySummaries
-
An array that contains minimal details for opportunities that match the request criteria. This summary view provides a quick overview of relevant opportunities.
Type: Array of OpportunitySummary objects
- NextToken
-
A pagination token used to retrieve the next set of results in subsequent calls. This token is included in the response only if there are additional result pages available.
Type: String
Errors
For information about the errors that are common to all actions, see Common Errors.
- AccessDeniedException
-
This error occurs when you don't have permission to perform the requested action.
You don’t have access to this action or resource. Review IAM policies or contact your AWS administrator for assistance.
HTTP Status Code: 400
- InternalServerException
-
This error occurs when the specified resource can’t be found or doesn't exist. Resource ID and type might be incorrect.
Suggested action: This is usually a transient error. Retry after the provided retry delay or a short interval. If the problem persists, contact AWS support.
HTTP Status Code: 500
- ResourceNotFoundException
-
This error occurs when the specified resource can't be found. The resource might not exist, or isn't visible with the current credentials.
Suggested action: Verify that the resource ID is correct and the resource is in the expected AWS region. Check IAM permissions for accessing the resource.
HTTP Status Code: 400
- ThrottlingException
-
This error occurs when there are too many requests sent. Review the provided quotas and adapt your usage to avoid throttling.
This error occurs when there are too many requests sent. Review the provided Quotas and retry after the provided delay.
HTTP Status Code: 400
- ValidationException
-
The input fails to satisfy the constraints specified by the service or business validation rules.
Suggested action: Review the error message, including the failed fields and reasons, to correct the request payload.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: