Dry-runs one JavaScript bill processing rule script against several existing bills without saving any changes
Use this endpoint to see how a script behaves across many bills before making it a rule - for example the last
bills on an account - and find the ones it fails on or changes. The script runs against each bill separately,
with the same engine and limits as a saved rule. Nothing is persisted. Each result reports whether the script
succeeded, its error, and how many properties it changed; to see the changes to one bill, use
POST workbench/script/bill/{billId}. Bills that don’t exist or aren’t visible to the user are reported as not
found. At most 100 bills per request. 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. |
Request Body
WorkbenchScriptBatchRequestV202609
| Property | Description | Type |
|---|---|---|
| billIds | Unique numeric identifiers of the bills to run the script against, one run per bill in the order given. At most 100. Max length of 100 | integer[] |
| script | The JavaScript to run against each bill, written as the body of a bill processing rule. Maximum length: 100,000 characters. Max length of 100000 | string |
Example Request Body
{ "billIds": [
1
], "script": "string"
}
Responses
200
OK
The request succeeded and the response body contains the requested data.
Response Body Parameters
WorkbenchScriptBatchResponseV202609
| Property | Description | Type | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| results | One result per requested bill, in the order the bills were requested | WorkbenchScriptBatchResultV202609[] | ||||||||||||||||||||||||||||||
|
WorkbenchScriptBatchResultV202609 properties
|
||||||||||||||||||||||||||||||||
Example Response
{ "results": [
{ "billId": 1, "consoleMessageCount": 1, "differenceCount": 1, "differencesTruncated": false, "errorLine": 1, "errorReason": "string", "executionTimeMs": 1, "found": false, "success": false
}
]
}
400
Bad Request
The request was malformed or contains invalid parameters. Check the request body and query parameters.