GET /api/v202609/workbench/script/reference

Retrieves a reference of the bill object and helper functions a bill processing rule script can use

GetWorkbenchScriptReferenceV202609 Permissions: BillProcessingRules (Manage)
Use this endpoint to learn what a rule script can work with: the shape of the bill object (the same schema the AI rule generator uses, via POST billImportRule/generate) and the helper functions on ruleOperations. The Bill Processing Rules Builder uses it for editor auto-complete. 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.

Responses

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

Response Body Parameters

WorkbenchScriptReferenceV202609
Property Description Type
billSchema A JSON Schema (as JSON text) describing the bill object, with camelCase property names, each property’s type, and its description. Members hidden from rules are left out. This is the same schema the AI rule generator is given. string
functions The helper functions available on the ruleOperations object WorkbenchScriptFunctionV202609[]
WorkbenchScriptFunctionV202609 properties
Property Description Type
description What the function does. Null when it isn’t documented string
name The function’s name as a script calls it, e.g. convertUnit string
parameters The function’s parameters, in order WorkbenchScriptParameterV202609[]
WorkbenchScriptParameterV202609 properties
Property Description Type
description What the parameter is for. Null when it isn’t documented string
name The parameter’s name string
optional True when the parameter can be left out boolean
type The kind of value the parameter takes, e.g. number, string, or bill string
returnType The kind of value the function returns, e.g. number, string, bill[], or object string
Example Response application/json
{  "billSchema": "string",  "functions": [
    {    "description": "string",    "name": "string",    "parameters": [
      {      "description": "string",      "name": "string",      "optional": false,      "type": "string"
    }
    ],    "returnType": "string"
  }
  ]
}