Change Order status with API

Hi all,

how to change order status with API call, I tried PUT with following JSON but although it returns „success“ the status remains unchanged.

JSON:
{
„data“: {
„orderStatus“: {
„id“: 1,
„name“: „closed“,
„position“: 1,
„group“: „state“,
„sendMail“: 1
},
„orderStatusId“: 1
}
}

tried also (same result):
{
„data“: {
„orderStatusId“: 1
}
}

Please help.

I found out how to do it, with following JSON it changes status successfully BUT it does not send email to customer.

JSON:
{
„orderStatusId“: 2
}

So the question is, how to inititate Shopware to send email to customer on order status change made through API?

I am stuck with it, any ideas?
It should be simple, other platforms do it automatically, are there any settings I was unable to find?

Shopware does not send an email via API.
You also can not trigger that via API.

You need to create/buy a plugin for that.

So Shopware does NOT send email on order status change?

only in the backend , not in the API

Regardless of whether it’s triggered in the backend or through the API, the „order status change“ ultimately ends up in the database, so the conclusion is that Shopware doesn’t track that change in database, it just sends an email if you change the order status through the backend?

yes, only if you change that in the backend.