UnitProfiles controller exposes an endpoint that accepts a list of organization numbers and returns a set of PartyNotificationContactPoints.
This endpoint should be extended to accept a resource id as input and only return contact points that accept notifications related to the resource.
Tasks
[x] Implement lookup model to use as request body that contains list of org numbers and resourceId
[x] Alter InvalidEndpoint in unit endpoint consumer to also check for matching service filter
[x] Remove obsolete endpoint that takes GUID as input.
[x] QA
[x] Manual test
Acceptance criteria
[x] When querying personal contact address for unit only users that have specified the resource or no resources at all should be included in the result set
[ ] If no resource is included in lookup, no user registered contact points are included in the response
[ ] If no resource is included in lookup, no user registered contact points are included in the response
This is not the case. The endpoint does return contact points. Provided that the user has registered contact info without a specific service selected. So if the ServiceNotificationOptions is null or empty. In that case the resource id is not used in filtering.
This behavior is okay, but it also means that Notification needs to abstain from performing the call to Profile in cases where resource is unspecified.
Edit: We ended up making a change where the endpoint returns 400 if resource is missing or the organization list is missing/empty.
Description
UnitProfiles controller exposes an endpoint that accepts a list of organization numbers and returns a set of PartyNotificationContactPoints. This endpoint should be extended to accept a resource id as input and only return contact points that accept notifications related to the resource.
Tasks
Acceptance criteria