Jump to content

Webservice api filter method is not working


kirubanidhi

Recommended Posts

Webservice api is not working . I changed '_PS_MODE_DEV_' to false.

 

Code Config/defines_inc.php

/* Debug only */

define('_PS_MODE_DEV_', false);

 

URL 1:

http://pts.local/api/orders?date=1&limit=0%2C1000&filter[date_add]=%3E[2017-09-18+06%3A11%3A38]

above this url is working.

 

URL 2:

http://pts.local/api/addresses?filter[id_customer]=[28358]

 

<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">

<errors>

<error>

<message>

<![CDATA[

Internal error. To see this error please display the PHP errors.

]]>

</message>

</error>

</errors>

</prestashop>

 

I want to work on both urls. Why first url is working and second url is not working. i dont have any idea. please let me know yours suggestion.
Edited by kirubanidhi (see edit history)
Link to comment
Share on other sites

  • 1 year later...

I have a similar problem with PS 1.7.5.2: for some customers webservice filtering works, for some doesn't, e.g., ..api/customers?filter[id]=3 returns info, but for api/customers?filter[id]=9 it does not return:

<?xml version="1.0" encoding="UTF-8"?>
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
<customers>
</customers>
</prestashop>

But if I specify the ID in ...api/customers/9, the customer info is returned.

The problem is that I inserted those customers via api and they have their id_shop fields=0

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...