PUT /api/v202610/billImportRule/order

Sets the order bill import rules run in within one scope (global, one vendor, or one account)

EditRuleOrderV202610 Permissions: BillProcessingRules (Manage)
Use this endpoint to reorder rules within a scope in one step. It renumbers the scope’s rule priorities 1..n in the order given, which avoids the duplicate-priority errors that come from changing priorities one rule at a time with PUT /api/v202604/billImportRule/{billImportRuleId}. The list must contain every rule in the scope exactly once, including inactive and locked rules, so load the scope with GET /api/v202604/billImportRule first. Locked rules must stay at their current positions. Rules whose priority changes are stamped as modified by the current user. Bills imported or reprocessed afterwards run the rules in the new order.

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

BillImportRuleOrderRequestV202610
Property Description Type
accountId The account whose account-scoped rules are being ordered. Null when ordering global or vendor-scoped rules. Required (defined) Only one of VendorId, AccountId can be set integer (int32)
billImportRuleIds Unique numeric identifiers of every rule in the scope, in the order they should run (first runs first). Must list each rule in the scope exactly once, including inactive and locked rules. Locked rules must stay at their current positions. Required integer[]
vendorId The vendor whose vendor-scoped rules are being ordered. Null when ordering global or account-scoped rules. Required (defined) Only one of VendorId, AccountId can be set integer (int32)
Example Request Body application/json
{  "accountId": 1,  "billImportRuleIds": [
    1
  ],  "vendorId": 1
}

Responses

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

Response Body Parameters

Array of:

BillImportRuleResponseV202604
Property Description Type
account AccountChild
AccountChild properties
Property Description Type
accountCode The account code (unique identifier assigned by the organization) string
accountId The unique identifier of the account integer (int32)
accountInfo The account description/name string
active Whether the account is currently active. Null if not applicable. boolean
hasCalculatedMeter Whether the account has a child calculated meter boolean
hasSplitChildMeter Whether the account has a child split meter boolean
hasSplitParentMeter Whether the account is a recipient of a meter split boolean
hasSubAccount Whether this account has sub-accounts beneath it boolean
isSubAccount Whether this account is a sub-account of a summary account boolean
vendor VendorChild
VendorChild properties
Property Description Type
vendorCode The vendor code string
vendorId The vendor identifier integer (int32)
vendorInfo The vendor info string
billImportRuleId The unique identifier of the bill import rule Required (defined) integer (int32)
billImportRuleInfo The name of the bill import rule Required (defined) string
billImportRulePrompt The prompt used to generate the rule definition Required (defined) string
billImportRuleTemplateId If set, the bill import rule template associated with the rule Required (defined) integer (int32)
createdBy UserChild
UserChild properties
Property Description Type
fullName The user’s full display name. string
userCode The user’s login code, which distinguishes users whose display names are the same. string
userId The unique numeric identifier of the EnergyCAP user in the customer’s database. integer (int32)
createdDate The date and time the rule was created Required (defined) string (date-time)
description A human-readable description of what the rule does Required (defined) string
locked The lock status of the rule. If locked, it is considered a ‘Default’ rule provided by the system and the rule cannot be modified, with the exception of EnergyCAP Staff being able to enable/disable a rule via the EditRuleStatus API. Required (defined) boolean
modifiedBy UserChild
UserChild properties
Property Description Type
fullName The user’s full display name. string
userCode The user’s login code, which distinguishes users whose display names are the same. string
userId The unique numeric identifier of the EnergyCAP user in the customer’s database. integer (int32)
modifiedDate The date and time the rule was last modified Required (defined) string (date-time)
priority The execution priority of the rule within its scope. Lower values execute first. Required (defined) integer (int32)
ruleDefinition The JavaScript rule definition executed by the rules engine Required (defined) string
status BillImportRuleStatusChildV202604
BillImportRuleStatusChildV202604 properties
Property Description Type
billImportRuleStatusId The status identifier Required (defined) integer (int32)
billImportRuleStatusInfo The status display name Required (defined) string
vendor VendorChild
VendorChild properties
Property Description Type
vendorCode The vendor code string
vendorId The vendor identifier integer (int32)
vendorInfo The vendor info string
Example Response application/json
[
  {    "account": {      "accountCode": "string",      "accountId": 1,      "accountInfo": "string",      "active": false,      "hasCalculatedMeter": false,      "hasSplitChildMeter": false,      "hasSplitParentMeter": false,      "hasSubAccount": false,      "isSubAccount": false,      "vendor": {}
    },    "billImportRuleId": 1,    "billImportRuleInfo": "string",    "billImportRulePrompt": "string",    "billImportRuleTemplateId": 1,    "createdBy": {      "fullName": "string",      "userCode": "string",      "userId": 1
    },    "createdDate": "2026-11-13",    "description": "string",    "locked": false,    "modifiedBy": {      "fullName": "string",      "userCode": "string",      "userId": 1
    },    "modifiedDate": "2026-11-13",    "priority": 1,    "ruleDefinition": "string",    "status": {      "billImportRuleStatusId": 1,      "billImportRuleStatusInfo": "string"
    },    "vendor": {      "vendorCode": "string",      "vendorId": 1,      "vendorInfo": "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.