Jump to content

webservices: filter with "or" operator


romain+podbox

Recommended Posts

Hello,

 

What is the correct grammar if I want to retrieve addresses for customer x and y? Between these two:

 

  •  api/addresses?filter[id_customer]=[x|y]
  •  api/addresses?filter[id_customer]=[x,y]

 

 

Actually, I think I found an error in prestashop french translation:

 

http://doc.prestashop.com/display/PS14/Chapter+8+-+Advanced+Use

Under "Rendering filters" section:

"

Only include the first and last names of customers "customers" whose ids are between 1 and 5

URL: (Store URL)/api/customers/?display=[firstname,lastname]&filter[id]=[1|5]

"

 

http://doc.prestashop.com/pages/viewpage.action?pageId=720952

Under "Filtres de rendu":

"

N'inclure que les noms et prénoms des clients "customers" ayant l'id 1 et 5

URL: (URL de la boutique)/api/customers/?display=[firstname,lastname]&filter[id]=[1|5]

"

 

My tests indicates that the french version is correct, the "|" operator seems to behave like a "or" operator, though I am a bit confused.

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...