LeadSquared Developer Centre

ON THIS PAGE

Update Activities in Bulk


Lets you update multiple activities in one go.

  • Update multiple activities by passing the corresponding ‘Prospect Activity Ids’.
  • Within an activity, use the ‘Fields’ array to pass the ‘Schema Names’ of the fields you wish to update along with the new ‘Values’.

Note:

  • The supported DateTime format is UTC (YYYY-MM-DD HH:MM:SS).
  • To skip validating dropdown activity fields, pass an additional parameter "ValidateDropDownOptions" : true. This is helpful if you’re passing drop-down values stored on Mavis DB.
  • This API will trigger Rules and Automations that you’ve set up using ‘Activity Update’ triggers.
  • The maximum limit is 25 activities.

 

API URL

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

Request

Content-Type: application/json
JSON Body/Payload Icon
[{
 "ProspectActivityId": "bb9205fd-81b8-4d44-bf74-26f90e11790b",
 "ActivityNote": "Activity note update",
 "Fields": [{
   "SchemaName": "mx_Custom_1",
   "Value": "First"
  },
  {
   "SchemaName": "mx_Custom_2",
   "Value": "2016"
  },
  {
   "SchemaName": "mx_Custom_3",
   "Value": "Activity Test"
  },
  {
   "SchemaName": "mx_Custom_4",
   "Value": "2016-09-18 12:12:12"
  },
  {
   "SchemaName": "mx_Custom_5",
   "Value": "qwerty"
  }
 ]
}, {
 "ProspectActivityId": "bb9205fd-81b8-4d44-bf74-26f90e11790b",
 "ActivityNote": "Activity note update",
 "Fields": [{
   "SchemaName": "mx_Custom_1",
   "Value": "First"
  },
  {
   "SchemaName": "mx_Custom_2",
   "Value": "2016"
  },
  {
   "SchemaName": "mx_Custom_3",
   "Value": "Activity Test"
  },
  {
   "SchemaName": "mx_Custom_4",
   "Value": "2016-09-18 12:12:12"
  },
  {
   "SchemaName": "mx_Custom_5",
   "Value": "qwerty"
  }
 ]
}]

Request Parameters

Parameter Description
ProspectActivityId

The unique Id of the activity you wish to update. You can find it using the Get Activites of Lead API.

You can pass multiple Prospect Activity Ids.

ActivityNote

Lets you pass notes related to the activity you’re updating (non-mandatory).

Fields

Update multiple activity fields by passing their schema names and values as shown here –

“SchemaName”: “mx_Custom_1”,
“Value”: “First”

If you’re having trouble finding the schema name of an activity field, navigate to My Account>Settings>Customization>Custom Activities & Scores, then update the activity (you’ll see the schema names in step 2 of 3 of activity update).

Response

200 OK
Content-Type: application/json
{
    "Response": [
        {
            "RowNumber": 1,
            "ActivityUpdated": true
        }
    ]
}

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.