Is there any way to cancel order via REST API?

Hi,

I want to cancel an order via REST API. I couldn’t find it to do it. Is there any way to do it?

Hi,
yes, you need to update the order record with

{
“statut”: “-1”
}

This will then mark the object as cancelled.

Matt

Hi,
it seems like it’s not possible to cancel an order using API anymore on Dolibarr 14…
As you say @mattsidnell, we have to update the order record with {“statut”:"-1"}, but it doesn’t seem to work in my code and in the API explorer too :
“message”: “Bad Request: Error while updating availability”

This comes from ‘api_orders.class.php’ file on line 644 :
if ($this->commande->availability($this->commande->availability_id) < 0)

Is there another way to cancel an order using the API…?

Thanks