POST /api/v202604/billImportRule/generate

Generates a bill import rule based on the provided prompt.

GenerateRuleV202604 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.

Request Body

BillImportRulePromptV202604
Property Description Type
prompt A natural language prompt used to generate JavaScript for a bill import rule Required string
Example Request Body application/json
{  "prompt": "string"
}

Responses

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

Response Body Parameters

BillImportRuleGenerationResponseV202604
Property Description Type
javaScript The generated JavaScript. Null if the prompt is refused string
refusalReason If set, contains the reason why the rule generation prompt was refused string
Example Response application/json
{  "javaScript": "string",  "refusalReason": "string"
}