PUT /api/v3/account/{accountId}/meter/{meterId}/calculatedBill/{versionId}/use

Manage calculated bill's use * If use does not exist on the distribution it will be added * If use already exists it will be saved as the option sent in and any existing inputs will be deleted * Since use is required for the calculated bill distribution to work, one option is always required and cannot be deleted

ManageCalculateBillUseV3 Permissions: Chargebacks (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.

Path Parameters

Name Description Type Required
accountId ID of the account to receive calculated bill details integer (int32) Required
meterId ID of the meter to receive calculated bill details integer (int32) Required
versionId ID of the calculated bill distribution version integer (int32) Required

Request Body

CalculatedBillUseRequest
Property Description Type
calendarizedUseCalculation CalendarizedCalculationRequest
CalendarizedCalculationRequest properties
Property Description Type
sum CalendarizedSumRequest
CalendarizedSumRequest properties
Property Description Type
sumMeterIds Meters in this list will have their use or cost added together during the bill calculation Cannot be Empty Required integer[]
copyUseFromMeter CopyMeterRequest
CopyMeterRequest properties
Property Description Type
meterId Meter from which use or cost will be copied Required Topmost (LogicalDevice) integer (int32)
percentage Percentage of use or cost to copy Pass the percentage value For example 50.5% should be 50.5 Required Max scale of 8 number (double)
fixedAmount FixedUseRequest
FixedUseRequest properties
Property Description Type
fixedUseAmount Fixed use amount Required Max scale of 6 number (double)
unitId Unit to which use is applied Required integer (int32)
readingsChannelId Use monthly channel data readings to calculate bill use Required (defined) Only one of ReadingsChannelId, ReadingsEsaChannelId, FixedAmount, CopyUseFromMeter, UseCalculation, CalendarizedUseCalculation, UseWatticsDataPoint can be set integer (int32)
readingsEsaChannelId Use ESA channel data readings to calculate bill use Required (defined) Only one of ReadingsChannelId, ReadingsEsaChannelId, FixedAmount, CopyUseFromMeter, UseCalculation, CalendarizedUseCalculation, UseWatticsDataPoint can be set integer (int32)
useCalculation CalculationRequest
CalculationRequest properties
Property Description Type
subtract SubtractRequest
SubtractRequest properties
Property Description Type
subtractMeterGroupIds Distinct meters from these meter groups will have their use or cost subtracted together during the bill calculation System auto groups cannot be used Required (defined) Only one of SubtractMeterIds, SubtractMeterGroupIds can be set integer[]
subtractMeterIds Meters in this list will have their use or cost subtracted during bill calculation Required (defined) Only one of SubtractMeterIds, SubtractMeterGroupIds can be set integer[]
sum SumRequest
SumRequest properties
Property Description Type
sumMeterGroupIds Distinct meters from these meter groups will have their use or cost added together during the bill calculation System auto groups cannot be used Required (defined) Only one of SumMeterIds, SumMeterGroupIds can be set integer[]
sumMeterIds Meters in this list will have their use or cost added together during the bill calculation Required (defined) Only one of SumMeterIds, SumMeterGroupIds can be set integer[]
useWatticsDataPoint Use SmartAnalytics (Wattics) data readings to calculate bill use One of ‘True’ Case sensitive Required (defined) Only one of ReadingsChannelId, ReadingsEsaChannelId, FixedAmount, CopyUseFromMeter, UseCalculation, CalendarizedUseCalculation, UseWatticsDataPoint can be set boolean
Example Request Body application/json
{  "calendarizedUseCalculation": {    "sum": {      "sumMeterIds": []
    }
  },  "copyUseFromMeter": {    "meterId": 1,    "percentage": 1.0
  },  "fixedAmount": {    "fixedUseAmount": 1.0,    "unitId": 1
  },  "readingsChannelId": 1,  "readingsEsaChannelId": 1,  "useCalculation": {    "subtract": {      "subtractMeterGroupIds": [],      "subtractMeterIds": []
    },    "sum": {      "sumMeterGroupIds": [],      "sumMeterIds": []
    }
  },  "useWatticsDataPoint": false
}

Responses

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

Response Body Parameters

CalculatedBillUseResponse
Property Description Type
calendarizedUseCalculation CalendarizedCalculationResponse
CalendarizedCalculationResponse properties
Property Description Type
calendarizedSum Addition calculation involving meters MeterChild[]
MeterChild properties
Property Description Type
active Indicates whether the Meter is Active boolean
commodity CommodityChild
CommodityChild properties
Property Description Type
commodityCode The commodity code Required (defined) string
commodityIcon 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
commodityId The commodity identifier Required (defined) integer (int32)
commodityInfo The commodity info Required (defined) string
isCalculatedMeter Indicates whether the meter is a calculated meter boolean
isEsaCalculatedMeter Indicates whether the meter is an ESA calculated meter boolean
isSplitChildMeter Indicates whether the meter is a child of a split boolean
isSplitParentMeter Indicates whether the meter is a parent of a split boolean
meterCode The meter code string
meterId The meter identifier integer (int32)
meterInfo The meter info string
meterType MeterTypeChild
MeterTypeChild properties
Property Description Type
meterTypeCode string
meterTypeId integer (int32)
meterTypeInfo string
serialNumber The meter’s current serial number string
copyUseFromMeter CopyFromMeterResponse
CopyFromMeterResponse properties
Property Description Type
meter MeterChild
MeterChild properties
Property Description Type
active Indicates whether the Meter is Active boolean
commodity CommodityChild
CommodityChild properties
Property Description Type
commodityCode The commodity code Required (defined) string
commodityIcon 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
commodityId The commodity identifier Required (defined) integer (int32)
commodityInfo The commodity info Required (defined) string
isCalculatedMeter Indicates whether the meter is a calculated meter boolean
isEsaCalculatedMeter Indicates whether the meter is an ESA calculated meter boolean
isSplitChildMeter Indicates whether the meter is a child of a split boolean
isSplitParentMeter Indicates whether the meter is a parent of a split boolean
meterCode The meter code string
meterId The meter identifier integer (int32)
meterInfo The meter info string
meterType MeterTypeChild
MeterTypeChild properties
Property Description Type
meterTypeCode string
meterTypeId integer (int32)
meterTypeInfo string
serialNumber The meter’s current serial number string
percentage Percentage of use or cost to copy number (double)
fixedAmount FixedAmountResponse
FixedAmountResponse properties
Property Description Type
amount Fixed amount number (double)
unit UnitChild
UnitChild properties
Property Description Type
unitCode The unit code string
unitId The unit identifier integer (int32)
unitInfo The unit info string
readingsFromChannel ChannelChildWithObservationType
ChannelChildWithObservationType properties
Property Description Type
channelCode The channel code Combines observationTypeCode:unitCode:observationMethodCode:observationRuleCode:interval in minutes string
channelId The channel identifier integer (int32)
interval The channel interval in seconds. Monthly = 2592000 Weekly = 604800 Daily = 86400 Hourly = 3600 Thirty_Minutes = 1800 Fifteen_Minutes = 900 integer (int32)
rule ObservationRule
ObservationRule properties
Property Description Type
observationRuleCode The observation rule code string
observationRuleId The observation rule identifier integer (int32)
observationRuleInfo The observation rule info string
type ObservationTypeChild
ObservationTypeChild properties
Property Description Type
credit Indicates the type of credit for the observation type. Possible values include: 1 (Credit), 2 (Debit), 3 (Ignore) integer (int32)
nounCode The observation type’s noun code string
nounId The identifier for the observation type’s noun integer (int32)
observationTypeCode The observation type code string
observationTypeId The observation type identifier integer (int32)
observationTypeInfo The observation type info string
readingsFromEsaChannel EsaChannelChildWithObservationType
EsaChannelChildWithObservationType properties
Property Description Type
esaChannelId integer (int32)
esaChannelInfo string
interval integer (int32)
rule ObservationRule
ObservationRule properties
Property Description Type
observationRuleCode The observation rule code string
observationRuleId The observation rule identifier integer (int32)
observationRuleInfo The observation rule info string
type ObservationTypeChild
ObservationTypeChild properties
Property Description Type
credit Indicates the type of credit for the observation type. Possible values include: 1 (Credit), 2 (Debit), 3 (Ignore) integer (int32)
nounCode The observation type’s noun code string
nounId The identifier for the observation type’s noun integer (int32)
observationTypeCode The observation type code string
observationTypeId The observation type identifier integer (int32)
observationTypeInfo The observation type info string
readingsFromWatticsDataPoint WatticsDataPointChild
WatticsDataPointChild properties
Property Description Type
watticsDataPointId The identifier for a SmartAnalytics (Wattics) meter integer (int32)
watticsDataPointInfo The name for a SmartAnalytics (Wattics) meter string
useCalculation CalculationResponse
CalculationResponse properties
Property Description Type
subtract SubtractResponse
SubtractResponse properties
Property Description Type
subtractMeterGroups Distinct meters from these meter groups will have their use or cost subtracted together during the bill calculation MeterGroupChild[]
MeterGroupChild properties
Property Description Type
autoGroup Indicates if this meter group is an autogroup boolean
meterGroupCode The meter group code string
meterGroupId The meter group identifier integer (int32)
meterGroupInfo The meter group info string
userDefinedAutoGroup Indicates if this meter group is an user defined auto group boolean
subtractMeters Meters in this list will have their use or cost subtracted during bill calculation MeterChild[]
MeterChild properties
Property Description Type
active Indicates whether the Meter is Active boolean
commodity CommodityChild
CommodityChild properties
Property Description Type
commodityCode The commodity code Required (defined) string
commodityIcon 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
commodityId The commodity identifier Required (defined) integer (int32)
commodityInfo The commodity info Required (defined) string
isCalculatedMeter Indicates whether the meter is a calculated meter boolean
isEsaCalculatedMeter Indicates whether the meter is an ESA calculated meter boolean
isSplitChildMeter Indicates whether the meter is a child of a split boolean
isSplitParentMeter Indicates whether the meter is a parent of a split boolean
meterCode The meter code string
meterId The meter identifier integer (int32)
meterInfo The meter info string
meterType MeterTypeChild
MeterTypeChild properties
Property Description Type
meterTypeCode string
meterTypeId integer (int32)
meterTypeInfo string
serialNumber The meter’s current serial number string
sum SumResponse
SumResponse properties
Property Description Type
sumMeterGroups Distinct meters from these meter groups will have their use or cost added together during the bill calculation MeterGroupChild[]
MeterGroupChild properties
Property Description Type
autoGroup Indicates if this meter group is an autogroup boolean
meterGroupCode The meter group code string
meterGroupId The meter group identifier integer (int32)
meterGroupInfo The meter group info string
userDefinedAutoGroup Indicates if this meter group is an user defined auto group boolean
sumMeters Meters in this list will have their use or cost added together during the bill calculation MeterChild[]
MeterChild properties
Property Description Type
active Indicates whether the Meter is Active boolean
commodity CommodityChild
CommodityChild properties
Property Description Type
commodityCode The commodity code Required (defined) string
commodityIcon 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
commodityId The commodity identifier Required (defined) integer (int32)
commodityInfo The commodity info Required (defined) string
isCalculatedMeter Indicates whether the meter is a calculated meter boolean
isEsaCalculatedMeter Indicates whether the meter is an ESA calculated meter boolean
isSplitChildMeter Indicates whether the meter is a child of a split boolean
isSplitParentMeter Indicates whether the meter is a parent of a split boolean
meterCode The meter code string
meterId The meter identifier integer (int32)
meterInfo The meter info string
meterType MeterTypeChild
MeterTypeChild properties
Property Description Type
meterTypeCode string
meterTypeId integer (int32)
meterTypeInfo string
serialNumber The meter’s current serial number string
Example Response application/json
{  "calendarizedUseCalculation": {    "calendarizedSum": [
      {      "active": false,      "commodity": {},      "isCalculatedMeter": false,      "isEsaCalculatedMeter": false,      "isSplitChildMeter": false,      "isSplitParentMeter": false,      "meterCode": "string",      "meterId": 1,      "meterInfo": "string",      "meterType": {},      "serialNumber": "string"
    }
    ]
  },  "copyUseFromMeter": {    "meter": {      "active": false,      "commodity": {},      "isCalculatedMeter": false,      "isEsaCalculatedMeter": false,      "isSplitChildMeter": false,      "isSplitParentMeter": false,      "meterCode": "string",      "meterId": 1,      "meterInfo": "string",      "meterType": {},      "serialNumber": "string"
    },    "percentage": 1.0
  },  "fixedAmount": {    "amount": 1.0,    "unit": {      "unitCode": "string",      "unitId": 1,      "unitInfo": "string"
    }
  },  "readingsFromChannel": {    "channelCode": "string",    "channelId": 1,    "interval": 1,    "rule": {      "observationRuleCode": "string",      "observationRuleId": 1,      "observationRuleInfo": "string"
    },    "type": {      "credit": 1,      "nounCode": "string",      "nounId": 1,      "observationTypeCode": "string",      "observationTypeId": 1,      "observationTypeInfo": "string"
    }
  },  "readingsFromEsaChannel": {    "esaChannelId": 1,    "esaChannelInfo": "string",    "interval": 1,    "rule": {      "observationRuleCode": "string",      "observationRuleId": 1,      "observationRuleInfo": "string"
    },    "type": {      "credit": 1,      "nounCode": "string",      "nounId": 1,      "observationTypeCode": "string",      "observationTypeId": 1,      "observationTypeInfo": "string"
    }
  },  "readingsFromWatticsDataPoint": {    "watticsDataPointId": 1,    "watticsDataPointInfo": "string"
  },  "useCalculation": {    "subtract": {      "subtractMeterGroups": [],      "subtractMeters": []
    },    "sum": {      "sumMeterGroups": [],      "sumMeters": []
    }
  }
}