Jump to content

Webservice filter


wallink
 Share

Recommended Posts

Hello.

I wonder if there is any filter on the webservice?

For example if I want all orders with a specific status or all orders created after a specific date.

is this possible in some way?

Share this post


Link to post
Share on other sites

As I didn't get any answer I tried to find the answer in the source code.

I found that you have a few filtering options:

display:

www.yourshop.com/shop/api/orders?display=VALUE

Where VALUE can be changed to 'full' or '[current_status,id...]'

display makes it possible to specify which fields should be included in the result

limit:

example limit=5 (gives 5 results), limit=5,15 (gives 10 results)

sort:

example: sort=id_ASC, sort=current_status_DESC

filter:

I know it is there but haven't figured out what to give. does anybody know?

Share this post


Link to post
Share on other sites

Thanks.

Another thing then. It workes with most fields but not 'current_state' for order which is the one I want to filter on.

on the order I can see not_filterable="true", but why is current_state not filterable?

Share this post


Link to post
Share on other sites

Thanks again. I almost have everything I'm looking for:)

The last thing I'm missing is payment information for orders.

What I need is the id that the different payment modules leaves that is connected to the order.

Some I know puts it in the order message and I guess other also puts it in the payment_cc table, but none of these can be retreived using the api, or can it?

Also, is tha payment id or transaction id ever placed in any other location?

Share this post


Link to post
Share on other sites

  • 2 weeks later...
  • 3 years later...
  • 5 months later...

Hello,
I just upgraded to the latest version prestashop, before doing a filter field current_status on the orders table, but now I read that it is no longer filterable, how do I fix?

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More