LeadSquared Developer Centre

ON THIS PAGE

Get Sales Activities by Lead Id


Returns sales activities associated with a lead based on the “LeadId” you pass in the API URL.

Set the “IncludeOption” parameter in the URL to “true” to see the possible options/values of the drop-down type sales activity fields. For example, the drop-down sales activity field “City” will show the set options – Banglore, Patna, Chennai, Mumbai, etc.

API URL

URL
Icon
GET https://{host}/v2/SalesActivity.svc/RetrieveByLeadId?accessKey=AccessKey&secretKey=SecretKey&leadId=LeadId&includeOption=IncludeOption

URL Parameters

Parameter Description
LeadId Unique identifier of the lead.
IncludeOption Whether you want to get the options/values for drop-down sales activities fields. Accordingly pass "true or "false".

Response

200 OK
Content-Type: application/json
[
   {
      "ID":"2f6a42c0-ab31-46a3-8469-a3db9e260493",
      "Name":"Sales Activity - New",
      "DisplayName":"Sales Activity",
      "Fields":[
         {
            "SchemaName":"Status",
            "InternalName":"Status",
            "DisplayName":"Status",
            "Value":"Open",
            "DataType":"SearchableDropdown",
            "IsMandatory":true,
            "ShowInForm":true,
            "Sequence":1,
            "ParentField":"",
            "OptionSet":"",
            "DependentOptionSet":"",
            "IsDefault":false,
            "IsReadOnly":false,
            "RenderType":null,
            "ExportAsPlainText":false,
            "IsMultiSelectDropdown":false,
            "IncludeOthersOption":false,
            "BehaviorOnMissingDropdownOption":0,
            "IsOthersValue":false,
            "StringRenderType":null
         },
         {
            "SchemaName":"mx_Custom_1",
            "InternalName":"mx_Custom_1",
            "DisplayName":"Product",
            "Value":"3c8c8d02-8374-11e7-ab78-02de49b06427",
            "DataType":"Product",
            "IsMandatory":true,
            "ShowInForm":true,
            "Sequence":2,
            "ParentField":"",
            "OptionSet":"",
            "DependentOptionSet":"",
            "IsDefault":false,
            "IsReadOnly":false,
            "RenderType":null,
            "ExportAsPlainText":false,
            "IsMultiSelectDropdown":false,
            "IncludeOthersOption":false,
            "BehaviorOnMissingDropdownOption":0,
            "IsOthersValue":false,
            "StringRenderType":null
         },
         {
            "SchemaName":"ProductName",
            "DisplayName":null,
            "Value":"01 - Sample Product",
            "DataType":null,
            "IsMandatory":false,
            "ShowInForm":false,
            "Sequence":0,
            "ParentField":null,
            "OptionSet":null,
            "DependentOptionSet":null,
            "IsDerived":true,
            "IsDefault":false,
            "IsReadOnly":false,
            "RenderType":null,
            "ExportAsPlainText":false,
            "IsMultiSelectDropdown":false,
            "IncludeOthersOption":false,
            "BehaviorOnMissingDropdownOption":0,
            "IsOthersValue":false,
            "StringRenderType":null
         },
         {
            "SchemaName":"mx_Custom_2",
            "InternalName":"mx_Custom_2",
            "DisplayName":"Order Value",
            "Value":"1000.0",
            "DataType":"Number",
            "IsMandatory":true,
            "ShowInForm":true,
            "Sequence":3,
            "ParentField":"",
            "OptionSet":"",
            "DependentOptionSet":"",
            "IsDefault":false,
            "IsReadOnly":false,
            "RenderType":null,
            "ExportAsPlainText":false,
            "IsMultiSelectDropdown":false,
            "IncludeOthersOption":false,
            "BehaviorOnMissingDropdownOption":0,
            "IsOthersValue":false,
            "StringRenderType":null
         },
         {
            "SchemaName":"mx_Custom_3",
            "InternalName":"mx_Custom_3",
            "DisplayName":"Sales Date",
            "Value":"2019-04-12 10:52:04",
            "DataType":"DateTime",
            "IsMandatory":true,
            "ShowInForm":true,
            "Sequence":4,
            "ParentField":"",
            "OptionSet":"",
            "DependentOptionSet":"",
            "IsDefault":false,
            "IsReadOnly":false,
            "RenderType":null,
            "ExportAsPlainText":false,
            "IsMultiSelectDropdown":false,
            "IncludeOthersOption":false,
            "BehaviorOnMissingDropdownOption":0,
            "IsOthersValue":false,
            "StringRenderType":null
         },
         {
            "SchemaName":"mx_Custom_4",
            "InternalName":"mx_Custom_4",
            "DisplayName":"Sales Owner",
            "Value":"3b1041fb-8374-11e7-8758-0a106ee76b21",
            "DataType":"ActiveUsers",
            "IsMandatory":true,
            "ShowInForm":true,
            "Sequence":5,
            "ParentField":"",
            "OptionSet":"",
            "DependentOptionSet":"",
            "IsDefault":false,
            "IsReadOnly":false,
            "RenderType":null,
            "ExportAsPlainText":false,
            "IsMultiSelectDropdown":false,
            "IncludeOthersOption":false,
            "BehaviorOnMissingDropdownOption":0,
            "IsOthersValue":false,
            "StringRenderType":null
         },
         {
            "SchemaName":"SalesOwner",
            "DisplayName":null,
            "Value":"Vir Singh",
            "DataType":null,
            "IsMandatory":false,
            "ShowInForm":false,
            "Sequence":0,
            "ParentField":null,
            "OptionSet":null,
            "DependentOptionSet":null,
            "IsDerived":true,
            "IsDefault":false,
            "IsReadOnly":false,
            "RenderType":null,
            "ExportAsPlainText":false,
            "IsMultiSelectDropdown":false,
            "IncludeOthersOption":false,
            "BehaviorOnMissingDropdownOption":0,
            "IsOthersValue":false,
            "StringRenderType":null
         },
         {
            "SchemaName":"mx_Custom_5",
            "InternalName":"mx_Custom_5",
            "DisplayName":"Custom 5",
            "Value":"",
            "DataType":"String",
            "IsMandatory":false,
            "ShowInForm":false,
            "Sequence":6,
            "ParentField":"",
            "OptionSet":"",
            "DependentOptionSet":"",
            "IsDefault":false,
            "IsReadOnly":false,
            "RenderType":null,
            "ExportAsPlainText":false,
            "IsMultiSelectDropdown":false,
            "IncludeOthersOption":false,
            "BehaviorOnMissingDropdownOption":0,
            "IsOthersValue":false,
            "StringRenderType":null
         },
         {
            "SchemaName":"mx_Custom_6",
            "InternalName":"mx_Custom_6",
            "DisplayName":"Custom 6",
            "Value":"",
            "DataType":"String",
            "IsMandatory":false,
            "ShowInForm":false,
            "Sequence":7,
            "ParentField":"",
            "OptionSet":"",
            "DependentOptionSet":"",
            "IsDefault":false,
            "IsReadOnly":false,
            "RenderType":null,
            "ExportAsPlainText":false,
            "IsMultiSelectDropdown":false,
            "IncludeOthersOption":false,
            "BehaviorOnMissingDropdownOption":0,
            "IsOthersValue":false,
            "StringRenderType":null
         },
         {
            "SchemaName":"mx_Custom_7",
            "InternalName":"mx_Custom_7",
            "DisplayName":"Custom 7",
            "Value":"",
            "DataType":"Number",
            "IsMandatory":false,
            "ShowInForm":false,
            "Sequence":8,
            "ParentField":"",
            "OptionSet":"",
            "DependentOptionSet":"",
            "IsDefault":false,
            "IsReadOnly":false,
            "RenderType":null,
            "ExportAsPlainText":false,
            "IsMultiSelectDropdown":false,
            "IncludeOthersOption":false,
            "BehaviorOnMissingDropdownOption":0,
            "IsOthersValue":false,
            "StringRenderType":null
         },
         {
            "SchemaName":"mx_Custom_8",
            "InternalName":"mx_Custom_8",
            "DisplayName":"Custom 8",
            "Value":"",
            "DataType":"Number",
            "IsMandatory":false,
            "ShowInForm":false,
            "Sequence":9,
            "ParentField":"",
            "OptionSet":"",
            "DependentOptionSet":"",
            "IsDefault":false,
            "IsReadOnly":false,
            "RenderType":null,
            "ExportAsPlainText":false,
            "IsMultiSelectDropdown":false,
            "IncludeOthersOption":false,
            "BehaviorOnMissingDropdownOption":0,
            "IsOthersValue":false,
            "StringRenderType":null
         },
         {
            "SchemaName":"mx_Custom_9",
            "InternalName":"mx_Custom_9",
            "DisplayName":"Custom 9",
            "Value":"",
            "DataType":"String",
            "IsMandatory":false,
            "ShowInForm":false,
            "Sequence":10,
            "ParentField":"",
            "OptionSet":"",
            "DependentOptionSet":"",
            "IsDefault":false,
            "IsReadOnly":false,
            "RenderType":null,
            "ExportAsPlainText":false,
            "IsMultiSelectDropdown":false,
            "IncludeOthersOption":false,
            "BehaviorOnMissingDropdownOption":0,
            "IsOthersValue":false,
            "StringRenderType":null
         },
         {
            "SchemaName":"mx_Custom_10",
            "InternalName":"mx_Custom_10",
            "DisplayName":"Custom 10",
            "Value":"",
            "DataType":"String",
            "IsMandatory":false,
            "ShowInForm":false,
            "Sequence":11,
            "ParentField":"",
            "OptionSet":"",
            "DependentOptionSet":"",
            "IsDefault":false,
            "IsReadOnly":false,
            "RenderType":null,
            "ExportAsPlainText":false,
            "IsMultiSelectDropdown":false,
            "IncludeOthersOption":false,
            "BehaviorOnMissingDropdownOption":0,
            "IsOthersValue":false,
            "StringRenderType":null
         },
         {
            "SchemaName":"mx_Custom_11",
            "InternalName":"mx_Custom_11",
            "DisplayName":"Custom 11",
            "Value":"",
            "DataType":"String",
            "IsMandatory":false,
            "ShowInForm":false,
            "Sequence":12,
            "ParentField":"",
            "OptionSet":"",
            "DependentOptionSet":"",
            "IsDefault":false,
            "IsReadOnly":false,
            "RenderType":null,
            "ExportAsPlainText":false,
            "IsMultiSelectDropdown":false,
            "IncludeOthersOption":false,
            "BehaviorOnMissingDropdownOption":0,
            "IsOthersValue":false,
            "StringRenderType":null
         },
         {
            "SchemaName":"mx_Custom_12",
            "InternalName":"mx_Custom_12",
            "DisplayName":"Custom 12",
            "Value":"",
            "DataType":"String",
            "IsMandatory":false,
            "ShowInForm":false,
            "Sequence":13,
            "ParentField":"",
            "OptionSet":"",
            "DependentOptionSet":"",
            "IsDefault":false,
            "IsReadOnly":false,
            "RenderType":null,
            "ExportAsPlainText":false,
            "IsMultiSelectDropdown":false,
            "IncludeOthersOption":false,
            "BehaviorOnMissingDropdownOption":0,
            "IsOthersValue":false,
            "StringRenderType":null
         },
         {
            "SchemaName":"mx_Custom_14",
            "InternalName":"mx_Custom_14",
            "DisplayName":"Custom 14",
            "Value":"",
            "DataType":"String",
            "IsMandatory":false,
            "ShowInForm":false,
            "Sequence":14,
            "ParentField":"",
            "OptionSet":"",
            "DependentOptionSet":"",
            "IsDefault":false,
            "IsReadOnly":false,
            "RenderType":null,
            "ExportAsPlainText":false,
            "IsMultiSelectDropdown":false,
            "IncludeOthersOption":false,
            "BehaviorOnMissingDropdownOption":0,
            "IsOthersValue":false,
            "StringRenderType":null
         },
         {
            "SchemaName":"mx_Custom_13",
            "InternalName":"mx_Custom_13",
            "DisplayName":"Custom 13",
            "Value":"",
            "DataType":"String",
            "IsMandatory":false,
            "ShowInForm":false,
            "Sequence":15,
            "ParentField":"",
            "OptionSet":"",
            "DependentOptionSet":"",
            "IsDefault":false,
            "IsReadOnly":false,
            "RenderType":null,
            "ExportAsPlainText":false,
            "IsMultiSelectDropdown":false,
            "IncludeOthersOption":false,
            "BehaviorOnMissingDropdownOption":0,
            "IsOthersValue":false,
            "StringRenderType":null
         },
         {
            "SchemaName":"mx_Custom_15",
            "InternalName":"mx_Custom_15",
            "DisplayName":"Custom 15",
            "Value":"",
            "DataType":"String",
            "IsMandatory":false,
            "ShowInForm":false,
            "Sequence":16,
            "ParentField":"",
            "OptionSet":"",
            "DependentOptionSet":"",
            "IsDefault":false,
            "IsReadOnly":false,
            "RenderType":null,
            "ExportAsPlainText":false,
            "IsMultiSelectDropdown":false,
            "IncludeOthersOption":false,
            "BehaviorOnMissingDropdownOption":0,
            "IsOthersValue":false,
            "StringRenderType":null
         }
      ],
      "CreatedBy":"3b1041fb-8374-11e7-8758-0a106ee76b21",
      "CreatedByName":"Vir Singh",
      "CreatedOn":"\/Date(1555066376000+0000)\/",
      "CancelledBy":"",
      "CancelledByName":"",
      "CancellationNotes":"",
      "IsEditable":1,
      "AllowPreDatedActivity":true,
      "EntityType":0,
      "ActivityEventPluralName":null,
      "RelatedEntityType":0,
      "RestrictOperationsOnOpportunity":false,
      "DefaultCurrencySymbol":"$",
      "DefaultCurrencyAbbreviation":"USD",
      "DefaultCurrencyName":"US Dollars",
      "CustomerStageName":"Customer",
      "ConvertToCustomer":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

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