Jump to content

xml schema on webservice Api changed from 1.6.0.9 to 1.6.0.11


Ecom.Agora

Recommended Posts

Hi,

we have noticed that the xml schema of orders in webservice api is canghed from 1.6.0.9 to 1.6.0.11.

There's no evidence of this change in your changelog.

We have out software that use api calls to retrieve information about orders, when we have updated our test version to 1.6.0.11, our software breaks.

The reason, after some investigation is that the current_state of xml schema is now (1.6.0.11) not filterable (we got an error :"The current_state id a dinamic field and now is not filterable..".

We now that the filed is dinamic, infact we filtered the orders by status, now this is not possible.

There's a workaround? Can we hope a xml schema change with current_state filterable?

Now, we have this stange configuration with production version 1.6.0.9 'bugged version', and a test server with 1.6.0.11 more secure and with more featured, but unusable in production environment.

 

Can anyone help us?

 

  • Like 1
Link to comment
Share on other sites

There are 2 things I can share, which might help you to solve the problems. At least, they helped me:

  1. There is a bug in the Order Class which brakes the WebService, and it is documented here: PSCSX-4403 and PSCSX-4423
    The fix is described here
     
  2. Orders cannot be filtered using "current_state" filter anymore. (The system returns error that this filter is dynamic (?) and cannot be used)
    So, if you were using it in the calls to API, then you have to redo/reprogramm your codes. You can pull out all the orders and do status check of each of them one-by-one.

I hope this helps.

Link to comment
Share on other sites

Augustas thanks for the tips. I'm halfway to the solution. Changing order.php made it possible again to retrieve the orders in sendcloud. But it only reads order id, status, and date. Could be because of the filter problem. I've contacted back again with Sendcloud. As soon as it is resolved i'll let you know.

Link to comment
Share on other sites

Hello Luchtdichtshop,

 

How did you "reinstall" the webservice? Was it on the "Sendcloud", or did you Disabled-then-Enabled webservice inside your Prestashop's "Advanced Parameters"?

 

Are you using "current_state" filters? Do they work after "reinstallation" of webservice?

 

Thank you.

Link to comment
Share on other sites

Actually I've installed a new webservice and deleted the old one. Sendcloud is a company that offers services on sending parcels (see www.sendcloud.nl (Dutch only)). They have made an prestashop module which retrieves address info for the labels on parcels.

 

 

To be honest I have no idea how their module works and if they use "current_state" filters. I've mailed them this discussion and your links. So they can check their software. Other customers might have the same problem.

 

I expect an answer from them not sooner as monday. But when i do, I'll share it.

Link to comment
Share on other sites

We have found a workaround.

 

The order_state is filterable on order_history api.

So we can get all orders id from order_history and then retrieve orders from order Api.

 

Thank you! That's useful.

Indeed filter /order_histories/?filter[id_order_state]=4  works.

Link to comment
Share on other sites

  • 3 months later...

Ecom.Agora - I was not using "order_state" till now, but after starting to analyse this filter, the problem is that it does not return all the orders with state=4 at the moment

It returns all history recordings when orders had state=4 in the past, but now they might have changed the status.

 

Anyone got a solution for Prestashop 1.6.0.11 an later - how to filter orders only with specific STATE at the moment?

Link to comment
Share on other sites

I decided to use the following API URL request:

/api/orders?display=full&filter[date_add]=>[YYYY-MM-DD]&date=1

replace YYYY-MM-DD with a valid date.

 

This returns detailed information about all the orders created from YYYY-MM-DD.

In the details of each order I can see the "order_state", which helps to decide what to do with the order next in the API application.

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