Skip to main content
Answer

REST API: how do I find a customer by email address?

  • September 4, 2024
  • 1 reply
  • 64 views

Forum|alt.badge.img+2

I've tried this GET method but I just get an invalid type cast error:
https://sandbox.com/entity/Default/22.200.001/Customer?$expand=PrimaryContact&$filter=PrimaryContact.Email eq 'kylelauridsen86@gmail.com'

Best answer by Dmitrii Naumov

You should use / to specify a field of a child entity.

{{sitename}}/entity/Default/23.200.001/Customer?$expand=PrimaryContact&$filter=PrimaryContact/Email eq 'dean@bartending.con'

1 reply

Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • Answer
  • September 4, 2024

You should use / to specify a field of a child entity.

{{sitename}}/entity/Default/23.200.001/Customer?$expand=PrimaryContact&$filter=PrimaryContact/Email eq 'dean@bartending.con'