Search code examples
apishopware

How we can update shopware 6 order using API.?


I would like to update the order in shopware 6 using API, As I have checked we can fetch order using the below URL

https://www.test.shop/api/order/54d47cc4d612345678901f7608fbebe2

But, I would like to update the order using API.

As I have checked it was in shopware 5 with the below link

https://developers.shopware.com/developers-guide/rest-api/examples/order/#example-3-update-an-order

What the details should be pass and how we can use put method on this.

Thank you.


Solution

  • It works similar with Shopware 6. If you have a test system (not production) you can see the API overview at /api/_info/swagger.html.

    You should have a look at /api/_info/swagger.html#/Order/updateOrder.

    PATCH /order/{id}
    

    There are also API endpoints for order address, customer, delivery, line item and transaction.

    You might also checkout this: https://shopware.stoplight.io/docs/store-api/storeapi.json/paths/~1order~1payment/post