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

POST
https://{host}/v2/ProspectActivity.svc/CustomActivity/RetrieveByActivityEvent?accessKey=AccessKey&secretKey=SecretKey
Copy URL

Request

JSON Body/Payload

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
                }
}

JSON Properties

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

200 OK

Content-Type: application/json

{
    "RecordCount": 2,
    "List": [
        {
            "ProspectActivityId": "4317a9f9-bc6e-4e23-ad55-dfe6ff281ec1",
            "RelatedProspectId": "15d1a167-91fe-11e7-b0ab-02e89b2fb8f4",
            "ActivityType": "2",
            "ActivityEvent": "154",
            "CreatedOn": "2017-11-13 06:50:00",
            "CreatedBy": "3b1041fb-8374-11e7-8758-0a106ee76b21",
            "CreatedByEmailAddress": "virkdsingh@gmail.com",
            "CreatedByName": "Vir Singh",
            "ModifiedOn": "2017-11-13 06:50:08",
            "ModifiedBy": "3b1041fb-8374-11e7-8758-0a106ee76b21",
            "ModifiedByEmailAddress": "virkdsingh@gmail.com",
            "ModifiedByName": "Vir Singh"
        },
        {
            "ProspectActivityId": "7d2d5215-c434-4fdd-b5ad-1b1071783cec",
            "RelatedProspectId": "257d379d-9c60-11e7-b0ab-02e89b2fb8f4",
            "ActivityType": "2",
            "ActivityEvent": "154",
            "CreatedOn": "2017-11-13 06:37:00",
            "CreatedBy": "3b1041fb-8374-11e7-8758-0a106ee76b21",
            "CreatedByEmailAddress": "virkdsingh@gmail.com",
            "CreatedByName": "Vir Singh",
            "ModifiedOn": "2017-11-13 06:37:24",
            "ModifiedBy": "3b1041fb-8374-11e7-8758-0a106ee76b21",
            "ModifiedByEmailAddress": "virkdsingh@gmail.com",
            "ModifiedByName": "Vir Singh"
        }
    ]
}

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.