Request to GET /admin/api/2020-01/customers/search.json? returning status 200, but no data

New Member
3 0 1

Im trying to make a request to the following endpoint GET /admin/api/2020-01/customers/search.json? from my node.js backend with fetch, but it is not working. I get a response with status 200, but without any kind of data.

 

However, it works properly when I do the request from Postman.

 

This is the response Im getting from my backend:

{
"accessToken": {
"url": "",
"status": 200,
"statusText": "OK",
"headers": {},
"ok": true,
"body": {
 "_writeState": {},
"_readableState": {},
"readable": true,
"_events": {},
"_eventsCount": 6,
"_writableState": {},
"writable": true,
"allowHalfOpen": true,
"_transformState": {},
"_hadError": false,
"bytesWritten": 0,
"_handle": {},
"_outBuffer": {},
"_outOffset": 0,
"_chunkSize": 16384,
"_defaultFlushFlag": 0,
"_finishFlushFlag": 4,
"_defaultFullFlushFlag": 3,
"_level": -1,
"_strategy": 0
},
"bodyUsed": false,
"size": 0,
"timeout": 0,
"_raw": [],
"_abort": false
}
}

Any idea whats going on?

0 Likes
Highlighted
Shopify Partner
98 20 21

Hi Tomas,

 

Can you post the nodeJs code you're using to make the request?

 

Also, shouldn't the url be appended with a query param?

 

e.g. /admin/api/2020-01/customers/search.json?query=Bob country:United States

- Yes, we build Shopify Apps. Hit me with your idea: https://vellir.tech
- Let customers preview your products and easily add them to cart with Peek Mode
- Add free, good looking social share icons with built-in analytics to your store with Share Lab
0 Likes