Get Opportunities in a List
This API returns the opportunities that belong to a specific Opportunity List. Pass the list’s ID to retrieve its opportunities:
- For a Static List, the API returns the opportunities manually added to it.
- For a Dynamic List, the API returns the opportunities that currently match the list’s saved conditions.
The list you specify determines which opportunities are returned. You cannot pass separate search conditions to this API, but you can narrow results within the list using the optional quick search parameter.
API URL
Request
Content-Type: application/json{
"ListId": "3f2a8c10-0b4f-11ef-9a2b-0a51ce163700",
"OpportunityEventCode": "12543",
"QuickSearch": "",
"Sorting": {
"ColumnName": "CreatedOn",
"Direction": 0
},
"Columns": {
"Include_CSV": "mx_Custom_1,Status,Owner,CreatedOn"
},
"Paging": {
"PageIndex": 1,
"PageSize": 100
}
}
Request Parameters
| Parameter | Description |
|---|---|
| ListId | The opportunity list ID. To find this value, navigate to the Opportunity List Details page, you’ll find the ID in your browser URL. This field is required. |
| OpportunityEventCode | Opportunity type/event code. To find the code, navigate to Settings>Opportunities>Opportunity Types. |
| QuickSearch | Narrow results within the list using free-text search. |
| Sorting | Control the order in which opportunities are returned. |
| Columns | Choose which opportunity fields are returned. |
| Paging | Control how many results are returned per page. |
Response
{
"Data": {
"RecordCount": 2,
"List": [
{
"mx_Custom_1": "Walter Lippman - Automobile Loan",
"Status": "Won",
"Owner": "96105aa0-61f2-11ea-8109-022edb41208c",
"CreatedOn": "3/11/2021 7:20:00 AM"
},
{
"mx_Custom_1": "Jane - Auto Loan",
"Status": "Open",
"Owner": "d5d08e32-5ca9-11ea-8dd7-029e1407a868",
"CreatedOn": "4/6/2023 9:53:34 AM"
}
]
},
"NextCursor": null
}
HTTP Response Codes
| Code | Description |
|---|---|
| 200 OK |
This is the status code for successful API call. |
| 401 Unauthorized |
The API call was made with invalid access credentials. Check your AccessKey and SecretKey. |
| 400 Bad Request |
The message body on the request is not as per API specification. Make sure that content type is set to “application/json” and the JSON body has correct attribute names and structure. |
| 404 Not Found |
The API could not be found. Please check the API signature. |
| 429 Too Many Requests |
API calls exceeded the limit of 25 in 5 second(s) |
| 500 Internal Server Error |
The API called failed. There could be many reasons for it. Check the exception message to get more details. |

