更新订单
在一次 API 请求中更改订单状态、付款状态或同时更改两者。
PATCH
/api/v1/orders/{order_id}cURL 请求
curl --disable --globoff --fail-with-body --silent --show-error \
--proto '=https' --connect-timeout 5 --max-time 30 \
--request PATCH \
--url https://shop.onshopently.com/api/v1/orders/order-0000 \
--header 'Authorization: Bearer EXAMPLE_ACCESS_TOKEN' \
--header 'Idempotency-Key: example-order-update' \
--header 'Content-Type: application/json' \
--data-raw '{"payment":{"expected_version":0,"status":"paid"},"status":{"expected_version":1,"status_id":"status-1"}}'
响应
{
"data": {
"deleted": false,
"id": "order-0000",
"version": null,
"versions": {
"payment": 2,
"status": 2
}
},
"meta": {
"request_id": "example"
}
}