LeadSquared Developer Centre

ON THIS PAGE

Update an Activity


Let’s you update the activity note and the associated custom fields of a custom activity you’ve posted on a lead.

Note:

  • 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.
  • You can get the details of the associated custom activity fields by using the Get Custom Field data of Activities API.

 

API URL

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

Request

Content-Type: application/json
JSON Body/Payload Icon
{
	"ProspectActivityId": "093d5c54-6009-48d4-840e-84fd12e8d63a",
	"ActivityEvent": 313,
	"ActivityNote": "Sample Note",
        "ProcessFilesAsync": true,
	"Fields": [{
		"SchemaName": "mx_Custom_1",
		"Value": "abcd"
	}, {
		"SchemaName": "mx_Custom_2",
		"Value": ""
	}, {
		"SchemaName": "mx_Custom_3",
		"Value": ""
	}, {
		"SchemaName": "mx_Custom_4",
		"Value": "1"
	}, {
		"SchemaName": "mx_Custom_5",
		"Value": ""
	}, {
		"SchemaName": "mx_Custom_6",
		"Value": ""
	}, {
		"SchemaName": "mx_Custom_7",
		"Value": ""
	}, {
		"SchemaName": "mx_Custom_8",
		"Value": ""
	}, {
		"SchemaName": "mx_Custom_9",
		"Value": "1"
	}, {
		"SchemaName": "mx_Custom_10",
		"Value": ""
	}, {
		"SchemaName": "mx_Custom_11",
		"Value": ""
	}, {
		"SchemaName": "mx_Custom_12",
		"Value": ""
	}, {
		"SchemaName": "mx_Custom_13",
		"Value": ""
	}, {
		"SchemaName": "mx_Custom_14",
		"Value": ""
	}, {
		"SchemaName": "mx_Custom_15",
		"Value": ""
	}, {
		"SchemaName": "Status",
		"Value": ""
	}, {
		"SchemaName": "Owner",
		"Value": "c7b539c1-3f7f-11e6-bec9-22000aa5088d"
	}]
}

Request Parameters

Parameter Description
ProspectActivityId 

Unique Id of the activity that you want to update. You can get details of all the activities including the ProsepectActivityId associated with a lead by using the Get Activities of Lead API.

ActivityEvent

The unique code of the activity type.

 

ActivityNote

Activity note.

Response

200 OK
Content-Type: application/json
{
    "Status": "Success",
    "Message": {
        "Id": "8c76a99b-142f-46c3-965c-70a3fcf424f9"
    }
}

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.