PUT /api/v3/udf/list/{udfType}

Replaces all UDF definitions for a given entity type with the provided list

EditCustomFieldsV3 Permissions: ApplicationSettings (Manage)
Use this endpoint to bulk-manage all custom fields for an entity type in a single operation. This replaces the entire set of UDF definitions for the specified type. Valid udfTypes: “Account”, “Vendor”, “Place”, “Meter”, “ChannelVersion”, “Rate”, “Bill”, “EnergyProject”, “Collection”, “EmissionSource”. Requires ApplicationSettings Manage permission.

Request Headers

Header Value Required Description
ECI-ApiKey string Yes Your API key. See Authentication.
Content-Type application/json Yes All requests must specify JSON content type, including the request body.

Path Parameters

Name Description Type Required
udfType Entity type whose UDFs are being edited (e.g., “Account”, “Meter”, “Place”) string Required

Request Body

Array of:

UDFUpdate
Property Description Type
dataTypeId The UDF’s data type identifier. Possible value include 1 (boolean), 2 (integer), 3 (string), 4 (double), 6 (date), 12 (select list) and 13 (url) Required integer (int32)
description The UDF’s description Must be between 0 and 128 characters Required (defined) string
important Used to mark a UDF as important. Important UDFs are highlighted during data entry. Required (defined) boolean
name The UDF’s name Required Must be between 0 and 32 characters string
udfId The Udf’s ID. When creating a new UDF, assign null to this property. Required (defined) integer (int32)
udfSelectValues

An array of options to populate a UDF select list.

Required when the UDF being edited has a dataTypeId of 12 otherwise this will be ignored.

To remove an option from the select list, omit it from this array. Options that are in use may not be deleted. To add a new option, pass in null as the udfSelectValueId

Required when dataTypeId is set to 12, case sensitive.
UDFSelectValueUpdate[]
UDFSelectValueUpdate properties
Property Description Type
udfSelectValueId The UDF select value identifier. When creating a new option, assign null to this property. Required (defined) integer (int32)
value The UDF select option’s value Required Must be between 0 and 255 characters string
Example Request Body application/json
[
  {    "dataTypeId": 1,    "description": "string",    "important": false,    "name": "string",    "udfId": 1,    "udfSelectValues": [
      {      "udfSelectValueId": 1,      "value": "string"
    }
    ]
  }
]

Responses

200 OK The request succeeded and the response body contains the requested data.

Response Body Parameters

Array of:

UDFResponse
Property Description Type
count The number of times this custom field has been used. Required (defined) integer (int32)
dataType DataTypeResponse
DataTypeResponse properties
Property Description Type
dataTypeCode The data type code/short name Required (defined) string
dataTypeId The unique identifier for the data type (e.g., 1=boolean, 2=integer, 3=string, 4=double, 6=date, 12=select list, 13=URL) Required (defined) integer (int32)
dataTypeInfo The data type display name/description Required (defined) string
description The description for the custom field. Required (defined) string
displayOrder The display order of the custom field. Required (defined) integer (int32)
important If true, this custom field is important. Required (defined) boolean
locked If true, then this udf is a system custom field Required (defined) boolean
name The name of the custom field. Required (defined) string
udfId The identifier of the custom field. Required (defined) integer (int32)
udfSelectValues Select values of the custom field, if it is a select list (DataType = 12). Required (defined) UDFSelectValueResponse[]
UDFSelectValueResponse properties
Property Description Type
count integer (int32)
displayOrder integer (int32)
udfSelectValueId integer (int32)
value string
udfType The type of the udf. Values include: Account, Meter, Vendor, Place, ChannelVersion, Rate, Bill, “EnergyProject”, “Collection”, and “EmissionSource”. Required (defined) string
Example Response application/json
[
  {    "count": 1,    "dataType": {      "dataTypeCode": "string",      "dataTypeId": 1,      "dataTypeInfo": "string"
    },    "description": "string",    "displayOrder": 1,    "important": false,    "locked": false,    "name": "string",    "udfId": 1,    "udfSelectValues": [
      {      "count": 1,      "displayOrder": 1,      "udfSelectValueId": 1,      "value": "string"
    }
    ],    "udfType": "string"
  }
]
400 Bad Request The request was malformed or contains invalid parameters. Check the request body and query parameters.
404 Not Found The requested resource was not found. Verify the ID or path is correct.