Lets you retrieve all activities within a given time frame. The FromDate and ToDate must be specified in yyyy-mm-dd hh:mm:ss format. Pass IncludeCustomFields: 1 to include activity custom fields in the response.
Note:
- Custom field sets will be returned in the response if associated with the activity.
- The time zone considered is Universal Time Coordinated (UTC). You may need to convert the time from your local timezone to UTC before passing it here.
API URL
Request
JSON Body/Payload
Content-Type: application/json
{
"Parameter": {
"FromDate": "2017-01-01 00:00:00",
"ToDate": "2018-01-17 23:59:59",
"IncludeCustomFields": 1
},
"Paging": {
"PageIndex": 1,
"PageSize": 20
},
"Sorting": {
"ColumnName": "CreatedOn",
"Direction": 1
}
}
JSON Properties
{ "Parameter": { "FromDate": "2017-01-01 00:00:00", "ToDate": "2018-01-17 23:59:59", "IncludeCustomFields": 1 }, "Paging": { "PageIndex": 1, "PageSize": 20 }, "Sorting": { "ColumnName": "CreatedOn", "Direction": 1 } }
JSON Properties
Parameter | Description |
---|---|
FromDate | Beginning of the date range |
ToDate | End of the date range |
IncludeCustomFields | Returns activity custom fields.
|
PageIndex | The results set 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 the second call. |
PageSize | The results set 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 the second call. |
ColumnName | The column on which results will be sorted. For example, if you want results to be shown based on creation date, pass “CreatedOn”. |
Direction | Direction “1” means descending order and “0” means ascending order. |
Response
200 OK
Content-Type: application/json
{ "RecordCount": 13, "ProspectActivities": [ { "Id": "67d4b7f1-0b4d-440b-adf5-fe876ad58eda", "EventCode": 167, "EventName": "Document Collection", "ActivityScore": 0, "CreatedOn": "2019-05-14 10:04:00", "ActivityType": 2, "IsEmailType": false, "Type": "Inbound", "SessionId": "67d4b7f1-0b4d-440b-adf5-fe876ad58eda", "TrackLocation": 0, "Latitude": 0, "Longitude": 0, "RelatedProspectId": "3d36966e-7bb3-411f-8b94-04cb73f34267", "Data": [ { "Key": "CreatedByName", "Value": "Vir Singh" }, { "Key": "EventName", "Value": "Document Collection" }, { "Key": "NotableEventDescription", "Value": "" }, { "Key": "HasAttachments", "Value": "False" } ], "Fields": [ { "Key": "mx_Custom_1", "Value": null }, { "Key": "mx_Custom_2", "Value": null }, { "Key": "mx_Custom_3", "Value": "{\"mx_CustomObject_1\":\"86b8b2f2.png,9ce34e08.png\",\"ModifiedByName\":\"Vir Singh\",\"ModifiedOn\":\"2019-05-14 10:13:46\",\"Status\":\"Pending\"}" }, { "Key": "mx_Custom_4", "Value": null }, { "Key": "mx_Custom_5", "Value": null }, { "Key": "mx_Custom_6", "Value": null }, { "Key": "mx_Custom_7", "Value": null }, { "Key": "mx_Custom_8", "Value": null }, { "Key": "mx_Custom_9", "Value": null }, { "Key": "mx_Custom_10", "Value": null }, { "Key": "mx_Custom_11", "Value": null }, { "Key": "mx_Custom_12", "Value": null }, { "Key": "mx_Custom_13", "Value": null }, { "Key": "mx_Custom_14", "Value": null }, { "Key": "mx_Custom_15", "Value": null }, { "Key": "Status", "Value": "Active" }, { "Key": "Owner", "Value": null }, { "Key": "ProspectActivityId", "Value": "67d4b7f1-0b4d-440b-adf5-fe876ad58eda" } ], "ModifiedOn": "2019-05-14 10:13:46" }, { "Id": "df4b84c4-b69e-4881-9be9-5ccd50cddb57", "EventCode": 23, "EventName": "Lead Capture", "ActivityScore": 0, "CreatedOn": "2019-05-08 10:08:52", "ActivityType": 5, "IsEmailType": false, "Type": "Inbound", "SessionId": "d6274151-58d1-422c-9b10-a8ef98e8bea1", "TrackLocation": 0, "Latitude": 0, "Longitude": 0, "RelatedProspectId": "e68088da-cf35-4951-be47-35dd65e43629", "Data": [], "Address": "", "City": "", "State": "", "Country": "", "ModifiedOn": "2019-05-08 10:11:36" }, { "Id": "63b6ee41-1609-4c88-949e-caab49ff4d0e", "EventCode": 23, "EventName": "Lead Capture", "ActivityScore": 0, "CreatedOn": "2019-05-07 12:56:47", "ActivityType": 5, "IsEmailType": false, "Type": "Inbound", "SessionId": "2bdd8abd-7eb3-41d4-9838-45e88afd8657", "TrackLocation": 0, "Latitude": 0, "Longitude": 0, "RelatedProspectId": "321fb4ed-2cbf-4108-afd1-8d0c84585a97", "Data": [], "Address": "", "City": "", "State": "", "Country": "", "ModifiedOn": "2019-05-07 12:56:52" }, { "Id": "d450647e-121b-4ccd-9946-8231e12b959c", "EventCode": 23, "EventName": "Lead Capture", "ActivityScore": 0, "CreatedOn": "2019-05-07 12:56:03", "ActivityType": 5, "IsEmailType": false, "Type": "Inbound", "SessionId": "9dd74457-a398-4e52-8dce-3eea51b0068c", "TrackLocation": 0, "Latitude": 0, "Longitude": 0, "RelatedProspectId": "8e8ea4c5-fa99-4c42-8d26-b3a7c416690d", "Data": [], "Address": "", "City": "", "State": "", "Country": "", "ModifiedOn": "2019-05-07 12:56:08" }, { "Id": "50f3bc47-823c-4cc8-bd70-b915fd62533c", "EventCode": 23, "EventName": "Lead Capture", "ActivityScore": 0, "CreatedOn": "2019-05-07 12:25:36", "ActivityType": 5, "IsEmailType": false, "Type": "Inbound", "SessionId": "ede2ab6d-7437-408c-b0c1-648d4e6c15d2", "TrackLocation": 0, "Latitude": 0, "Longitude": 0, "RelatedProspectId": "1ca6317f-8718-437c-a1af-e4aa205a2f15", "Data": [], "Address": "", "City": "", "State": "", "Country": "", "ModifiedOn": "2019-05-07 12:25:42" }, { "Id": "4d7c4c98-acf8-434b-9742-848da7c4ee40", "EventCode": 23, "EventName": "Lead Capture", "ActivityScore": 0, "CreatedOn": "2019-05-07 12:04:12", "ActivityType": 5, "IsEmailType": false, "Type": "Inbound", "SessionId": "30b03c56-ce0c-46be-93d5-42c7ac9a9582", "TrackLocation": 0, "Latitude": 0, "Longitude": 0, "RelatedProspectId": "a3818d9e-cf68-4e8d-a79e-662a0601199f", "Data": [], "Address": "", "City": "", "State": "", "Country": "", "ModifiedOn": "2019-05-07 12:04:13" }, { "Id": "6a741d35-7e54-4cb6-8f62-efcfddc10aaf", "EventCode": 23, "EventName": "Lead Capture", "ActivityScore": 0, "CreatedOn": "2019-05-07 10:40:10", "ActivityType": 5, "IsEmailType": false, "Type": "Inbound", "SessionId": "2268b657-7d34-4af4-a7b1-aaf437941611", "TrackLocation": 0, "Latitude": 0, "Longitude": 0, "RelatedProspectId": "0b153d3c-0c4e-40e7-8183-3fd128074196", "Data": [], "Address": "", "City": "", "State": "", "Country": "", "ModifiedOn": "2019-05-07 10:40:15" }, { "Id": "841e9035-b660-4252-b2a2-56339c61c4b0", "EventCode": 23, "EventName": "Lead Capture", "ActivityScore": 0, "CreatedOn": "2019-05-06 11:01:09", "ActivityType": 5, "IsEmailType": false, "Type": "Inbound", "SessionId": "11ec36e5-71d0-4dad-9f5b-83c09bd3eb5a", "TrackLocation": 0, "Latitude": 0, "Longitude": 0, "RelatedProspectId": "e06a915c-1b03-4959-af07-fa6dc16b4d72", "Data": [], "Address": "", "City": "", "State": "", "Country": "", "ModifiedOn": "2019-05-06 11:01:12" }, { "Id": "95cd526c-8f9e-40bb-99cf-308bfcfe8df5", "EventCode": 23, "EventName": "Lead Capture", "ActivityScore": 0, "CreatedOn": "2019-05-06 11:01:01", "ActivityType": 5, "IsEmailType": false, "Type": "Inbound", "SessionId": "94743335-aaa9-4392-9c82-2386c7704a57", "TrackLocation": 0, "Latitude": 0, "Longitude": 0, "RelatedProspectId": "3b6112e7-5964-4857-aa89-ec3f896429f7", "Data": [], "Address": "", "City": "", "State": "", "Country": "", "ModifiedOn": "2019-05-06 11:01:03" }, { "Id": "f1b06193-1aa8-4b20-821d-ac0d1634f600", "EventCode": 23, "EventName": "Lead Capture", "ActivityScore": 0, "CreatedOn": "2019-05-06 10:59:14", "ActivityType": 5, "IsEmailType": false, "Type": "Inbound", "SessionId": "8c1a0b89-9de3-49db-bf08-7847425f32ff", "TrackLocation": 0, "Latitude": 0, "Longitude": 0, "RelatedProspectId": "f12710ed-8153-4b61-8d62-2288a3b95edb", "Data": [], "Address": "", "City": "", "State": "", "Country": "", "ModifiedOn": "2019-05-06 10:59:16" }, { "Id": "c7eefdb0-1038-4168-9709-b5ad3ee8150a", "EventCode": 23, "EventName": "Lead Capture", "ActivityScore": 0, "CreatedOn": "2019-05-06 10:58:42", "ActivityType": 5, "IsEmailType": false, "Type": "Inbound", "SessionId": "768212f9-6930-4ea1-b683-f573bc736c8f", "TrackLocation": 0, "Latitude": 0, "Longitude": 0, "RelatedProspectId": "cdbe4774-9c42-49a3-8b13-42bc4533509d", "Data": [], "Address": "", "City": "", "State": "", "Country": "", "ModifiedOn": "2019-05-06 10:58:51" }, { "Id": "c010ca6c-b026-43c9-a7a9-79ce4cc1a0dd", "EventCode": 167, "EventName": "Document Collection", "ActivityScore": 0, "CreatedOn": "2019-04-10 06:44:38", "ActivityType": 2, "IsEmailType": false, "Type": "Inbound", "SessionId": "c010ca6c-b026-43c9-a7a9-79ce4cc1a0dd", "TrackLocation": 0, "Latitude": 0, "Longitude": 0, "RelatedProspectId": "0acb9356-bcd1-4128-b63a-97f52cb8cc3c", "Data": [ { "Key": "CreatedByName", "Value": "Vir Singh" }, { "Key": "EventName", "Value": "Document Collection" }, { "Key": "NotableEventDescription", "Value": "" }, { "Key": "HasAttachments", "Value": "False" } ], "Fields": [ { "Key": "mx_Custom_1", "Value": null }, { "Key": "mx_Custom_2", "Value": null }, { "Key": "mx_Custom_3", "Value": "{\"mx_CustomObject_1\":\"49f49e54.png\",\"ModifiedByName\":\"Vir Singh\",\"ModifiedOn\":\"2019-05-14 10:02:28\",\"Status\":\"Pending\"}" }, { "Key": "mx_Custom_4", "Value": null }, { "Key": "mx_Custom_5", "Value": null }, { "Key": "mx_Custom_6", "Value": null }, { "Key": "mx_Custom_7", "Value": null }, { "Key": "mx_Custom_8", "Value": null }, { "Key": "mx_Custom_9", "Value": null }, { "Key": "mx_Custom_10", "Value": null }, { "Key": "mx_Custom_11", "Value": null }, { "Key": "mx_Custom_12", "Value": null }, { "Key": "mx_Custom_13", "Value": null }, { "Key": "mx_Custom_14", "Value": null }, { "Key": "mx_Custom_15", "Value": null }, { "Key": "Status", "Value": "Active" }, { "Key": "Owner", "Value": null }, { "Key": "ProspectActivityId", "Value": "c010ca6c-b026-43c9-a7a9-79ce4cc1a0dd" } ], "ModifiedOn": "2019-05-14 10:02:28" }, { "Id": "08e5e297-3c15-4ba9-ad12-8a90f9da2bd1", "EventCode": 25, "EventName": "Opted-in for Email", "ActivityScore": 10, "CreatedOn": "2018-05-25 11:24:13", "ActivityType": 6, "IsEmailType": false, "Type": "Information", "SessionId": "", "TrackLocation": 0, "Latitude": 0, "Longitude": 0, "RelatedProspectId": "2e1497ca-a45c-422b-b78d-168f352edf65", "Data": [ { "Key": "IPAddress", "Value": "" }, { "Key": "UserAgent", "Value": "" }, { "Key": "Origin", "Value": "LeadDetails" }, { "Key": "CurrentOptInStatus", "Value": "OptedIn" }, { "Key": "OptInDate", "Value": "2018-05-25 11:24:13" }, { "Key": "Notes", "Value": "Testsada sdasdasda" }, { "Key": "OptInDetails", "Value": "{\"Source\":\"LeadDetails\",\"SourceId\":5,\"CallerMethod\":\"MX.Radon.Services.MarketingAutomation.LeadManagement.EditLead\",\"CreatedBy\":\"3b1041fb-8374-11e7-8758-0a106ee76b21\",\"CreatedOn\":\"2018-05-25 11:24:13\",\"AuditType\":1,\"Comment\":\"Testsada sdasdasda\",\"DoNotEmail\":\"false\"}" } ], "Address": "", "City": "", "State": "", "Country": "", "ModifiedOn": "2018-05-25 11:24:13" } ] }
HTTP Response Code
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. |