メインコンテンツへスキップ
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 Shipment を作成を再度呼び出してください。新しい呼び出しでは新しい returnRequestId、shipmentId、labelId が返されます。キャンセルした返品リクエストは 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).