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

POST /v1/reservations/{id}/confirm

scope

write_reservations

リクエストパラメーター

名前位置必須説明
idパスstring必須reservation_id
Idempotency-Keyヘッダーstring必須冪等キー(必須・ADR-010)。UUID v4 推奨。同一キー再送は保存レスポンスを再生
item_idボディinteger必須予約対象の商品 ID(台帳キーの一部)

レスポンスの例

{
"reservation_id": "string",
"item_id": 0,
"qty": 0,
"status": "reserved",
"expires_at": "string",
"available": 0
}

解説

予約を確定します(決済成功後に呼びます)。確定した数量は非同期で本体在庫に反映されます(応答は反映を待ちません)。期限切れ・解放済みの予約は 409 invalid_state になります。Idempotency-Key 必須。

エラーレスポンスの例

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

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