Collection.GetFields

Prev Next

Description

Returns a list of fields that are in that collection with their details.

URL parameters

URL parameter ordering

The URL parameters below are listed in the order they should be entered in the API URL.

Name Required Type Description
CollectionID True numeric Unique identifier of the collection.
Include False string Can bet set to All or Unique. It defaults to All.

Responses

Name Type Description
Result string Success if the operation was successful.
Field Field Represents a field of the collection whose CollectionID was passed in.

Sample request

curl -X 'https://api.mozenda.com/rest?WebServiceKey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&Service=Mozenda10&Operation=Collection.GetFields&CollectionID=1001&Include=Unique'

Sample responses

XML

<?xml version="1.0" encoding="utf-8" ?>
<CollectionGetFieldsResponse
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Result>Success</Result>
	<FieldList>
		<Field>
			<FieldID>418</FieldID>
			<CollectionID>1003</CollectionID>
			<Name>ID</Name>
			<Description>Unique number identifying the Default.</Description>
			<IsSystem>True</IsSystem>
			<IsUnique>False</IsUnique>
		</Field>
		<Field>
			<FieldID>430</FieldID>
			<CollectionID>1003</CollectionID>
			<Name>AgentID</Name>
			<Description />
			<IsSystem>True</IsSystem>
			<IsUnique>False</IsUnique>
		</Field>
	</FieldLists>
</CollectionGetFieldsResponse>

JSON (add &ResponseFormat=JSON)

{
  "Field": [
    {
      "FieldID": 89354,
      "CollectionID": 5258,
      "Name": "Lead ID",
      "Description": "",
      "Format": "Text",
      "IsSystem": false,
      "IsUnique": true
    },
    {
      "FieldID": 89356,
      "CollectionID": 5258,
      "Name": "Account Time Zone",
      "Description": "",
      "Format": "Text",
      "IsSystem": false,
      "IsUnique": false
    },
    {
      "FieldID": 89359,
      "CollectionID": 5258,
      "Name": "Company",
      "Description": "",
      "Format": "Text",
      "IsSystem": false,
      "IsUnique": false
    },
    {
      "FieldID": 89360,
      "CollectionID": 5258,
      "Name": "Converted",
      "Description": "",
      "Format": "Text",
      "IsSystem": false,
      "IsUnique": false
    },
    {
      "FieldID": 89365,
      "CollectionID": 5258,
      "Name": "Country",
      "Description": "",
      "Format": "Text",
      "IsSystem": false,
      "IsUnique": false
    },
    {
      "FieldID": 89369,
      "CollectionID": 5258,
      "Name": "Email",
      "Description": "",
      "Format": "Text",
      "IsSystem": false,
      "IsUnique": false
    },
    {
      "FieldID": 89371,
      "CollectionID": 5258,
      "Name": "Full Name",
      "Description": "",
      "Format": "Text",
      "IsSystem": false,
      "IsUnique": false
    }
  ],
  "JsonResult": {
    "Command": "Collection.GetFields",
    "AutoLoggedIn": false,
    "WebConsoleKey": "",
    "Result": "Success",
    "ErrorCode": "",
    "ErrorDescription": "",
    "ErrorList": [],
    "ExecutionTime": {
      "Ticks": 0,
      "Days": 0,
      "Hours": 0,
      "Milliseconds": 0,
      "Minutes": 0,
      "Seconds": 0,
      "TotalDays": 0,
      "TotalHours": 0,
      "TotalMilliseconds": 0,
      "TotalMinutes": 0,
      "TotalSeconds": 0
    }
  }
}