Jump to content

Prestashop's RESTful Webservice and updating orders


Recommended Posts

Hi,

 

It should be possible to use the RESTful Webservice of Prestashop to update an order's status (ie: from "payment accepted" to "shipped"). But does this also implicate that an email is sent to the customer?

 

I did some research but didn't found a good documentation about details of the the RESTful interface like which resources there are and how to use them. Is there a good documentation or reference besides the very basic one? http://doc.prestasho...REST+webservice

 

Ie: I would be interested in how to add the order_status "shipped" to an existing order and have an email sent to the customer like it is done when you set the status to the order in the backend of Prestashop.

 

I appreciate your hints.

 

BR Tom

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...

No, at least I didn't get it to work.

So I decided to do it the dirty way and emulate the user behavior by posting to the actual Web backend :-(

 

Not nice but there is no support here anyways.

Link to comment
Share on other sites

  • 5 months later...

Hi,

 

Is there any news ?

 

I would like to do some steps like the back office but from the webservice. However there are ressources which do not implement update, create and delette (as stock_movements). Why are they unimplemented ? What should I do ?

 

Any advice ?

 

Regards

Link to comment
Share on other sites

  • 1 month later...

Hi,

 

It should be possible to use the RESTful Webservice of Prestashop to update an order's status (ie: from "payment accepted" to "shipped"). But does this also implicate that an email is sent to the customer?

 

I did some research but didn't found a good documentation about details of the the RESTful interface like which resources there are and how to use them. Is there a good documentation or reference besides the very basic one? http://doc.prestasho...REST+webservice

 

Ie: I would be interested in how to add the order_status "shipped" to an existing order and have an email sent to the customer like it is done when you set the status to the order in the backend of Prestashop.

 

I appreciate your hints.

 

BR Tom

Hi,

 

Is there any news ?

 

I would like to do some steps like the back office but from the webservice. However there are ressources which do not implement update, create and delette (as stock_movements). Why are they unimplemented ? What should I do ?

 

Any advice ?

 

Regards

 

Hello,

 

I am in this point. I create order since Webservice and the status is "Payment remotely accepted". I see that the stock not decrease. For this reason, i try change the status to "Shipped" by Webservice but i can`t do it.

 

¿Some idea?

 

Regards and thanks

Link to comment
Share on other sites

  • 3 months later...

I'm also trying to use the webservice to update the order_status. Am I correct assuming that the PUT operation needs the complete order xml, as received by GET, to update the order? Preferrably I would only send the id of the order and the new order status, but that doesn't seem to work. I'm not using the sample prestashop webservice client.

Link to comment
Share on other sites

  • 5 months later...
  • 1 year later...

Hi, just in case someone still looking for it, the order state can be changed using order_histories resource. If you wan't to do in php, this answer can help you: https://www.prestashop.com/forums/topic/221403-changing-order-status-vith-php/

 

Just to add some important note, when using webservices, your first order_state will always be PS_OS_WS_PAYMENT, or "remote payment accepted". As this didn't fit my needs, I changed the description and options, removing all options. This mark the order as not validated, which I can make the payment in another phase. Then I created another order_state to mark order as validated. To finish, I called order_payments with payment and transactions info, and changed state with order_histories and worked great, decreasing stock at the right time.

 

Hope this can help someone. I spent some time discovering how it works.

 

Eder 

Link to comment
Share on other sites

  • 10 months later...
×
×
  • Create New...