Skip to content

feat: filter v7.0.0 customers at a bank by customer attributes - #2966

Merged
simonredfern merged 8 commits into
OpenBankProject:developfrom
hongwei1:feat/v700-customers-attribute-filter
Nov 10, 2026
Merged

simonredfern merged 8 commits into
OpenBankProject:developfrom
hongwei1:feat/v700-customers-attribute-filter

Conversation

@hongwei1

Copy link
Copy Markdown
Contributor

GET /obp/v7.0.0/banks/BANK_ID/customers is native in v7.0.0 again and returns each Customer with its customer_attributes. Any query parameter other than limit, offset, sort_direction, from_date, to_date and sort_by (in any case) and names starting with obp_ or _ filters by Customer Attribute: a parameter takes several values separated by commas (OBP-API refuses a parameter name given twice), and several parameters must all match, e.g. ?organisation_kind=bank_fi,university&country=DE. A filter without a value returns 400 (OBP-10034). Without filters the endpoint behaves like v6.0.0 (ordered by last_ok_date); with filters the matching Customers are ordered by customer_id in sort_direction (default descending), only the requested page is loaded, a Customer whose attribute points to a missing Customer is skipped so a page can be shorter than limit, and a connector failure fails the request. It needs CanGetCustomersAtOneBank at that bank. CustomersAtOneBankV700Test covers 13 scenarios (role, unfiltered list, single and comma values, AND across names, duplicate names, paging and ordering, other banks, empty values, reserved names, dangling attributes).

Not covered yet: filtering still reads all matching customer ids from the connector before paging, as v4.0.0 does.

GET /obp/v7.0.0/banks/BANK_ID/customers returns each Customer with its
Customer Attributes. Query parameters other than limit, offset and
sort_direction filter on attributes: comma-separated values match any of
them, different names must all match.
… validate the filters

Only the requested page of matching Customers is loaded, ordered by
customer_id; attributes are read in one connector call; reserved OBP query
parameters are not taken for attribute names; a filter without a value is
refused with OBP-10034; a connector failure fails the request.
…e and dangling attributes of v7.0.0 customers
@sonarqubecloud

Copy link
Copy Markdown

@simonredfern
simonredfern merged commit 474d4bc into OpenBankProject:develop Nov 10, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants