Get Activity Change History
Retrieves the history of changes for multiple activities within a specified date range. The response returns activity details as well as new and old field values within the given date range.
- The
FromDate
andToDate
parameters are mandatory. - The
ActivityEvents
parameter is optional. You can pass multiple activity event codes here. If you don’t pass this parameter, all activity events will be returned. - The
ActivityID
parameter is optional. Pass an ActivityID to obtain changes related to a specific acitivity within the defined duration. To obtain the Id, refer to Get Activities by Activity Event. - “Paging” parameters are optional. The default page size is 25. Maximum allowed is 1000.
Note: You can either pass ActivityEvents
or ActivityID
. You cannot pass both the parameters.
API URL
Request
Content-Type: application/json{ "Parameter":{ "FromDate":"2021-09-13 18:29:59", "ToDate":"2022-03-14 10:45:59", "ActivityID":"62e0feb3-9ee2-11e8-9f20-020714094d7e" }, "Paging":{ "PageIndex":1, "PageSize":100 } }
Request Parameters
Parameter | Description |
---|---|
FromDate | The start date you want to retrieve activity changes from. |
ToDate | The end date you want to retrieve activity changes till. |
ActivityID | The activity for which you want to get the history change record. To obtain the Id, refer to Get Activity Type Details. |
ActivityEvents | The code for activity events. Find it by navigating to My Account>Settings>Customizations>Activities and Scores>Cutom Activities & Scores |
PageIndex | Refers to the page number (“1” represents the first page). |
PageSize | Refers to the number of records to be displayed. |
Response
{ "RecordCount": 1, "Activities": [ { "Activity": { "ProspectActivityId": "54df288a-cd8f-456c-adb6-dc0c9de9f54f", "RelatedProspectId": "93553424-b53b-476b-ae25-77e1649b41bd", "ActivityType": "2", "ActivityEvent": "322", "Score": "2", "CreatedOn": "2018-09-14 10:45:00", "CreatedBy": "c7b539c1-3f7f-11e6-bec9-22000aa5088d", "ModifiedOn": "2018-09-14 10:48:12", "ModifiedBy": "c7b539c1-3f7f-11e6-bec9-22000aa5088d", "ActivityDate": "2018-09-14 10:45:19", "mx_Custom_5": "sdvdxv", "Status": "invalid", "CreatedWithInTimeRange": "Yes" }, "Audit": [ { "ModifiedBy": "c7b539c1-3f7f-11e6-bec9-22000aa5088d", "ModifiedOn": "2018-09-14 10:45:30", "New": { "mx_Custom_5": "sdvdxv" }, "Old": { "mx_Custom_5": "" } }, { "ModifiedBy": "c7b539c1-3f7f-11e6-bec9-22000aa5088d", "ModifiedOn": "2018-09-14 10:48:12", "New": { "Status": "invalid" }, "Old": { "Status": "Inactive" } } ] } ] }
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. |