跳转到主要内容
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).