POST /api/v202604/billImportRule

Creates a new bill import rule with optional vendor or account scope

CreateRuleV202604 Permissions: BillProcessingRules (Manage)
Use this endpoint to create a new import rule. Scope is determined by the optional vendorId or accountId in the request body. At most one scope entity can be provided. If none are provided, the rule is global (customer-level).

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

BillImportRuleRequestV202604
Property Description Type
accountId If set, the account the rule is scoped to, otherwise null Only one of VendorId, AccountId can be set integer (int32)
billImportRuleInfo The name of the bill import rule. Must be unique within the owner. Required Max length of 50 string
billImportRulePrompt The prompt used to generate the rule definition string
billImportRuleStatusId The status of the bill import rule. Valid values: 1 = Active, 2 = Inactive, 3 = Draft Required One of ‘1’, ‘2’, ‘3’ Case sensitive integer (int32)
billImportRuleTemplateId If set, the bill import rule template to associate with the rule integer (int32)
description A human-readable description of what the rule does Required Max length of 4000 string
priority

The execution priority of the rule within its scope. Must be greater than 0. Lower values execute first.

When creating a rule, NULL will set the rule to the lowest priority (it will be last rule to run).

When editing a rule, NULL is not permitted. Must be between 1 and 2147483647

integer (int32)
ruleDefinition The JavaScript rule definition to be executed by the rules engine Required string
vendorId If set, the vendor the rule is scoped to, otherwise null Only one of VendorId, AccountId can be set integer (int32)
Example Request Body application/json
{  "accountId": 1,  "billImportRuleInfo": "string",  "billImportRulePrompt": "string",  "billImportRuleStatusId": 1,  "billImportRuleTemplateId": 1,  "description": "string",  "priority": 1,  "ruleDefinition": "string",  "vendorId": 1
}

Responses

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

Response Body Parameters

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 integer (int32)
billImportRuleInfo The name of the bill import rule string
billImportRulePrompt The prompt used to generate the rule definition string
billImportRuleTemplateId If set, the bill import rule template associated with the rule integer (int32)
createdBy UserChild
UserChild properties
Property Description Type
fullName The user’s full name string
userCode The user code string
userId The user identifier integer (int32)
createdDate The date and time the rule was created string (date-time)
description A human-readable description of what the rule does string
modifiedBy UserChild
UserChild properties
Property Description Type
fullName The user’s full name string
userCode The user code string
userId The user identifier integer (int32)
modifiedDate The date and time the rule was last modified string (date-time)
priority The execution priority of the rule within its scope. Lower values execute first. integer (int32)
ruleDefinition The JavaScript rule definition executed by the rules engine string
status BillImportRuleStatusChildV202604
BillImportRuleStatusChildV202604 properties
Property Description Type
billImportRuleStatusId The status identifier integer (int32)
billImportRuleStatusInfo The status display name 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": {      "vendorCode": "string",      "vendorId": 1,      "vendorInfo": "string"
    }
  },  "billImportRuleId": 1,  "billImportRuleInfo": "string",  "billImportRulePrompt": "string",  "billImportRuleTemplateId": 1,  "createdBy": {    "fullName": "string",    "userCode": "string",    "userId": 1
  },  "createdDate": "2026-06-18",  "description": "string",  "modifiedBy": {    "fullName": "string",    "userCode": "string",    "userId": 1
  },  "modifiedDate": "2026-06-18",  "priority": 1,  "ruleDefinition": "string",  "status": {    "billImportRuleStatusId": 1,    "billImportRuleStatusInfo": "string"
  },  "vendor": {    "vendorCode": "string",    "vendorId": 1,    "vendorInfo": "string"
  }
}