POST /api/v202304/commodity Deprecated

Creates a commodity

CreateCommodityV202304 Permissions: UnitSystemSettings (Manage)

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.

Request Body

CommodityRequest
Property Description Type
abbreviation Three letter abbreviation code to represent the commodity Required Must be between 1 and 3 characters string
commodityCategoryId

The commodity category identifier

If the category is provided, the default rollup unit for that category will be used Only one of CommodityCategoryId, CommodityRollupUnitId can be set

integer (int32)
commodityInfo The commodity info Required Must be between 0 and 32 characters string
commodityRollupUnitId

The common use unit identifier for reporting purposes

Ignored if a commodity category is provided and it has a rollup unit specified Only one of CommodityCategoryId, CommodityRollupUnitId can be set

integer (int32)
description The commodity description Must be between 0 and 255 characters string
energyReportingUnitConversionMultiplier

The multiplier to convert from the commodity rollup unit to the energy use reporting unit

Not required if commodity rollup unit is in the energy unit category Must be null when IncludeInEnergyReporting is set to False, case sensitive

number (double)
icon Icon
Icon properties
Property Description Type
code The icon code Must be between 0 and 64 characters Required when Color is set string
color The icon color Must be between 0 and 32 characters Required when Code is set string
includeInEnergyReporting Indicates if the commodity should be included in Energy reporting boolean
Example Request Body application/json
{  "abbreviation": "string",  "commodityCategoryId": 1,  "commodityInfo": "string",  "commodityRollupUnitId": 1,  "description": "string",  "energyReportingUnitConversionMultiplier": 1.0,  "icon": {    "code": "string",    "color": "string"
  },  "includeInEnergyReporting": false
}

Responses

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

Response Body Parameters

CommodityResponse
Property Description Type
abbreviation Three letter abbreviation code to represent the commodity string
commodityCategory CommodityCategory
CommodityCategory properties
Property Description Type
commodityCategoryId The commodity category id integer (int32)
commodityCategoryInfo The commodity category info string
commonDemandUnit UnitChild
UnitChild properties
Property Description Type
unitCode The unit code string
unitId The unit identifier integer (int32)
unitInfo The unit info string
commonUseUnit UnitChild
UnitChild properties
Property Description Type
unitCode The unit code string
unitId The unit identifier integer (int32)
unitInfo The unit info string
commodityCode The commodity code string
commodityId The commodity identifier integer (int32)
commodityInfo The commodity info string
demandRollupUnit UnitChild
UnitChild properties
Property Description Type
unitCode The unit code string
unitId The unit identifier integer (int32)
unitInfo The unit info string
description The commodity description string
energyReportingUnitConversionMultiplier The multiplier to convert from the commodity rollup unit to the energy use reporting unit number (double)
icon Icon
Icon properties
Property Description Type
code The icon code Must be between 0 and 64 characters Required when Color is set string
color The icon color Must be between 0 and 32 characters Required when Code is set string
inUse Indicates if the commodity is in use on a meter/emissions source boolean
includeInEnergyReporting Indicates if the commodity should be included in Energy reporting boolean
isSystemCommodity Indicates if the commodity is a system-level commodity boolean
useRollupUnit UnitChild
UnitChild properties
Property Description Type
unitCode The unit code string
unitId The unit identifier integer (int32)
unitInfo The unit info string
Example Response application/json
{  "abbreviation": "string",  "commodityCategory": {    "commodityCategoryId": 1,    "commodityCategoryInfo": "string",    "commonDemandUnit": {      "unitCode": "string",      "unitId": 1,      "unitInfo": "string"
    },    "commonUseUnit": {      "unitCode": "string",      "unitId": 1,      "unitInfo": "string"
    }
  },  "commodityCode": "string",  "commodityId": 1,  "commodityInfo": "string",  "demandRollupUnit": {    "unitCode": "string",    "unitId": 1,    "unitInfo": "string"
  },  "description": "string",  "energyReportingUnitConversionMultiplier": 1.0,  "icon": {    "code": "string",    "color": "string"
  },  "inUse": false,  "includeInEnergyReporting": false,  "isSystemCommodity": false,  "useRollupUnit": {    "unitCode": "string",    "unitId": 1,    "unitInfo": "string"
  }
}