LeadSquared Developer Centre

ON THIS PAGE

Get Values of a Custom Activity Drop-down Field


Lets you retrieve the values of a custom activity field of drop-down type. In the JSON body, pass –

  • The “SchemaName” of the drop-down field
  • The “ActivityEventCode” of the activity you want to retrieve the values of.

“Paging” is an optional parameter.

Note: You can also retrieve the values of drop-down fields within a custom field set.

  • You must pass the “SchemaName” of the activity field where the custom field set is associated.
  • You must pass an additional “CustomObjectSchemaName” parameter where you specify the schema name of the drop-down field.

For example,

{
“Parameter”: {
“SchemaName”: “mx_Custom_2” ,
“ActivityEventCode”: 167,
“CustomObjectSchemaName”: “mx_CustomObject_4”
}

In the example above, “mx_Custom_2” is the schema name of the activity field where the custom field set is associated. “mx_CustomObject_4” is the schema name of the drop-down field within that custom field set.

 

API URL

URL
Icon
POST https://{host}/v2/ProspectActivity.svc/ActivityField/Dropdown/Options/Get?accessKey=AccessKey&secretKey=SecretKey

Request

Content-Type: application/json
JSON Body/Payload Icon
{
  "Parameter": {
    "SchemaName": "Status",
    "ActivityEventCode": 2
  },
  "Paging": {
    "PageIndex": 2,
    "PageSize": 1
  }
}

Request Parameters

Parameter Description
SchemaName

“SchemaName” – The schema name of the drop-down field you want to retrieve the values of. You can find the schema name of an activity from the LeadSquared web app by navigating to My Profile>Settings>Customization>Custom Activities & Scores and clicking Edit alongside the activity.

ActivityEventCode

The Activity Event Code specifies the custom/sales activity within which you want to get the drop-down field values. You can find these using the Get Activities of a Lead API.

PageIndex

Specifies the page number.

PageSize

Specifies the number of results per page.

Response

200 OK
Content-Type: application/json
{
  "Options": [
    "Inactive",
    "Active"
  ]
}

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.