PUT /api/v3/flag/{entityType}/flagAction

Bulk-updates flags for a list of entities, creating flags if they do not already exist

FlagActionV3 Permissions: FlaggedItems (Manage)
Use this endpoint to apply the same flag action (flag, resolve, assign, hold/release export) to multiple entities at once. If an entity does not currently have a flag, one will be created. HoldFromExport and ReleaseExportHold cannot both be true. Currently only “Bill” is supported as an entity type.

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.

Path Parameters

Name Description Type Required
entityType The type of entity the flags apply to. Supported values are: “Bill” string Required

Request Body

FlagListAction
Property Description Type
entityIds The entities to update Required (defined) integer[]
flagAction FlagEdit
FlagEdit properties
Property Description Type
assignees All users currently assigned to this flag Required (defined) At least one of FlagTypeId, FlagStatusId, CostRecovery, Comment, Assignees must not be null integer[]
comment Event and action that has occurred with this flag Required (defined) At least one of FlagTypeId, FlagStatusId, CostRecovery, Comment, Assignees must not be null string
costRecovery Cost recovery associated with the issue this flag represents Required (defined) At least one of FlagTypeId, FlagStatusId, CostRecovery, Comment, Assignees must not be null number (double)
flagStatusId Current status of the flag One of ‘1’, ‘2’ Case sensitive Required (defined) At least one of FlagTypeId, FlagStatusId, CostRecovery, Comment, Assignees must not be null integer (int32)
flagTypeId Type of the flag Note: Audit exception flag type id cannot be assigned manually Required (defined) At least one of FlagTypeId, FlagStatusId, CostRecovery, Comment, Assignees must not be null integer (int32)
holdFromExport Determines whether or not the bill will be held for export when flagging the bill This property cannot be true if ReleaseExportHold is true. Required (defined) boolean
releaseExportHold Determines whether or not the bill will be released from export hold when resolving the bill flag This property cannot be true if HoldFromExport is true. Required (defined) boolean
Example Request Body application/json
{  "entityIds": [
    1
  ],  "flagAction": {    "assignees": [
      1
    ],    "comment": "string",    "costRecovery": 1.0,    "flagStatusId": 1,    "flagTypeId": 1,    "holdFromExport": false,    "releaseExportHold": false
  }
}

Responses

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

Response Body Parameters

UpdateResult
Property Description Type
selected The total number of items that were targeted by the bulk operation Required (defined) integer (int32)
updated The number of items that were actually modified (excludes items that already matched the target state) Required (defined) integer (int32)
Example Response application/json
{  "selected": 1,  "updated": 1
}
400 Bad Request The request was malformed or contains invalid parameters. Check the request body and query parameters.