Bug Description
The contacts API only supports listing all contacts with basic pagination (skip/limit),
but there is no way to search or filter contacts by organisation name. As the number of
contacts grows, users have to scroll through all of them to find what they need.
Current Behavior
GET /api/v1/contacts/?skip=0&limit=100 returns all contacts without any filtering capability.
Expected Behavior
Users should be able to filter contacts by organisation name, e.g.:
GET /api/v1/contacts/?search=Acme
This should perform a case-insensitive partial match on the organisation field.
Acceptance Criteria
- Add an optional
search query parameter to GET /api/v1/contacts/
- Filter should be case-insensitive and support partial matches
- Search should apply alongside existing
skip/limit pagination
- The
count in the response should reflect the filtered total, not the overall total
- Add a test for the new search functionality
Bug Description
The contacts API only supports listing all contacts with basic pagination (
skip/limit),but there is no way to search or filter contacts by organisation name. As the number of
contacts grows, users have to scroll through all of them to find what they need.
Current Behavior
GET /api/v1/contacts/?skip=0&limit=100returns all contacts without any filtering capability.Expected Behavior
Users should be able to filter contacts by organisation name, e.g.:
GET /api/v1/contacts/?search=AcmeThis should perform a case-insensitive partial match on the
organisationfield.Acceptance Criteria
searchquery parameter toGET /api/v1/contacts/skip/limitpaginationcountin the response should reflect the filtered total, not the overall total