POST /api/v202604/billImportRule/test/inline/bill/{billId}

Test a given import rule definition against an existing EUM bill. Useful when the rule does not exist in EUM yet or for testing edits before committing them.

TestInlineBillImportRuleAgainstBillV202604 Permissions: BillsAndBatches (Create)

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 The EUM Bill ID to test the rule against integer (int32) Required

Request Body

TestBillImportRuleV202604
Property Description Type
ruleDefinition The JavaScript definition of the rule being tested Required string
Example Request Body application/json
{  "ruleDefinition": "string"
}

Responses

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

Response Body Parameters

TestBillImportRuleResponseV202604
Property Description Type
errorMetadata If EnergyCap.DTO.V202604.BillImportRule.TestBillImportRuleResponseDTO.Success is false - contains other relevant error information. This object structure should be treated as dynamic - its shape may change depending on the error. object
errorReason If EnergyCap.DTO.V202604.BillImportRule.TestBillImportRuleResponseDTO.Success is false - contains a message explaining the error that was encountered string
result 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 charges 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 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 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 Amount of any payment received against the prior bill, typically the same as the amount of the prior bill number (double)
priorBalance 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 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 “TotEal 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
success If false, the rule encountered an error. See EnergyCap.DTO.V202604.BillImportRule.TestBillImportRuleResponseDTO.ErrorReason and EnergyCap.DTO.V202604.BillImportRule.TestBillImportRuleResponseDTO.ErrorMetadata for detailed error information. boolean
Example Response application/json
{  "errorMetadata": {},  "errorReason": "string",  "result": {    "confidence": {      "confidenceScore": 1.0,      "lowConfidenceReason": "string"
    },    "controlCode": "string",    "header": {      "accountIdentifiers": [],      "accountLevelCharges": [],      "accountNumber": "string",      "billEnd": "2026-05-12",      "billStart": "2026-05-12",      "currencyCode": "string",      "currentCharges": 1.0,      "customerAddress": "string",      "daysOfService": 1,      "deliveryDate": "2026-05-12",      "deposit": 1.0,      "dueDate": "2026-05-12",      "estimated": false,      "invoiceDate": "2026-05-12",      "invoiceNumber": "string",      "lateFee": 1.0,      "mailingDate": "2026-05-12",      "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"
    }
    ]
  },  "success": false
}