Customers created_at_min is not returning the expected results

Highlighted
New Member
3 0 0

The customer API filtered by the created_at_min does not seem to work. It is returning an empty array while there are customers created after the specific date time.  Please advise !!!  Grtz Mark

 

Method: GET
--------------------
URL: https://{{apikey}}:{{password}}@{{yourstore}}.myshopify.com/admin/customers.json
--------------------
Param to filter: created_at_min = 2020-06-11T00:08:38+02:00
*note: created_at_min is used to get customers created after the provided datetime like above
--------------------
Isuue: Above API endpoint should get the customers created after the provided datetime (format is correct), but its not getting
records correctly,sometime it get the customers created after a date correctly but mostly its skipping the customers.
Therefore, our integration with third pary software being hit badly by this issue.
--------------------
Test Case = Following url and filter field should get the 2 customers created after the provided datetime.

URL: https://{{apikey}}:{{password}}@{{yourstore}}.myshopify.com/admin/customers.json?created_at_min=2020-06-11T09:39:24+02:00

But its returing empty json array in response:
"{
"customers": []
}"
---------------------
Expected Result:

It should have returned following 2 customers created after => 2020-06-11 09:39:24 (Format: 2020-06-11T09:39:24+02:00 )

1)"id": 3137275133988, "first_name": "Paulus", "last_name": "Kraan", "created_at": "2020-06-11T09:43:43+02:00",
2)"id": 3137329463332, "first_name": "Jan", "last_name": "Willem","created_at": "2020-06-11T10:08:10+02:00",

0 Likes
Highlighted
Shopify Staff
Shopify Staff
464 57 91

Hey @Mark_Peeters,

Do you know if your client is encoding the URL before it's sent? When a timezone contains the + symbol, it needs to be encoded when sent as part of the URL, otherwise it's interpreted as a space which causes the timestamp to be ignored.

An easy way to test is to manually replace + in your URL with the encoded version %2B and try sending the call again.

/admin/customers.json?created_at_min=2020-06-11T09:39:24%2B02:00

If you get the expected results, this suggests your client wasn't encoding the URL previously.

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Highlighted
New Member
3 0 0
Hi,

Thx for your answer but we tested this and this is not the sollution.


The suggested solution you suggested is not working. We dont have a space between the date and time. See following date-time has no space where you think of encoding it. created_at_min: 2020-06-11T09:43:43+02:00

This response always comes from the server, since our application is hosted on shopify so shopify is the one responsible for returning a response as described in their own documentation.


0 Likes
Highlighted
New Member
3 0 0

The call is exactly as described in the documentation. But it does not return a result.

Please advice . 

0 Likes