查詢組合品庫存
依組合 SKU 序號查詢組合品自身的庫存額度:inventoryQuantity 是組合品自身的在庫數,availableQuantity 是扣掉未出貨訂單佔用後的可售數,isNegativeStockAllowed 為 true 時表示自身不限量。
id 不存在、屬於其他租戶,或指向一般規格時,一律回傳 404 not_found;一般規格的庫存請改查 GET /v1/skus/{id}/stock。
Authentication
X-Signaturestring
每個 /v1 請求都必須帶 X-Client-Id、X-Timestamp、X-Nonce 與 X-Signature 四個標頭。X-Signature 是以 client secret 對 canonical string 做 HMAC-SHA256 後的 Base64。
canonical string 的組成、可複製的簽章範例與 401 排查步驟,請參閱「驗證與簽章」。
Path parameters
id
要查詢庫存的組合 SKU 序號。不存在、屬於其他租戶,或指向一般規格時,一律回傳 404 not_found。
Response
OK
bundleId
組合 SKU 序號。
inventoryQuantity
組合品自身的在庫數,尚未扣除未出貨訂單的佔用。
availableQuantity
組合品自身的可售數,等於 inventoryQuantity 扣掉未出貨訂單佔用的部分;可能是負數。
isNegativeStockAllowed
true 時組合品自身不限量,只看組成規格。
Errors
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error