POST /api/v202609/workbench/script/bill/{billId}

Dry-runs a JavaScript bill processing rule script against an existing bill without saving any changes

PreviewWorkbenchScriptAgainstBillV202609 Permissions: BillProcessingRules (Manage)BillsAndBatches (View)
Use this endpoint to try out rule logic from the Workbench Bill Processing Rules Builder before creating a bill processing rule. The bill is rebuilt in the bill descriptor format rules operate on and exposed to the script as bill, with the rule helper functions available as ruleOperations; console.log output is captured. The script runs with the same engine and limits as a saved rule. Nothing is persisted: no bill changes, rule execution logs, or tasks are written. A script error is reported in the response body (success false) rather than as an HTTP error. To try a case no real bill has, send an edited copy of the bill in bill; the script runs against it instead of the saved bill. To test a saved rule instead, use POST billImportRule/{billImportRuleId}/test/bill/{billId}; to run one script against many bills, use POST workbench/script/bills. Restricted to ENC staff.

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
billId Unique numeric identifier of the existing bill to run the script against integer (int32) Required

Request Body

WorkbenchScriptRequestV202609
Property Description Type
bill BillDescriptorJson
BillDescriptorJson properties
Property Description Type
confidence BillDescriptorJson+BillDescriptorConfidence
BillDescriptorJson+BillDescriptorConfidence properties
Property Description Type
confidenceScore A number between 0 and 1 representing percentage confident in extraction results. 100% is “totally confident”. number (double)
lowConfidenceReason A plain text explanation of why confidence is low if available. Can be blank if no confidence impacting issues detected. string
controlCode The name of the input file, without file extension, for linking results to document source for extraction string
header BillDescriptorJson+BillDescriptorHeaderJson
BillDescriptorJson+BillDescriptorHeaderJson properties
Property Description Type
accountIdentifiers A list of label-value pairs that may be used to identify the account. For example Customer ID, Supplier Agreement ID, Site ID, Metering Location ID, Service Point ID, Agreement ID, etc. Labels and values should appear as they do on the bill. BillDescriptorJson+BillDescriptorIdentifier[]
BillDescriptorJson+BillDescriptorIdentifier properties
Property Description Type
label The label of the identifier string
value The value of the identifier string
accountLevelCharges A list of charge line items that are not related to any meter on the bill. Any charges that are derived from the amount of metered usage should be attached to the relevant meter instead. This is often empty BillDescriptorJson+BillDescriptorChargeLineItem[]
BillDescriptorJson+BillDescriptorChargeLineItem properties
Property Description Type
caption Caption / Description of the line item string
cost Cost of the line item. Unlike meter line items, may not be NULL as a charge line has no other countable value. number (double)
observationType The observation type code classifying this line item (e.g., CHARGE, TAX, CUSTOMERCHARGE, LATEFEE). Must be a valid EnergyCap.DTO.Base.BillDescriptor.BillDescriptorJson.BillDescriptorChargeLineItem.ObservationType value. string
accountNumber Primary account number on the bill. Other items that may identify the account can be added to EnergyCap.DTO.Base.BillDescriptor.BillDescriptorJson.BillDescriptorHeaderJson.AccountIdentifiers. This will generally appear there as well and may be the only entry. string
billEnd The end date of the bill, if available. Must be in ISO-8601 format. string (date-time)
billStart The start date of the bill, if available. Must be in ISO-8601 format. string (date-time)
currencyCode The currency of all cost line items on the bill. Use the ISO-4217 3-character list () string
currentCharges The total amount of charges incurred only by this bill. Does not include late fees, balance carried forward from prior bills, etc. number (double)
customerAddress The customer address. Entire address - not broken into segments. string
daysOfService The number of days in the service period, if available. Also known as “Billing Days”, “Days in Period”, etc integer (int32)
deliveryDate For bills that have only a single date like fuel oil or propane deliveries, use this rather than EnergyCap.DTO.Base.BillDescriptor.BillDescriptorJson.BillDescriptorHeaderJson.BillStart and EnergyCap.DTO.Base.BillDescriptor.BillDescriptorJson.BillDescriptorHeaderJson.BillEnd. Must be in ISO-8601 format. string (date-time)
deposit REMOVED in BD v1.4 - retained in EUM for backwards compatibility. Any deposit amount held by the vendor that is applied to this bill. number (double)
dueDate When the bill payment is due. Also called Remit Date, Pay By, Expiration Date, Penalty if not paid before, etc. Must be in ISO-8601 format. string (date-time)
estimated true if any meter readings used to calculate the bill were estimated or the bill indicates that it was estimated boolean
invoiceDate Also called statement date, issue date. The effective date on which the bill amounts were calculated. Must be in ISO-8601 format. string (date-time)
invoiceNumber Also known as “bill number”, “Bill ID”, “Document Number” string
lateFee REMOVED in BD v1.4 - retained in EUM for backwards compatibility. Any late fees applied to this bill. number (double)
mailingDate When the bill was sent by the utility provider. Must be in ISO-8601 format. string (date-time)
paymentReceived REMOVED in BD v1.4 - retained in EUM for backwards compatibility. Amount of any payment received against the prior bill, typically the same as the amount of the prior bill. number (double)
priorBalance REMOVED in BD v1.4 - retained in EUM for backwards compatibility. The UNPAID amount owed prior to this bill. Also known as “Past Due Balance”, “Outstanding Balance”, “Past Due Amount”. number (double)
rateSchedule Label-value pairs representing information about the rate defining the bill. Often only one present. BillDescriptorJson+BillDescriptorIdentifier[]
BillDescriptorJson+BillDescriptorIdentifier properties
Property Description Type
label The label of the identifier string
value The value of the identifier string
refund REMOVED in BD v1.4 - retained in EUM for backwards compatibility. Any refund amount applied to this bill. number (double)
remitAddress Address where payments should be sent. Does not include vendor name. Entire address - not broken into segments. string
servicePeriodMonth Abbreviated US English month name, e.g. “Jan”, “Feb”, “Mar”, etc string
sourceLanguage The source language of the bill, in ISO-639 Set 2 () string
totalCost The total amount due on the bill, also known as “Total Amount Due”, “Total Due”, “Amount Due”, “Net Amount”. Includes prior balance and late fee. number (double)
vendorAddress The vendor’s address. Does not include vendor name. Entire address - not broken into segments. string
vendorEmail The website of the vendor, if available string
vendorName The name of the Utility Vendor issuing the bill string
vendorPhoneNumber The main phone number of the vendor, if available string
vendorRole If available, one of ‘Supply’, ‘Distribution’ string
vendorWebsite The website of the vendor, if available string
meters Meters represented on the bill, including line items associated with each meter BillDescriptorJson+BillDescriptorMeterJson[]
BillDescriptorJson+BillDescriptorMeterJson properties
Property Description Type
commodity See commodity list provided separately. string
identifiers A list of label-value pairs that may be used to identify the meter. For example Meter Number, Serial Number, Tank Number, Site Name, Point of Delivery, Service Point, EZID, etc. Labels and values should appear as they do on the bill. BillDescriptorJson+BillDescriptorIdentifier[]
BillDescriptorJson+BillDescriptorIdentifier properties
Property Description Type
label The label of the identifier string
value The value of the identifier string
lines A list of charges and usage values associated with this meter. Each line may have a caption, a cost, a unit rate, a value and a unit. Value and Unit may indicate consumption, demand, etc. Not all fields will be present on every line. For example a fixed monthly charge will not have a usage value or unit. A value may be present without a cost if the bill shows the usage but does not charge for it. Lines should appear in the order they appear on the bill whenever possible. BillDescriptorJson+BillDescriptorMeterLineItem[]
BillDescriptorJson+BillDescriptorMeterLineItem properties
Property Description Type
caption Caption / Description of the line item string
cost Cost of the line item. Should be NULL if the line does not have a cost associated with it. Should be zero if the line has a cost, but it is 0. number (double)
lineGroupHeader string
observationType The observation type code classifying this line item (e.g., USE, DEMAND, CHARGE, TAX). Must be a valid EnergyCap.DTO.Base.BillDescriptor.BillDescriptorJson.BillDescriptorMeterLineItem.ObservationType value. string
summaryLine string
unit Value unit (e.g. kWh, Therms, Gallons, CCF, etc). Units should be the unit code from the list of standard units provided separately (see unit-list.csv) string
unitRate Unit Rate should represent what is printed on the bill if present (it may differ based on rounding from a computed value). number (double)
value Value of the line item (e.g. quantity of energy, demand, or volume). Should be NULL if the line does not have a value associated with it. Should be zero if the line has a value, but it is 0. number (double)
meterAddress Entire address - not broken into segments string
rateSchedule label-value pairs representing information about the rate defining the bill. Often only one present. BillDescriptorJson+BillDescriptorIdentifier[]
BillDescriptorJson+BillDescriptorIdentifier properties
Property Description Type
label The label of the identifier string
value The value of the identifier string
serialNumber The serial number of the meter, if available string
processingErrors List of any problems that prevented extraction of bill data BillDescriptorJson+BillDescriptorProcessingError[]
BillDescriptorJson+BillDescriptorProcessingError properties
Property Description Type
errorMessage Whatever context will help to understand the problem. Free form text. string
errorReason A category for the error. “Invalid Scan”, “Encrypted File”, “Corrupt File”, “Unknown”, others as appropriate. string
script The JavaScript to run, written exactly as the body of a bill processing rule: the bill is available as the bill global, the rule helper functions as ruleOperations, and console.log output is captured. Maximum length: 100,000 characters. Max length of 100000 string
Example Request Body application/json
{  "bill": {    "confidence": {      "confidenceScore": 1.0,      "lowConfidenceReason": "string"
    },    "controlCode": "string",    "header": {      "accountIdentifiers": [],      "accountLevelCharges": [],      "accountNumber": "string",      "billEnd": "2026-10-07",      "billStart": "2026-10-07",      "currencyCode": "string",      "currentCharges": 1.0,      "customerAddress": "string",      "daysOfService": 1,      "deliveryDate": "2026-10-07",      "deposit": 1.0,      "dueDate": "2026-10-07",      "estimated": false,      "invoiceDate": "2026-10-07",      "invoiceNumber": "string",      "lateFee": 1.0,      "mailingDate": "2026-10-07",      "paymentReceived": 1.0,      "priorBalance": 1.0,      "rateSchedule": [],      "refund": 1.0,      "remitAddress": "string",      "servicePeriodMonth": "string",      "sourceLanguage": "string",      "totalCost": 1.0,      "vendorAddress": "string",      "vendorEmail": "string",      "vendorName": "string",      "vendorPhoneNumber": "string",      "vendorRole": "string",      "vendorWebsite": "string"
    },    "meters": [
      {      "commodity": "string",      "identifiers": [],      "lines": [],      "meterAddress": "string",      "rateSchedule": [],      "serialNumber": "string"
    }
    ],    "processingErrors": [
      {      "errorMessage": "string",      "errorReason": "string"
    }
    ]
  },  "script": "string"
}

