跳轉到主要內容
POST
/
api
/
ReturnInventory
/
UpdateReturnInventoryHandling
Update return inventory handling
curl --request POST \
  --url https://api.returnshelper.com/uat/user/api/ReturnInventory/UpdateReturnInventoryHandling \
  --header 'Content-Type: application/json' \
  --header 'x-rr-apikey: <api-key>' \
  --header 'x-rr-apitoken: <api-key>' \
  --data '
{
  "returnInventoryId": 123,
  "handlingCode": "<string>"
}
'
{
  "correlationId": "<string>",
  "meta": {
    "status": 123,
    "data": {},
    "errorCode": "<string>",
    "error": {}
  }
}
此頁面由 AI 自動翻譯。API 技術規格以英文呈現為標準。如有任何疑問,請參閱英文版本
更新單筆退件庫存紀錄的處理決定——告訴倉庫該如何處置已收到的包裹。多於倉庫登記包裹後呼叫;自此庫存便會沿著所選處理路徑(入庫、銷毀、召回、補寄等)繼續。

何時呼叫

  • 客服或營運團隊決定處理方式後。

必填欄位

  • returnInventoryId — 長整數;必須存在且屬於您的帳戶。倉庫登記包裹時由 newInventoryCreated webhook 事件推送;請在自有端快取以備後續操作。webhook 流為庫存 ID 的真實資料來源。
  • handlingCode — 字串,必須是 取得所有處理類型 回傳的值之一。不能直接使用 rsd(補寄)或 tbc(待確認)——這兩類有專屬端點。常用值:ohd(暫存)、rtn(退回)、rst(入庫)、dsp(銷毀)。
特殊例外:若目前 handlingStatusCodepending 且新處理為 ohd(暫存),呼叫始終允許——便於在調查期間將庫存掛起。 下列情況無法更新處理:
  • 庫存所屬行項目存在待處理的 VAS(加值服務)請求。請先透過 取得所有 VAS 與 VAS 端點取消或完成 VAS。

副作用

  • 庫存紀錄上的 handlingCodehandlingStatusCode 會被更新。
  • 若新處理不是 ohdoth(其他),將鎖定 RMA 對映以禁止對該庫存進行 RMA 交換。

相關

授權

x-rr-apikey
string
header
必填

Your API key

x-rr-apitoken
string
header
必填

Your API token — keep this private

主體

application/json
returnInventoryId
integer<int64>
必填

Return inventory ID to update handling for

handlingCode
string
必填

Handling code to apply

回應

Success

Universal response envelope. Successful responses include the business payload as additional top-level fields alongside correlationId and meta. Failed responses (auth errors, validation errors) only populate correlationId and meta, with meta.errorCode and meta.error describing the failure.

correlationId
string | null

Unique correlation ID for tracing the request through Return Helper systems.

meta
object

Application-level metadata for every API response. Inspect status and errorCode to detect soft-error responses (validation failures arrive as HTTP 200 with meta.status: 400).