LeadSquared Developer Centre

ON THIS PAGE

Get Custom Fields of an Activity

This downloads our complete API collection, including all endpoints—not just this specific endpoint.
Run in Postman

Retrieves the details of the Custom Activity Fields in your account.

  1. Get the activity Id of the custom activity using the Get Activities of Lead API.
  2. Pass the activity Id in the URL of this API.

The response will contain the names and values of all custom fields under the activity type.

Note: You can retrieve files uploaded to a custom object in the activity by passing the additional parameter getFileURL=true in the API URL.

API URL

URL
Icon
GET https://{host}/v2/ProspectActivity.svc/GetActivityDetails?accessKey=AccessKey&secretKey=SecretKey&activityId=prospectActivityId

URL Parameters

Parameter Description
prospectActivityId Id of the activity you want to retrieve the custom fields of.

Response

200 OK
Content-Type: application/json
{
  "ID": "f5c3c0cb-112b-4372-9732-c7185c3af6c9",
  "Name": "Product is Delivered",
  "DisplayName": "Product is Delivered",
  "Fields": [
    {
      "SchemaName": "mx_Custom_1",
      "DisplayName": "Custom 1",
      "Value": "Value1",
      "DataType": "String",
      "IsMandatory": false,
      "ShowInForm": true,
      "Sequence": 1,
      "OptionSet": ""
    },
    {
      "SchemaName": "mx_Custom_2",
      "DisplayName": "Custom 2",
      "Value": "Value2",
      "DataType": "String",
      "IsMandatory": false,
      "ShowInForm": true,
      "Sequence": 2,
      "OptionSet": ""
    },
    {
      "SchemaName": "mx_Custom_3",
      "DisplayName": "Custom 3",
      "Value": "Value3",
      "DataType": "String",
      "IsMandatory": false,
      "ShowInForm": true,
      "Sequence": 3,
      "OptionSet": ""
    },
    {
      "SchemaName": "mx_Custom_4",
      "DisplayName": "Custom 4",
      "Value": "Value4",
      "DataType": "String",
      "IsMandatory": false,
      "ShowInForm": true,
      "Sequence": 4,
      "OptionSet": ""
    },
    {
      "SchemaName": "mx_Custom_5",
      "DisplayName": "Custom 5",
      "Value": "Value5",
      "DataType": "String",
      "IsMandatory": false,
      "ShowInForm": true,
      "Sequence": 5,
      "OptionSet": ""
    },
    {
      "SchemaName": "mx_Custom_6",
      "DisplayName": "Custom 6",
      "Value": "Value6",
      "DataType": "String",
      "IsMandatory": false,
      "ShowInForm": true,
      "Sequence": 6,
      "OptionSet": ""
    },
    {
      "SchemaName": "mx_Custom_7",
      "DisplayName": "Custom 7",
      "Value": "Value7",
      "DataType": "String",
      "IsMandatory": false,
      "ShowInForm": true,
      "Sequence": 7,
      "OptionSet": ""
    },
    {
      "SchemaName": "mx_Custom_8",
      "DisplayName": "Custom 8",
      "Value": "Value8",
      "DataType": "String",
      "IsMandatory": false,
      "ShowInForm": true,
      "Sequence": 8,
      "OptionSet": ""
    },
    {
      "SchemaName": "mx_Custom_9",
      "DisplayName": "Custom 9",
      "Value": "Value9",
      "DataType": "String",
      "IsMandatory": false,
      "ShowInForm": true,
      "Sequence": 9,
      "OptionSet": ""
    },
    {
      "SchemaName": "mx_Custom_10",
      "DisplayName": "Custom 10",
      "Value": "Value10",
      "DataType": "String",
      "IsMandatory": false,
      "ShowInForm": true,
      "Sequence": 10,
      "OptionSet": ""
    },
    {
      "SchemaName": "mx_Custom_11",
      "DisplayName": "Custom 11",
      "Value": "Value11",
      "DataType": "String",
      "IsMandatory": false,
      "ShowInForm": true,
      "Sequence": 11,
      "OptionSet": ""
    },
    {
      "SchemaName": "mx_Custom_12",
      "DisplayName": "Custom 12",
      "Value": "Value12",
      "DataType": "DateTime",
      "IsMandatory": false,
      "ShowInForm": true,
      "Sequence": 12,
      "OptionSet": ""
    },
    {
      "SchemaName": "mx_Custom_13",
      "DisplayName": "Custom 13",
      "Value": "Value13",
      "DataType": "String",
      "IsMandatory": false,
      "ShowInForm": true,
      "Sequence": 13,
      "OptionSet": ""
    },
    {
      "SchemaName": "mx_Custom_14",
      "DisplayName": "Custom 14",
      "Value": "Value14",
      "DataType": "String",
      "IsMandatory": false,
      "ShowInForm": true,
      "Sequence": 14,
      "OptionSet": ""
    },
    {
      "SchemaName": "mx_Custom_15",
      "DisplayName": " Custom 15",
      "Value": "Value15",
      "DataType": "Number",
      "IsMandatory": false,
      "ShowInForm": true,
      "Sequence": 15,
      "OptionSet": ""
    }
  ],
  "CreatedByName": "swesh kumar",
  "CreatedOn": "/Date(1472546160000+0000)/",
  "Score": 40,
  "RelatedProspectId": "14af01ff-65a9-4072-b794-42a3126a7c30",
  "EventDirection": 1,
  "ActivityEvent": 207
}

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

© 2024 by MarketXpander Services Pvt Ltd. All Rights Reserved.