I use shopify admin api in this document. But I cannot search by phone number correctly.
curl -H “X-Shopify-Access-Token: xxx” ‘https://sparkshipping-test.myshopify.com/admin/api/2022-10/customers/search.json?query=id:6084334977182’
It shows customers:
{“customers”:[{“id":6084334977182,“email”:"xxx@gmail.com”,“accepts_marketing”:false,“created_at”:“2022-04-28T15:41:29+08:00”,“updated_at”:“2023-04-16T10:51:16+08:00”,“first_name”:“xxx”,“last_name”:“xxx”,“orders_count”:11,“state”:“enabled”,“total_spent”:“8858.53”,“last_order_id”:4963346481310,“note”:“”,“verified_email”:true,“currency”:“CNY”,“phone”:“+8618957150298” …
when I use phone number to search:
curl -H “X-Shopify-Access-Token: xxx” ‘https://sparkshipping-test.myshopify.com/admin/api/2022-10/customers/search.json?query=phone:+8618957150298’
it shows:
{“customers”:}
I think phone parameter works sometimes, because I use other phone and it can return customers, but I do not understand in which condition it cannot work.
Did anyone meet this situation?