Skip to main content

Process Cluster

POST 

/api/portals/processcluster

Tier: Internal — subject to change without notice.

Processes a batch of tag reads ("cluster") reported by a portal device for one rule evaluation, moving items/persons and/or recording entity events.

For every rule type except the toggle-location rule: the destination place is resolved from PlaceInId XOR PlaceTagNumber. If the rule's Enums.PortalRuleAction configuration includes item movement (or RuleActions is 0, treated as move-items for backwards compatibility), tags are matched to items, the moving person is inferred from any non-item tags in the cluster (falling back to the caller's person id), and each item is moved — preferring a GPS geo-fenced place derived from the tag's coordinates over the cluster's resolved place. Items with neither a resolved place nor GPS are skipped with an error. Movement is recorded directly (no snapshot is created) and raises a place-updated notification per item. If person movement is configured, it requires a resolved place. If any event bits are set, the same configured event id is used for both "in" and "out" occurrences and is recorded per matched entity.

The toggle-location rule instead moves items/persons currently at PlaceInId to PlaceOutId and vice versa, and requires both places: a toggle cluster missing either place returns 200 with IsSuccessfalse and an ErrorMessage naming the missing place(s) ("Toggle-location cluster is missing a required place: PlaceInId", "...PlaceOutId", or "...PlaceInId and PlaceOutId"). In the current code, place-tag-number addressing does not resolve for toggle clusters — toggle places must be supplied by id. PlaceId on Clusters.ClusterDto is a deprecated alias for PlaceInId.

Request

Responses

Always returned, even on failure. See Clusters.ClusterResponseDto; IsSuccess is false and ErrorMessage is populated when the cluster could not be fully processed (including unhandled exceptions, surfaced as "Unhandled error processing cluster: <ExceptionType>"). This endpoint never returns the standard 400 validation-array convention used elsewhere in the API.