Skip to content

REST customers/search endpoint does not allow searching of child address fields #35586

@toby11

Description

@toby11

Preconditions and environment

2.4.2-p2

Fresh installation with sample data.

Steps to reproduce

When performing a search using the customers/search end point like this

searching by email which is in the main customer object works fine

https://www.xxx.com/rest/V1/customers/search?searchCriteria[filterGroups][0][filters][0][field]=email&searchCriteria[filterGroups][0][filters][0][value]=test@test.com&searchCriteria[filterGroups][0][filters][0][condition_type]=like

however it seems its not possible to search by telephone number (or any other address field) which is contained in the addresses child object

I have tried addresses[telephone] as the field name :

https://www.xxx.com/rest/V1/customers/search?searchCriteria[filterGroups][0][filters][0][field]=addresses[telephone]&searchCriteria[filterGroups][0][filters][0][value]=1234123123&searchCriteria[filterGroups][0][filters][0][condition_type]=like

but I get the following response

The "%1" attribute name is invalid. Reset the name and try again.

I have also tried addressess.telephone as well but same result

Expected result

a list of customer records matching the address field I searched for.

Actual result

The "%1" attribute name is invalid. Reset the name and try again.

error is returned.

Additional information

I feel the severity is high as its makes the search endpoint pretty useless.

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Ready for Grooming

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions