cancel
Showing results for 
Search instead for 
Did you mean: 

REST API Search Customer

REST API Search Customer

Hi everyone - I hope I am posting this in the right place.

I am having issues while trying to Search Customers in the API for a client using Magento Community Editions.

Here's the input and output of my query - as you can see it does not return much...

I tried with both 0 and 1 as the current page but got the same response.

 

Input:

{
	"access_token": "rk... <**--removed--**>",
	"host": "st... <**--removed--**>",
	"pageSize": 100,
	"from_to_filter": {
		"from": {},
		"to": {}
	},
	"sort": {
		"direction": "DESC",
		"field": "created_at"
	},
	"currentPage": 0
}

Output: 

{
	"type": "Buffer",
	"data": []
}

Are there restrictions for Community Editions users?

Or is there something else I can do?

Let me know if there is additional information I can give to help solving this.

Thank you in advance for your help!

 

2 REPLIES 2

Re: REST API Search Customer

Hello @celine_lapouge 

 

Take a look at here to get the clue for your issue.

https://magento.stackexchange.com/questions/265967/magento-2-rest-api-for-search-customer-by-name

and see Magento default devdocs for REST API 

https://devdocs.magento.com/guides/v2.3/rest/performing-searches.html

 

 

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now

Re: REST API Search Customer

Hi, and thank you for your response!

Unfortunately it isn't working still.

 

I tried looking for customers via their phone number, but I still get the "Buffer" output.

 

Here's the input:

{
	"access_token": "rk... <**--removed--**>",
	"filter": [
		{
			"condition_type": "in",
			"field": "phone",
			"value": [
				"+12039198068",
				"+1 203-919-8068",
				"(203) 919-8068"
			]
		}
	],
	"host": "st... <**--removed--**>",
	"pageSize": 100,
	"from_to_filter": {
		"from": {},
		"to": {}
	},
	"sort": {},
	"currentPage": 0
}

 

Output:

{
	"type": "Buffer",
	"data": []
}

 

This is for my client who is using the Community Editions

When I try the same thing in my Magento account, it works and returns the customer who matches the phone number.

Could this be due to a Community Editions restriction?