LeadSquared Developer Centre


Get Activities of an Opportunity

Returns the activities of an opportunity. There are 2 ways to use this API –


  • This API will retrieve the details of up to 25 activities in a single call. If you want to retrieve more than 25 activities you must pass the pagination parameters.
    For example, {“Paging”: {“Offset”: “1”,”RowCount”: “50”}}
  • To get theOpportunityIdof an opportunity, use the Get an Opportunity by Id API.



POST https://{host}/v2/OpportunityManagement.svc/GetActivitiesOfOpportunity?accessKey=AccessKey&secretKey=SecretKey&opportunityId=OpportunityId&activityEventCode=ActivityEventCode

URL Parameters

Parameter Description
OpportunityId The opportunity Id for the opportunity type.
ActivityEventCode The activity event code for the activity type. This is optional.


Content-Type: application/json
JSON Body/Payload Icon

Request Parameters

Parameter Description

By default, all the standard activity fields are returned. InInclude_CSV, add the specific activity fields you want to retrieve in the response.


The results matching your criteria may be large. You can fetch the result in blocks of “PageSize” and make multiple calls to the API with increasing values of “PageIndex”. For example, you can specify “PageIndex”: 1, “PageSize”: 100 for the first call and specify “PageIndex”: 2, “PageSize”: 100 for second call.


Pass the ColumnName by which you want to sort the results.

For direction, passing ‘1’ will sort the data by the most recent first. Passing ‘0’ will sort the data by the oldest first.


200 OK
Content-Type: application/json
         "LeadName":"Manish Garg",
         "LeadOwner":"Rohan Sane",
         "PACreatedOn":"2020-10-16 05:57:37",
         "PAModifiedOn":"2020-10-16 06:10:54",
         "PACreatedByName":"Rajesh Aggarwal",

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.

On this page

© 2022 by MarketXpander Services Pvt Ltd. All Rights Reserved.