Responses

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

Response Body Parameters

WorkbenchScriptPreviewResponseV202609
Property Description Type
after BillDescriptorJson
BillDescriptorJson properties
Property Description Type
confidence BillDescriptorJson+BillDescriptorConfidence
BillDescriptorJson+BillDescriptorConfidence properties
Property Description Type
confidenceScore A number between 0 and 1 representing percentage confident in extraction results. 100% is “totally confident”. number (double)
lowConfidenceReason A plain text explanation of why confidence is low if available. Can be blank if no confidence impacting issues detected. string
controlCode The name of the input file, without file extension, for linking results to document source for extraction string
header BillDescriptorJson+BillDescriptorHeaderJson
BillDescriptorJson+BillDescriptorHeaderJson properties
Property Description Type
accountIdentifiers A list of label-value pairs that may be used to identify the account. For example Customer ID, Supplier Agreement ID, Site ID, Metering Location ID, Service Point ID, Agreement ID, etc. Labels and values should appear as they do on the bill. BillDescriptorJson+BillDescriptorIdentifier[]
BillDescriptorJson+BillDescriptorIdentifier properties
Property Description Type
label The label of the identifier string
value The value of the identifier string
accountLevelCharges A list of charge line items that are not related to any meter on the bill. Any charges that are derived from the amount of metered usage should be attached to the relevant meter instead. This is often empty BillDescriptorJson+BillDescriptorChargeLineItem[]
BillDescriptorJson+BillDescriptorChargeLineItem properties
Property Description Type
caption Caption / Description of the line item string
cost Cost of the line item. Unlike meter line items, may not be NULL as a charge line has no other countable value. number (double)
observationType The observation type code classifying this line item (e.g., CHARGE, TAX, CUSTOMERCHARGE, LATEFEE). Must be a valid EnergyCap.DTO.Base.BillDescriptor.BillDescriptorJson.BillDescriptorChargeLineItem.ObservationType value. string
accountNumber Primary account number on the bill. Other items that may identify the account can be added to EnergyCap.DTO.Base.BillDescriptor.BillDescriptorJson.BillDescriptorHeaderJson.AccountIdentifiers. This will generally appear there as well and may be the only entry. string
billEnd The end date of the bill, if available. Must be in ISO-8601 format. string (date-time)
billStart The start date of the bill, if available. Must be in ISO-8601 format. string (date-time)
currencyCode The currency of all cost line items on the bill. Use the ISO-4217 3-character list () string
currentCharges The total amount of charges incurred only by this bill. Does not include late fees, balance carried forward from prior bills, etc. number (double)
customerAddress The customer address. Entire address - not broken into segments. string
daysOfService The number of days in the service period, if available. Also known as “Billing Days”, “Days in Period”, etc integer (int32)
deliveryDate For bills that have only a single date like fuel oil or propane deliveries, use this rather than EnergyCap.DTO.Base.BillDescriptor.BillDescriptorJson.BillDescriptorHeaderJson.BillStart and EnergyCap.DTO.Base.BillDescriptor.BillDescriptorJson.BillDescriptorHeaderJson.BillEnd. Must be in ISO-8601 format. string (date-time)
deposit REMOVED in BD v1.4 - retained in EUM for backwards compatibility. Any deposit amount held by the vendor that is applied to this bill. number (double)
dueDate When the bill payment is due. Also called Remit Date, Pay By, Expiration Date, Penalty if not paid before, etc. Must be in ISO-8601 format. string (date-time)
estimated true if any meter readings used to calculate the bill were estimated or the bill indicates that it was estimated boolean
invoiceDate Also called statement date, issue date. The effective date on which the bill amounts were calculated. Must be in ISO-8601 format. string (date-time)
invoiceNumber Also known as “bill number”, “Bill ID”, “Document Number” string
lateFee REMOVED in BD v1.4 - retained in EUM for backwards compatibility. Any late fees applied to this bill. number (double)
mailingDate When the bill was sent by the utility provider. Must be in ISO-8601 format. string (date-time)
paymentReceived REMOVED in BD v1.4 - retained in EUM for backwards compatibility. Amount of any payment received against the prior bill, typically the same as the amount of the prior bill. number (double)
priorBalance REMOVED in BD v1.4 - retained in EUM for backwards compatibility. The UNPAID amount owed prior to this bill. Also known as “Past Due Balance”, “Outstanding Balance”, “Past Due Amount”. number (double)
rateSchedule Label-value pairs representing information about the rate defining the bill. Often only one present. BillDescriptorJson+BillDescriptorIdentifier[]
BillDescriptorJson+BillDescriptorIdentifier properties
Property Description Type
label The label of the identifier string
value The value of the identifier string
refund REMOVED in BD v1.4 - retained in EUM for backwards compatibility. Any refund amount applied to this bill. number (double)
remitAddress Address where payments should be sent. Does not include vendor name. Entire address - not broken into segments. string
servicePeriodMonth Abbreviated US English month name, e.g. “Jan”, “Feb”, “Mar”, etc string
sourceLanguage The source language of the bill, in ISO-639 Set 2 () string
totalCost The total amount due on the bill, also known as “Total Amount Due”, “Total Due”, “Amount Due”, “Net Amount”. Includes prior balance and late fee. number (double)
vendorAddress The vendor’s address. Does not include vendor name. Entire address - not broken into segments. string
vendorEmail The website of the vendor, if available string
vendorName The name of the Utility Vendor issuing the bill string
vendorPhoneNumber The main phone number of the vendor, if available string
vendorRole If available, one of ‘Supply’, ‘Distribution’ string
vendorWebsite The website of the vendor, if available string
meters Meters represented on the bill, including line items associated with each meter BillDescriptorJson+BillDescriptorMeterJson[]
BillDescriptorJson+BillDescriptorMeterJson properties
Property Description Type
commodity See commodity list provided separately. string
identifiers A list of label-value pairs that may be used to identify the meter. For example Meter Number, Serial Number, Tank Number, Site Name, Point of Delivery, Service Point, EZID, etc. Labels and values should appear as they do on the bill. BillDescriptorJson+BillDescriptorIdentifier[]
BillDescriptorJson+BillDescriptorIdentifier properties
Property Description Type
label The label of the identifier string
value The value of the identifier string
lines A list of charges and usage values associated with this meter. Each line may have a caption, a cost, a unit rate, a value and a unit. Value and Unit may indicate consumption, demand, etc. Not all fields will be present on every line. For example a fixed monthly charge will not have a usage value or unit. A value may be present without a cost if the bill shows the usage but does not charge for it. Lines should appear in the order they appear on the bill whenever possible. BillDescriptorJson+BillDescriptorMeterLineItem[]
BillDescriptorJson+BillDescriptorMeterLineItem properties
Property Description Type
caption Caption / Description of the line item string
cost Cost of the line item. Should be NULL if the line does not have a cost associated with it. Should be zero if the line has a cost, but it is 0. number (double)
lineGroupHeader string
observationType The observation type code classifying this line item (e.g., USE, DEMAND, CHARGE, TAX). Must be a valid EnergyCap.DTO.Base.BillDescriptor.BillDescriptorJson.BillDescriptorMeterLineItem.ObservationType value. string
summaryLine string
unit Value unit (e.g. kWh, Therms, Gallons, CCF, etc). Units should be the unit code from the list of standard units provided separately (see unit-list.csv) string
unitRate Unit Rate should represent what is printed on the bill if present (it may differ based on rounding from a computed value). number (double)
value Value of the line item (e.g. quantity of energy, demand, or volume). Should be NULL if the line does not have a value associated with it. Should be zero if the line has a value, but it is 0. number (double)
meterAddress Entire address - not broken into segments string
rateSchedule label-value pairs representing information about the rate defining the bill. Often only one present. BillDescriptorJson+BillDescriptorIdentifier[]
BillDescriptorJson+BillDescriptorIdentifier properties
Property Description Type
label The label of the identifier string
value The value of the identifier string
serialNumber The serial number of the meter, if available string
processingErrors List of any problems that prevented extraction of bill data BillDescriptorJson+BillDescriptorProcessingError[]
BillDescriptorJson+BillDescriptorProcessingError properties
Property Description Type
errorMessage Whatever context will help to understand the problem. Free form text. string
errorReason A category for the error. “Invalid Scan”, “Encrypted File”, “Corrupt File”, “Unknown”, others as appropriate. string
before BillDescriptorJson
BillDescriptorJson properties
Property Description Type
confidence BillDescriptorJson+BillDescriptorConfidence
BillDescriptorJson+BillDescriptorConfidence properties
Property Description Type
confidenceScore A number between 0 and 1 representing percentage confident in extraction results. 100% is “totally confident”. number (double)
lowConfidenceReason A plain text explanation of why confidence is low if available. Can be blank if no confidence impacting issues detected. string
controlCode The name of the input file, without file extension, for linking results to document source for extraction string
header BillDescriptorJson+BillDescriptorHeaderJson
BillDescriptorJson+BillDescriptorHeaderJson properties
Property Description Type
accountIdentifiers A list of label-value pairs that may be used to identify the account. For example Customer ID, Supplier Agreement ID, Site ID, Metering Location ID, Service Point ID, Agreement ID, etc. Labels and values should appear as they do on the bill. BillDescriptorJson+BillDescriptorIdentifier[]
BillDescriptorJson+BillDescriptorIdentifier properties
Property Description Type
label The label of the identifier string
value The value of the identifier string
accountLevelCharges A list of charge line items that are not related to any meter on the bill. Any charges that are derived from the amount of metered usage should be attached to the relevant meter instead. This is often empty BillDescriptorJson+BillDescriptorChargeLineItem[]
BillDescriptorJson+BillDescriptorChargeLineItem properties
Property Description Type
caption Caption / Description of the line item string
cost Cost of the line item. Unlike meter line items, may not be NULL as a charge line has no other countable value. number (double)
observationType The observation type code classifying this line item (e.g., CHARGE, TAX, CUSTOMERCHARGE, LATEFEE). Must be a valid EnergyCap.DTO.Base.BillDescriptor.BillDescriptorJson.BillDescriptorChargeLineItem.ObservationType value. string
accountNumber Primary account number on the bill. Other items that may identify the account can be added to EnergyCap.DTO.Base.BillDescriptor.BillDescriptorJson.BillDescriptorHeaderJson.AccountIdentifiers. This will generally appear there as well and may be the only entry. string
billEnd The end date of the bill, if available. Must be in ISO-8601 format. string (date-time)
billStart The start date of the bill, if available. Must be in ISO-8601 format. string (date-time)
currencyCode The currency of all cost line items on the bill. Use the ISO-4217 3-character list () string
currentCharges The total amount of charges incurred only by this bill. Does not include late fees, balance carried forward from prior bills, etc. number (double)
customerAddress The customer address. Entire address - not broken into segments. string
daysOfService The number of days in the service period, if available. Also known as “Billing Days”, “Days in Period”, etc integer (int32)
deliveryDate For bills that have only a single date like fuel oil or propane deliveries, use this rather than EnergyCap.DTO.Base.BillDescriptor.BillDescriptorJson.BillDescriptorHeaderJson.BillStart and EnergyCap.DTO.Base.BillDescriptor.BillDescriptorJson.BillDescriptorHeaderJson.BillEnd. Must be in ISO-8601 format. string (date-time)
deposit REMOVED in BD v1.4 - retained in EUM for backwards compatibility. Any deposit amount held by the vendor that is applied to this bill. number (double)
dueDate When the bill payment is due. Also called Remit Date, Pay By, Expiration Date, Penalty if not paid before, etc. Must be in ISO-8601 format. string (date-time)
estimated true if any meter readings used to calculate the bill were estimated or the bill indicates that it was estimated boolean
invoiceDate Also called statement date, issue date. The effective date on which the bill amounts were calculated. Must be in ISO-8601 format. string (date-time)
invoiceNumber Also known as “bill number”, “Bill ID”, “Document Number” string
lateFee REMOVED in BD v1.4 - retained in EUM for backwards compatibility. Any late fees applied to this bill. number (double)
mailingDate When the bill was sent by the utility provider. Must be in ISO-8601 format. string (date-time)
paymentReceived REMOVED in BD v1.4 - retained in EUM for backwards compatibility. Amount of any payment received against the prior bill, typically the same as the amount of the prior bill. number (double)
priorBalance REMOVED in BD v1.4 - retained in EUM for backwards compatibility. The UNPAID amount owed prior to this bill. Also known as “Past Due Balance”, “Outstanding Balance”, “Past Due Amount”. number (double)
rateSchedule Label-value pairs representing information about the rate defining the bill. Often only one present. BillDescriptorJson+BillDescriptorIdentifier[]
BillDescriptorJson+BillDescriptorIdentifier properties
Property Description Type
label The label of the identifier string
value The value of the identifier string
refund REMOVED in BD v1.4 - retained in EUM for backwards compatibility. Any refund amount applied to this bill. number (double)
remitAddress Address where payments should be sent. Does not include vendor name. Entire address - not broken into segments. string
servicePeriodMonth Abbreviated US English month name, e.g. “Jan”, “Feb”, “Mar”, etc string
sourceLanguage The source language of the bill, in ISO-639 Set 2 () string
totalCost The total amount due on the bill, also known as “Total Amount Due”, “Total Due”, “Amount Due”, “Net Amount”. Includes prior balance and late fee. number (double)
vendorAddress The vendor’s address. Does not include vendor name. Entire address - not broken into segments. string
vendorEmail The website of the vendor, if available string
vendorName The name of the Utility Vendor issuing the bill string
vendorPhoneNumber The main phone number of the vendor, if available string
vendorRole If available, one of ‘Supply’, ‘Distribution’ string
vendorWebsite The website of the vendor, if available string
meters Meters represented on the bill, including line items associated with each meter BillDescriptorJson+BillDescriptorMeterJson[]
BillDescriptorJson+BillDescriptorMeterJson properties
Property Description Type
commodity See commodity list provided separately. string
identifiers A list of label-value pairs that may be used to identify the meter. For example Meter Number, Serial Number, Tank Number, Site Name, Point of Delivery, Service Point, EZID, etc. Labels and values should appear as they do on the bill. BillDescriptorJson+BillDescriptorIdentifier[]
BillDescriptorJson+BillDescriptorIdentifier properties
Property Description Type
label The label of the identifier string
value The value of the identifier string
lines A list of charges and usage values associated with this meter. Each line may have a caption, a cost, a unit rate, a value and a unit. Value and Unit may indicate consumption, demand, etc. Not all fields will be present on every line. For example a fixed monthly charge will not have a usage value or unit. A value may be present without a cost if the bill shows the usage but does not charge for it. Lines should appear in the order they appear on the bill whenever possible. BillDescriptorJson+BillDescriptorMeterLineItem[]
BillDescriptorJson+BillDescriptorMeterLineItem properties
Property Description Type
caption Caption / Description of the line item string
cost Cost of the line item. Should be NULL if the line does not have a cost associated with it. Should be zero if the line has a cost, but it is 0. number (double)
lineGroupHeader string
observationType The observation type code classifying this line item (e.g., USE, DEMAND, CHARGE, TAX). Must be a valid EnergyCap.DTO.Base.BillDescriptor.BillDescriptorJson.BillDescriptorMeterLineItem.ObservationType value. string
summaryLine string
unit Value unit (e.g. kWh, Therms, Gallons, CCF, etc). Units should be the unit code from the list of standard units provided separately (see unit-list.csv) string
unitRate Unit Rate should represent what is printed on the bill if present (it may differ based on rounding from a computed value). number (double)
value Value of the line item (e.g. quantity of energy, demand, or volume). Should be NULL if the line does not have a value associated with it. Should be zero if the line has a value, but it is 0. number (double)
meterAddress Entire address - not broken into segments string
rateSchedule label-value pairs representing information about the rate defining the bill. Often only one present. BillDescriptorJson+BillDescriptorIdentifier[]
BillDescriptorJson+BillDescriptorIdentifier properties
Property Description Type
label The label of the identifier string
value The value of the identifier string
serialNumber The serial number of the meter, if available string
processingErrors List of any problems that prevented extraction of bill data BillDescriptorJson+BillDescriptorProcessingError[]
BillDescriptorJson+BillDescriptorProcessingError properties
Property Description Type
errorMessage Whatever context will help to understand the problem. Free form text. string
errorReason A category for the error. “Invalid Scan”, “Encrypted File”, “Corrupt File”, “Unknown”, others as appropriate. string
consoleOutput The script’s console output in the order it was written, including output written before an error WorkbenchConsoleMessageV202609[]
WorkbenchConsoleMessageV202609 properties
Property Description Type
level The console method the script called. One of: log, info, warn, error, debug string
message The call’s arguments joined with a space. Strings are shown as-is and objects as indented JSON. Long messages are cut off at 10,000 characters. string
consoleOutputTruncated True when the script logged more messages than are kept (500), so EnergyCap.DTO.V202609.Workbench.WorkbenchScriptPreviewResponseDTO.ConsoleOutput holds only the first ones boolean
differences Every property the script changed. Empty when the script changed nothing or did not run successfully WorkbenchScriptDifferenceV202609[]
WorkbenchScriptDifferenceV202609 properties
Property Description Type
newValue The property’s value after the script ran, formatted as text. (null) when the script cleared it string
originalValue The property’s value on the bill before the script ran, formatted as text. (null) when it had no value string
propertyName Path to the changed property on the bill, e.g. Header.TotalCost or Meters[0].Lines[2].Cost string
differencesTruncated True when the script changed more properties than could be reported, so EnergyCap.DTO.V202609.Workbench.WorkbenchScriptPreviewResponseDTO.Differences is incomplete boolean
errorLine The 1-based line of the script where the error was raised, when the engine reports one. Null when EnergyCap.DTO.V202609.Workbench.WorkbenchScriptPreviewResponseDTO.Success is true or the error has no location (e.g. the statement limit was reached) integer (int32)
errorReason Why the script failed, e.g. ReferenceError: foo is not defined. Null when EnergyCap.DTO.V202609.Workbench.WorkbenchScriptPreviewResponseDTO.Success is true string
executionTimeMs How long the script took to run, in milliseconds integer (int64)
success True when the script ran to completion. False when it threw an error, had a syntax error, or exceeded the rules engine’s statement or time limits; see EnergyCap.DTO.V202609.Workbench.WorkbenchScriptPreviewResponseDTO.ErrorReason boolean
Example Response application/json
{  "after": {    "confidence": {      "confidenceScore": 1.0,      "lowConfidenceReason": "string"
    },    "controlCode": "string",    "header": {      "accountIdentifiers": [],      "accountLevelCharges": [],      "accountNumber": "string",      "billEnd": "2026-10-07",      "billStart": "2026-10-07",      "currencyCode": "string",      "currentCharges": 1.0,      "customerAddress": "string",      "daysOfService": 1,      "deliveryDate": "2026-10-07",      "deposit": 1.0,      "dueDate": "2026-10-07",      "estimated": false,      "invoiceDate": "2026-10-07",      "invoiceNumber": "string",      "lateFee": 1.0,      "mailingDate": "2026-10-07",      "paymentReceived": 1.0,      "priorBalance": 1.0,      "rateSchedule": [],      "refund": 1.0,      "remitAddress": "string",      "servicePeriodMonth": "string",      "sourceLanguage": "string",      "totalCost": 1.0,      "vendorAddress": "string",      "vendorEmail": "string",      "vendorName": "string",      "vendorPhoneNumber": "string",      "vendorRole": "string",      "vendorWebsite": "string"
    },    "meters": [
      {      "commodity": "string",      "identifiers": [],      "lines": [],      "meterAddress": "string",      "rateSchedule": [],      "serialNumber": "string"
    }
    ],    "processingErrors": [
      {      "errorMessage": "string",      "errorReason": "string"
    }
    ]
  },  "before": {    "confidence": {      "confidenceScore": 1.0,      "lowConfidenceReason": "string"
    },    "controlCode": "string",    "header": {      "accountIdentifiers": [],      "accountLevelCharges": [],      "accountNumber": "string",      "billEnd": "2026-10-07",      "billStart": "2026-10-07",      "currencyCode": "string",      "currentCharges": 1.0,      "customerAddress": "string",      "daysOfService": 1,      "deliveryDate": "2026-10-07",      "deposit": 1.0,      "dueDate": "2026-10-07",      "estimated": false,      "invoiceDate": "2026-10-07",      "invoiceNumber": "string",      "lateFee": 1.0,      "mailingDate": "2026-10-07",      "paymentReceived": 1.0,      "priorBalance": 1.0,      "rateSchedule": [],      "refund": 1.0,      "remitAddress": "string",      "servicePeriodMonth": "string",      "sourceLanguage": "string",      "totalCost": 1.0,      "vendorAddress": "string",      "vendorEmail": "string",      "vendorName": "string",      "vendorPhoneNumber": "string",      "vendorRole": "string",      "vendorWebsite": "string"
    },    "meters": [
      {      "commodity": "string",      "identifiers": [],      "lines": [],      "meterAddress": "string",      "rateSchedule": [],      "serialNumber": "string"
    }
    ],    "processingErrors": [
      {      "errorMessage": "string",      "errorReason": "string"
    }
    ]
  },  "consoleOutput": [
    {    "level": "string",    "message": "string"
  }
  ],  "consoleOutputTruncated": false,  "differences": [
    {    "newValue": "string",    "originalValue": "string",    "propertyName": "string"
  }
  ],  "differencesTruncated": false,  "errorLine": 1,  "errorReason": "string",  "executionTimeMs": 1,  "success": false
}
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.