The request body selects and updates accounts, locations, or policies in bulk based on criteria specified in the body of the request.
Filters can be defined in two different modes: basic and advanced.
In Basic mode, the request uses distinct parameters to identify target resources (editType), specify filter conditions (editQuery), and define changes to target resource properties (updates).
In Advanced mode, the request specifies resource target updates as a query statement in the editQuery parameter and uses SQL keywords to identify the target resources (EDIT), filter conditions (WHERE), and property changes (SET) in that query statement.
The exposureResourceId, exposureResourceType, and editQuery parameters are required. The editType and updates parameters are required if the request uses Basic mode.
Basic
In Basic mode, the exposureResourceId, exposureResourceType, editType, updates, and editQuery parameters are required.
The editType parameter identifies the type of the resources to update (account, location, or policy). The editType parameter defines a WHICH condition that selects a subset of the target resources and the updates defines a SET statement that defines a list of the changes to make.
Note that the editQuery and updates parameters identify resource properties by their EDM Database Schema field names (e.g. number) and not the Risk Data API property name (e.g. policyNumber ). Field value strings must be escaped with \". Enumeration values, dates, and numbers are not escaped.
The editQuery and updates parameters support comparison (=, !=, <, >, <=, >=), string matching (LIKE, NOT LIKE), list (IN, NOT IN), logical (AND, OR), and assignment operators. Certain field-level restrictions apply to account, location, and policy changes. To learn more, see Supported Field Names in Support Center.
Advanced:
In Advanced mode, the editQuery parameter defines a SQL statement that both selects the target resources and defines the changes to be made. The edityQuery and updates parameters are omitted.
The editQuery parameter makes use of SQL keywords (EDIT, SET and WHERE) to identify the exposure resource to update (account, location, or policy) and the changes to be made:
{
"exposureResourceId": 12345,
"exposureResourceType": "ACCOUNT",
"editQuery": "EDIT policy\nSET status = \"BOOK\", inceptionDate = 2023-06-30, expirationDate = 2024-10-30, blanketPremium *= 2\nWHERE status LIKE \"*EXP*\""
}
In advanced mode, the editQuery parameter supports comparison (=, !=, <, >, <=, >=), string matching (LIKE, NOT LIKE), list (IN, NOT IN), logical (AND, OR), and assignment operators. Certain field-level restrictions apply to account, location, and policy changes. To learn more, see Supported Field Names in Support Center.
📷
Note
Moodyʼs recommends performing a test edit on a duplicate dataset, then confirming the results are as intended. Before applying a bulk edit to a large number of records. To learn more, see Bulk Edit Resources Dry Run.