跳轉到主要內容
POST
Cancel return label
此頁面由 AI 自動翻譯。API 技術規格以英文呈現為標準。如有任何疑問,請參閱英文版本。
取消由建立 Return Shipment 產生的退貨面單。請傳入建立回應或 labelGenerated webhook 中的 labelId。

可取消面單的條件

必須同時符合以下所有條件。任一條件不符合時,呼叫會傳回驗證軟錯誤——HTTP 200,meta.status: 400,meta.errorCode: VALIDATION_FAILED——錯誤訊息位於 meta.error.labelId。詳見錯誤代碼。 cancelCutoffTime 會隨 labelGenerated webhook 中的面單一併推送,也會由取得 Return Shipment 詳情傳回。

取消成功後

取得 Return Shipment 詳情會傳回: 已取消的面單不會再傳回。如之後需要,請在您的系統中保存其 labelId。

修正運貨單

已取消的 Return Request 無法再取得新面單。如需修正運貨單,請先取消面單,再以修正後的資料重新呼叫建立 Return Shipment。新的呼叫會傳回新的 returnRequestId、shipmentId 與 labelId。已取消的 Return Request 會維持 label-canceled。

等冪性

x-returnhelper-idempotency-key 標頭為選填。未帶此標頭的呼叫會正常執行,但不具備防重複的保護。請參閱等冪性。

授權

x-rr-apikey
string
header
必填

Your API key

x-rr-apitoken
string
header
必填

Your API token — keep this private

主體

application/json
labelId
integer<int64>
必填

ID of the label to cancel, as returned by Create return shipment and the labelGenerated webhook

回應

Success — returns the standard response envelope with no additional payload fields. Inspect meta.status to confirm the label was cancelled.

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).