我们如何使用 API. 更新 shopware 6 订单?

How we can update shopware 6 order using API.?

我想使用 API 更新 shopware 6 中的订单,正如我检查过的,我们可以使用下面的 URL

获取订单
https://www.test.shop/api/order/54d47cc4d612345678901f7608fbebe2

但是,我想使用 API 更新订单。

正如我所检查的那样,它在 shopware 5 中具有以下 link

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

应该传递哪些细节以及我们如何在上面使用 put 方法。

谢谢。

它与 Shopware 6 的工作方式类似。如果您有测试系统(非生产系统),您可以在 /api/_info/swagger.html 查看 API 概述。

你应该看看 /api/_info/swagger.html#/Order/updateOrder

PATCH /order/{id}

还有 API 个用于订单地址、客户、交货、订单项和交易的端点。

你也可以看看这个:https://shopware.stoplight.io/docs/store-api/storeapi.json/paths/~1order~1payment/post