メインコンテンツまでスキップ

PATCH /v1/orders/{id}/status

scope

write_shipping

リクエストパラメーター

名前位置必須説明
idパスinteger必須order_id
Idempotency-Keyヘッダーstring必須冪等キー(必須・ADR-010)。UUID v4 推奨。同一キー再送は保存レスポンスを再生
statusボディenum(partial_shippedshippedre_shipped

レスポンスの例

{
"order_id": 0,
"status": "string",
"previous_status": "string"
}

解説

注文の出荷ステータスを遷移します。可能な遷移は prepared → partial_shipped → shipped → re_shipped / returned の出荷系のみで、遷移元の妥当性はサーバが原子的に検証します(不正な遷移は 409 invalid_transition)。変更はマーチャントの修正ログに記録されます。Idempotency-Key 必須。

エラーレスポンスの例

{
"error": {
"code": "insufficient_scope",
"message": "requires scope 'read_orders'",
"request_id": "req_01H..."
}
}

返しうるエラー: 401 / 403 / 404 / 409 / 503