# Change Order status with API

**URL:** <https://forum.shopware.com/t/change-order-status-with-api/103798>\
**Category:** Shopware 5\
**Created:** [22. April 2024 um 09:26 UTC](https://forum.shopware.com/t/change-order-status-with-api/103798 "2024-04-22T09:26:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![alen](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@alen](https://forum.shopware.com/u/alen)\
**Post date:** [22. April 2024 um 09:26 UTC](https://forum.shopware.com/t/change-order-status-with-api/103798/1 "2024-04-22T09:26:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![alen](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@alen](https://forum.shopware.com/u/alen)\
**Post date:** [22. April 2024 um 09:50 UTC](https://forum.shopware.com/t/change-order-status-with-api/103798/2 "2024-04-22T09:50:52Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![alen](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@alen](https://forum.shopware.com/u/alen)\
**Post date:** [24. April 2024 um 21:24 UTC](https://forum.shopware.com/t/change-order-status-with-api/103798/3 "2024-04-24T21:24:49Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![brettvormkopp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/brettvormkopp/32/7788_2.png) [@brettvormkopp](https://forum.shopware.com/u/brettvormkopp)\
**Post date:** [26. April 2024 um 06:30 UTC](https://forum.shopware.com/t/change-order-status-with-api/103798/4 "2024-04-26T06:30:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![alen](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@alen](https://forum.shopware.com/u/alen)\
**Post date:** [3. Mai 2024 um 14:58 UTC](https://forum.shopware.com/t/change-order-status-with-api/103798/5 "2024-05-03T14:58:06Z")

</div>

So Shopware does NOT send email on order status change?

---

<div class="post-metadata">

**Author:** ![brettvormkopp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/brettvormkopp/32/7788_2.png) [@brettvormkopp](https://forum.shopware.com/u/brettvormkopp)\
**Post date:** [4. Mai 2024 um 15:23 UTC](https://forum.shopware.com/t/change-order-status-with-api/103798/6 "2024-05-04T15:23:04Z")

</div>

only in the backend , not in the API

---

<div class="post-metadata">

**Author:** ![alen](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@alen](https://forum.shopware.com/u/alen)\
**Post date:** [7. Mai 2024 um 15:18 UTC](https://forum.shopware.com/t/change-order-status-with-api/103798/7 "2024-05-07T15:18:23Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![brettvormkopp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/brettvormkopp/32/7788_2.png) [@brettvormkopp](https://forum.shopware.com/u/brettvormkopp)\
**Post date:** [7. Mai 2024 um 16:35 UTC](https://forum.shopware.com/t/change-order-status-with-api/103798/8 "2024-05-07T16:35:08Z")

</div>

yes, only if you change that in the backend.
