Get Activities by Activity Event
Allows you to retrieve multiple instances of an activity posted to one or many leads by passing the ‘Activity Event’.
Note: By default, the activities will be retrieved based on ‘Modified Date’ but you can sort the result by created on date by passing the ‘Column Name’ as ‘Created On’ in the ‘Sorting’ parameter.
API URL
Request
Content-Type: application/json{ "Parameter": { "FromDate": "2017-11-02 18:30:00", "ToDate": "2017-11-06 18:29:59", "ActivityEvent": 154, "RemoveEmptyValue": true }, "Paging": { "PageIndex": 1, "PageSize": 100 }, "Sorting": { "ColumnName": "ModifiedOn", "Direction": 1 } }
Request Parameters
Parameter | Description |
---|---|
FromDate | The start date and time to bulk retrieve activities. |
ToDate | The end date and time to bulk retrieve activities. |
ActivityEvent | The code for the activity event. Find it by navigating to My Account>Settings>Customizations>Activities and Scores>Cutom Activities & Scores |
RemoveEmptyValue | It isn’t mandatory to pass this parameter. If you pass ‘true’, any custom field that doesn’t contain a value won’t be returned in the response. |
PageIndex | Refers to the page number (“1” represents the first page). |
PageSize | Refers to the number of records to be displayed. |
ColumnName | The name of the column you want to sort the results by. |
Direction | Passing “1” will sort the data most recent first while “0” will sort oldest first. |
Response
{ "RecordCount": 2, "List": [ { "ProspectActivityId": "67d4b7f1-0b4d-440b-adf5-fe876ad58eda", "RelatedProspectId": "3d36966e-7bb3-411f-8b94-04cb73f34267", "ActivityType": "2", "ActivityEvent": "167", "Status": "Active", "mx_Custom_3": "{\"mx_CustomObject_1\":\"86b8b2f2.png,9ce34e08.png\",\"ModifiedByName\":\"Vir Singh\",\"ModifiedOn\":\"2019-05-14 10:13:46\",\"Status\":\"Pending\"}", "CreatedOn": "2019-05-14 10:04:00", "CreatedBy": "3b1041fb-8374-11e7-8758-0a106ee76b21", "CreatedByEmailAddress": "virkdsingh@gmail.com", "CreatedByName": "Vir Singh", "ModifiedOn": "2019-05-14 10:13:46", "ModifiedBy": "3b1041fb-8374-11e7-8758-0a106ee76b21", "ModifiedByEmailAddress": "virkdsingh@gmail.com", "ModifiedByName": "Vir Singh" }, { "ProspectActivityId": "c010ca6c-b026-43c9-a7a9-79ce4cc1a0dd", "RelatedProspectId": "0acb9356-bcd1-4128-b63a-97f52cb8cc3c", "ActivityType": "2", "ActivityEvent": "167", "Status": "Active", "mx_Custom_3": "{\"mx_CustomObject_1\":\"49f49e54.png\",\"ModifiedByName\":\"Vir Singh\",\"ModifiedOn\":\"2019-05-14 10:02:28\",\"Status\":\"Pending\"}", "CreatedOn": "2019-04-10 06:44:38", "CreatedBy": "3b1041fb-8374-11e7-8758-0a106ee76b21", "CreatedByEmailAddress": "virkdsingh@gmail.com", "CreatedByName": "Vir Singh", "ModifiedOn": "2019-05-14 10:02:28", "ModifiedBy": "3b1041fb-8374-11e7-8758-0a106ee76b21", "ModifiedByEmailAddress": "virkdsingh@gmail.com", "ModifiedByName": "Vir Singh" } ] }
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. |