Create return shipment
curl --request POST \
--url https://api.returnshelper.com/uat/user/api/ReturnShipment/createReturnShipment \
--header 'Content-Type: application/json' \
--header 'x-rr-apikey: <api-key>' \
--header 'x-rr-apitoken: <api-key>' \
--data '
{
"serviceTypeCode": "fedex_ground",
"orderTitle": "Return Label Title",
"totalValue": 100,
"totalValueCurrency": "usd",
"shipment": {
"shipToWarehouseId": 2,
"boxType": "cus",
"shipFrom": {
"country": "usa",
"contactName": "Your name",
"street1": "Some address line 1",
"state": "tx",
"city": "Houston",
"postalCode": "77235",
"phone": "15622708183",
"email": "user@example.com",
"fax": "<string>",
"street2": "Some address line 2",
"street3": "<string>"
},
"parcel": {
"weight": 10.5,
"weightUnit": "g",
"length": 10,
"width": 10,
"height": 10,
"dimensionUnit": "cm",
"items": [
{
"description": "Test item",
"weight": 10.5,
"value": 100,
"weightUom": "g",
"valueCurrencyCode": "usd"
}
]
},
"sellerReferenceNumber": "<string>",
"customFieldMap": {}
},
"sellerReferenceNumber": "<string>",
"remarks": "<string>"
}
'import requests
url = "https://api.returnshelper.com/uat/user/api/ReturnShipment/createReturnShipment"
payload = {
"serviceTypeCode": "fedex_ground",
"orderTitle": "Return Label Title",
"totalValue": 100,
"totalValueCurrency": "usd",
"shipment": {
"shipToWarehouseId": 2,
"boxType": "cus",
"shipFrom": {
"country": "usa",
"contactName": "Your name",
"street1": "Some address line 1",
"state": "tx",
"city": "Houston",
"postalCode": "77235",
"phone": "15622708183",
"email": "user@example.com",
"fax": "<string>",
"street2": "Some address line 2",
"street3": "<string>"
},
"parcel": {
"weight": 10.5,
"weightUnit": "g",
"length": 10,
"width": 10,
"height": 10,
"dimensionUnit": "cm",
"items": [
{
"description": "Test item",
"weight": 10.5,
"value": 100,
"weightUom": "g",
"valueCurrencyCode": "usd"
}
]
},
"sellerReferenceNumber": "<string>",
"customFieldMap": {}
},
"sellerReferenceNumber": "<string>",
"remarks": "<string>"
}
headers = {
"x-rr-apikey": "<api-key>",
"x-rr-apitoken": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-rr-apikey': '<api-key>',
'x-rr-apitoken': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
serviceTypeCode: 'fedex_ground',
orderTitle: 'Return Label Title',
totalValue: 100,
totalValueCurrency: 'usd',
shipment: {
shipToWarehouseId: 2,
boxType: 'cus',
shipFrom: {
country: 'usa',
contactName: 'Your name',
street1: 'Some address line 1',
state: 'tx',
city: 'Houston',
postalCode: '77235',
phone: '15622708183',
email: 'user@example.com',
fax: '<string>',
street2: 'Some address line 2',
street3: '<string>'
},
parcel: {
weight: 10.5,
weightUnit: 'g',
length: 10,
width: 10,
height: 10,
dimensionUnit: 'cm',
items: [
{
description: 'Test item',
weight: 10.5,
value: 100,
weightUom: 'g',
valueCurrencyCode: 'usd'
}
]
},
sellerReferenceNumber: '<string>',
customFieldMap: {}
},
sellerReferenceNumber: '<string>',
remarks: '<string>'
})
};
fetch('https://api.returnshelper.com/uat/user/api/ReturnShipment/createReturnShipment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.returnshelper.com/uat/user/api/ReturnShipment/createReturnShipment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'serviceTypeCode' => 'fedex_ground',
'orderTitle' => 'Return Label Title',
'totalValue' => 100,
'totalValueCurrency' => 'usd',
'shipment' => [
'shipToWarehouseId' => 2,
'boxType' => 'cus',
'shipFrom' => [
'country' => 'usa',
'contactName' => 'Your name',
'street1' => 'Some address line 1',
'state' => 'tx',
'city' => 'Houston',
'postalCode' => '77235',
'phone' => '15622708183',
'email' => 'user@example.com',
'fax' => '<string>',
'street2' => 'Some address line 2',
'street3' => '<string>'
],
'parcel' => [
'weight' => 10.5,
'weightUnit' => 'g',
'length' => 10,
'width' => 10,
'height' => 10,
'dimensionUnit' => 'cm',
'items' => [
[
'description' => 'Test item',
'weight' => 10.5,
'value' => 100,
'weightUom' => 'g',
'valueCurrencyCode' => 'usd'
]
]
],
'sellerReferenceNumber' => '<string>',
'customFieldMap' => [
]
],
'sellerReferenceNumber' => '<string>',
'remarks' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-rr-apikey: <api-key>",
"x-rr-apitoken: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.returnshelper.com/uat/user/api/ReturnShipment/createReturnShipment"
payload := strings.NewReader("{\n \"serviceTypeCode\": \"fedex_ground\",\n \"orderTitle\": \"Return Label Title\",\n \"totalValue\": 100,\n \"totalValueCurrency\": \"usd\",\n \"shipment\": {\n \"shipToWarehouseId\": 2,\n \"boxType\": \"cus\",\n \"shipFrom\": {\n \"country\": \"usa\",\n \"contactName\": \"Your name\",\n \"street1\": \"Some address line 1\",\n \"state\": \"tx\",\n \"city\": \"Houston\",\n \"postalCode\": \"77235\",\n \"phone\": \"15622708183\",\n \"email\": \"user@example.com\",\n \"fax\": \"<string>\",\n \"street2\": \"Some address line 2\",\n \"street3\": \"<string>\"\n },\n \"parcel\": {\n \"weight\": 10.5,\n \"weightUnit\": \"g\",\n \"length\": 10,\n \"width\": 10,\n \"height\": 10,\n \"dimensionUnit\": \"cm\",\n \"items\": [\n {\n \"description\": \"Test item\",\n \"weight\": 10.5,\n \"value\": 100,\n \"weightUom\": \"g\",\n \"valueCurrencyCode\": \"usd\"\n }\n ]\n },\n \"sellerReferenceNumber\": \"<string>\",\n \"customFieldMap\": {}\n },\n \"sellerReferenceNumber\": \"<string>\",\n \"remarks\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-rr-apikey", "<api-key>")
req.Header.Add("x-rr-apitoken", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.returnshelper.com/uat/user/api/ReturnShipment/createReturnShipment")
.header("x-rr-apikey", "<api-key>")
.header("x-rr-apitoken", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"serviceTypeCode\": \"fedex_ground\",\n \"orderTitle\": \"Return Label Title\",\n \"totalValue\": 100,\n \"totalValueCurrency\": \"usd\",\n \"shipment\": {\n \"shipToWarehouseId\": 2,\n \"boxType\": \"cus\",\n \"shipFrom\": {\n \"country\": \"usa\",\n \"contactName\": \"Your name\",\n \"street1\": \"Some address line 1\",\n \"state\": \"tx\",\n \"city\": \"Houston\",\n \"postalCode\": \"77235\",\n \"phone\": \"15622708183\",\n \"email\": \"user@example.com\",\n \"fax\": \"<string>\",\n \"street2\": \"Some address line 2\",\n \"street3\": \"<string>\"\n },\n \"parcel\": {\n \"weight\": 10.5,\n \"weightUnit\": \"g\",\n \"length\": 10,\n \"width\": 10,\n \"height\": 10,\n \"dimensionUnit\": \"cm\",\n \"items\": [\n {\n \"description\": \"Test item\",\n \"weight\": 10.5,\n \"value\": 100,\n \"weightUom\": \"g\",\n \"valueCurrencyCode\": \"usd\"\n }\n ]\n },\n \"sellerReferenceNumber\": \"<string>\",\n \"customFieldMap\": {}\n },\n \"sellerReferenceNumber\": \"<string>\",\n \"remarks\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.returnshelper.com/uat/user/api/ReturnShipment/createReturnShipment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-rr-apikey"] = '<api-key>'
request["x-rr-apitoken"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"serviceTypeCode\": \"fedex_ground\",\n \"orderTitle\": \"Return Label Title\",\n \"totalValue\": 100,\n \"totalValueCurrency\": \"usd\",\n \"shipment\": {\n \"shipToWarehouseId\": 2,\n \"boxType\": \"cus\",\n \"shipFrom\": {\n \"country\": \"usa\",\n \"contactName\": \"Your name\",\n \"street1\": \"Some address line 1\",\n \"state\": \"tx\",\n \"city\": \"Houston\",\n \"postalCode\": \"77235\",\n \"phone\": \"15622708183\",\n \"email\": \"user@example.com\",\n \"fax\": \"<string>\",\n \"street2\": \"Some address line 2\",\n \"street3\": \"<string>\"\n },\n \"parcel\": {\n \"weight\": 10.5,\n \"weightUnit\": \"g\",\n \"length\": 10,\n \"width\": 10,\n \"height\": 10,\n \"dimensionUnit\": \"cm\",\n \"items\": [\n {\n \"description\": \"Test item\",\n \"weight\": 10.5,\n \"value\": 100,\n \"weightUom\": \"g\",\n \"valueCurrencyCode\": \"usd\"\n }\n ]\n },\n \"sellerReferenceNumber\": \"<string>\",\n \"customFieldMap\": {}\n },\n \"sellerReferenceNumber\": \"<string>\",\n \"remarks\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"returnRequestId": 123,
"returnRequestNumber": "<string>",
"shipmentId": 123,
"referenceNumber": "<string>",
"labelId": 123,
"labelRequestStatusCode": "<string>",
"cost": 123,
"costCurrencyCode": "<string>"
}
}{
"correlationId": "<string>",
"meta": {
"status": 123,
"data": {},
"errorCode": "<string>",
"error": {}
}
}退件运货单(创建)
创建 Return Shipment
POST
/
api
/
ReturnShipment
/
createReturnShipment
Create return shipment
curl --request POST \
--url https://api.returnshelper.com/uat/user/api/ReturnShipment/createReturnShipment \
--header 'Content-Type: application/json' \
--header 'x-rr-apikey: <api-key>' \
--header 'x-rr-apitoken: <api-key>' \
--data '
{
"serviceTypeCode": "fedex_ground",
"orderTitle": "Return Label Title",
"totalValue": 100,
"totalValueCurrency": "usd",
"shipment": {
"shipToWarehouseId": 2,
"boxType": "cus",
"shipFrom": {
"country": "usa",
"contactName": "Your name",
"street1": "Some address line 1",
"state": "tx",
"city": "Houston",
"postalCode": "77235",
"phone": "15622708183",
"email": "user@example.com",
"fax": "<string>",
"street2": "Some address line 2",
"street3": "<string>"
},
"parcel": {
"weight": 10.5,
"weightUnit": "g",
"length": 10,
"width": 10,
"height": 10,
"dimensionUnit": "cm",
"items": [
{
"description": "Test item",
"weight": 10.5,
"value": 100,
"weightUom": "g",
"valueCurrencyCode": "usd"
}
]
},
"sellerReferenceNumber": "<string>",
"customFieldMap": {}
},
"sellerReferenceNumber": "<string>",
"remarks": "<string>"
}
'import requests
url = "https://api.returnshelper.com/uat/user/api/ReturnShipment/createReturnShipment"
payload = {
"serviceTypeCode": "fedex_ground",
"orderTitle": "Return Label Title",
"totalValue": 100,
"totalValueCurrency": "usd",
"shipment": {
"shipToWarehouseId": 2,
"boxType": "cus",
"shipFrom": {
"country": "usa",
"contactName": "Your name",
"street1": "Some address line 1",
"state": "tx",
"city": "Houston",
"postalCode": "77235",
"phone": "15622708183",
"email": "user@example.com",
"fax": "<string>",
"street2": "Some address line 2",
"street3": "<string>"
},
"parcel": {
"weight": 10.5,
"weightUnit": "g",
"length": 10,
"width": 10,
"height": 10,
"dimensionUnit": "cm",
"items": [
{
"description": "Test item",
"weight": 10.5,
"value": 100,
"weightUom": "g",
"valueCurrencyCode": "usd"
}
]
},
"sellerReferenceNumber": "<string>",
"customFieldMap": {}
},
"sellerReferenceNumber": "<string>",
"remarks": "<string>"
}
headers = {
"x-rr-apikey": "<api-key>",
"x-rr-apitoken": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-rr-apikey': '<api-key>',
'x-rr-apitoken': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
serviceTypeCode: 'fedex_ground',
orderTitle: 'Return Label Title',
totalValue: 100,
totalValueCurrency: 'usd',
shipment: {
shipToWarehouseId: 2,
boxType: 'cus',
shipFrom: {
country: 'usa',
contactName: 'Your name',
street1: 'Some address line 1',
state: 'tx',
city: 'Houston',
postalCode: '77235',
phone: '15622708183',
email: 'user@example.com',
fax: '<string>',
street2: 'Some address line 2',
street3: '<string>'
},
parcel: {
weight: 10.5,
weightUnit: 'g',
length: 10,
width: 10,
height: 10,
dimensionUnit: 'cm',
items: [
{
description: 'Test item',
weight: 10.5,
value: 100,
weightUom: 'g',
valueCurrencyCode: 'usd'
}
]
},
sellerReferenceNumber: '<string>',
customFieldMap: {}
},
sellerReferenceNumber: '<string>',
remarks: '<string>'
})
};
fetch('https://api.returnshelper.com/uat/user/api/ReturnShipment/createReturnShipment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.returnshelper.com/uat/user/api/ReturnShipment/createReturnShipment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'serviceTypeCode' => 'fedex_ground',
'orderTitle' => 'Return Label Title',
'totalValue' => 100,
'totalValueCurrency' => 'usd',
'shipment' => [
'shipToWarehouseId' => 2,
'boxType' => 'cus',
'shipFrom' => [
'country' => 'usa',
'contactName' => 'Your name',
'street1' => 'Some address line 1',
'state' => 'tx',
'city' => 'Houston',
'postalCode' => '77235',
'phone' => '15622708183',
'email' => 'user@example.com',
'fax' => '<string>',
'street2' => 'Some address line 2',
'street3' => '<string>'
],
'parcel' => [
'weight' => 10.5,
'weightUnit' => 'g',
'length' => 10,
'width' => 10,
'height' => 10,
'dimensionUnit' => 'cm',
'items' => [
[
'description' => 'Test item',
'weight' => 10.5,
'value' => 100,
'weightUom' => 'g',
'valueCurrencyCode' => 'usd'
]
]
],
'sellerReferenceNumber' => '<string>',
'customFieldMap' => [
]
],
'sellerReferenceNumber' => '<string>',
'remarks' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-rr-apikey: <api-key>",
"x-rr-apitoken: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.returnshelper.com/uat/user/api/ReturnShipment/createReturnShipment"
payload := strings.NewReader("{\n \"serviceTypeCode\": \"fedex_ground\",\n \"orderTitle\": \"Return Label Title\",\n \"totalValue\": 100,\n \"totalValueCurrency\": \"usd\",\n \"shipment\": {\n \"shipToWarehouseId\": 2,\n \"boxType\": \"cus\",\n \"shipFrom\": {\n \"country\": \"usa\",\n \"contactName\": \"Your name\",\n \"street1\": \"Some address line 1\",\n \"state\": \"tx\",\n \"city\": \"Houston\",\n \"postalCode\": \"77235\",\n \"phone\": \"15622708183\",\n \"email\": \"user@example.com\",\n \"fax\": \"<string>\",\n \"street2\": \"Some address line 2\",\n \"street3\": \"<string>\"\n },\n \"parcel\": {\n \"weight\": 10.5,\n \"weightUnit\": \"g\",\n \"length\": 10,\n \"width\": 10,\n \"height\": 10,\n \"dimensionUnit\": \"cm\",\n \"items\": [\n {\n \"description\": \"Test item\",\n \"weight\": 10.5,\n \"value\": 100,\n \"weightUom\": \"g\",\n \"valueCurrencyCode\": \"usd\"\n }\n ]\n },\n \"sellerReferenceNumber\": \"<string>\",\n \"customFieldMap\": {}\n },\n \"sellerReferenceNumber\": \"<string>\",\n \"remarks\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-rr-apikey", "<api-key>")
req.Header.Add("x-rr-apitoken", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.returnshelper.com/uat/user/api/ReturnShipment/createReturnShipment")
.header("x-rr-apikey", "<api-key>")
.header("x-rr-apitoken", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"serviceTypeCode\": \"fedex_ground\",\n \"orderTitle\": \"Return Label Title\",\n \"totalValue\": 100,\n \"totalValueCurrency\": \"usd\",\n \"shipment\": {\n \"shipToWarehouseId\": 2,\n \"boxType\": \"cus\",\n \"shipFrom\": {\n \"country\": \"usa\",\n \"contactName\": \"Your name\",\n \"street1\": \"Some address line 1\",\n \"state\": \"tx\",\n \"city\": \"Houston\",\n \"postalCode\": \"77235\",\n \"phone\": \"15622708183\",\n \"email\": \"user@example.com\",\n \"fax\": \"<string>\",\n \"street2\": \"Some address line 2\",\n \"street3\": \"<string>\"\n },\n \"parcel\": {\n \"weight\": 10.5,\n \"weightUnit\": \"g\",\n \"length\": 10,\n \"width\": 10,\n \"height\": 10,\n \"dimensionUnit\": \"cm\",\n \"items\": [\n {\n \"description\": \"Test item\",\n \"weight\": 10.5,\n \"value\": 100,\n \"weightUom\": \"g\",\n \"valueCurrencyCode\": \"usd\"\n }\n ]\n },\n \"sellerReferenceNumber\": \"<string>\",\n \"customFieldMap\": {}\n },\n \"sellerReferenceNumber\": \"<string>\",\n \"remarks\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.returnshelper.com/uat/user/api/ReturnShipment/createReturnShipment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-rr-apikey"] = '<api-key>'
request["x-rr-apitoken"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"serviceTypeCode\": \"fedex_ground\",\n \"orderTitle\": \"Return Label Title\",\n \"totalValue\": 100,\n \"totalValueCurrency\": \"usd\",\n \"shipment\": {\n \"shipToWarehouseId\": 2,\n \"boxType\": \"cus\",\n \"shipFrom\": {\n \"country\": \"usa\",\n \"contactName\": \"Your name\",\n \"street1\": \"Some address line 1\",\n \"state\": \"tx\",\n \"city\": \"Houston\",\n \"postalCode\": \"77235\",\n \"phone\": \"15622708183\",\n \"email\": \"user@example.com\",\n \"fax\": \"<string>\",\n \"street2\": \"Some address line 2\",\n \"street3\": \"<string>\"\n },\n \"parcel\": {\n \"weight\": 10.5,\n \"weightUnit\": \"g\",\n \"length\": 10,\n \"width\": 10,\n \"height\": 10,\n \"dimensionUnit\": \"cm\",\n \"items\": [\n {\n \"description\": \"Test item\",\n \"weight\": 10.5,\n \"value\": 100,\n \"weightUom\": \"g\",\n \"valueCurrencyCode\": \"usd\"\n }\n ]\n },\n \"sellerReferenceNumber\": \"<string>\",\n \"customFieldMap\": {}\n },\n \"sellerReferenceNumber\": \"<string>\",\n \"remarks\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"returnRequestId": 123,
"returnRequestNumber": "<string>",
"shipmentId": 123,
"referenceNumber": "<string>",
"labelId": 123,
"labelRequestStatusCode": "<string>",
"cost": 123,
"costCurrencyCode": "<string>"
}
}{
"correlationId": "<string>",
"meta": {
"status": 123,
"data": {},
"errorCode": "<string>",
"error": {}
}
}此页面由 AI 自动翻译。API 技术规格以英文呈现为标准。如有任何疑问,请参阅英文版本。
labelRequestStatusCode(通常为 queued),实际面单 URL 稍后透过 webhook 推送。
前置条件
调用前请准备好:serviceTypeCode— 从下列任一端点获取可用的退件服务:- 始发与目的地国家代码 — 透过 取得所有始发国家 与 取得所有国家 获取。代码使用 ISO3(
usa、gbr、chn)。 - 包裹尺寸与重量 — 必填且必须
> 0。可透过 取得所有尺寸单位 与 取得所有重量单位 验证单位。 - 幂等键 — 强烈建议。请在
x-returnhelper-idempotency-key中传入新的 UUID,以避免重试时产生重复的运货单。详见 幂等性章节。
重要字段
totalValue与totalValueCurrency—totalValue必须严格等于parcel.items[].value之和。totalValueCurrency必须为usd(小写)。parcel.items— 是否支持多明细取决于您的账户配置。仅支持单明细的账户提交多明细时会返回验证软错误。如需调整配置,请联络客服。- 尺寸 —
dimension1为最长边,dimension2为次长,dimension3为最短。 sellerReferenceNumber— 您卖家自定义的标识符,可在三个互相独立的层级(顶层、shipment、以及parcel.items[]内每条 item)上传入。原样保存并在 Webhook 事件中回传,便于与您自己的订单系统对账。层级语义、省略时的回退行为,以及推荐的对账工作流见 Seller Reference Number。
面单生成是异步的
即时回应中包含labelRequestStatusCode: queued。最终面单 URL、追踪号与 cancelCutoffTime 透过 labelGenerated webhook 事件推送;生成失败时同样透过该事件通知(labelRequestStatusCode: fail)。仓库收件由 markShipmentArrive 事件通知,随后会有 newInventoryCreated 事件。请订阅 Webhooks——webhook 是运货单生命周期的真实数据源,并非轮询补救方案。
修正运货单
如需在面单生成后更改地址、包裹或商品,请先透过取消退货面单取消面单,再以修正后的资料重新调用此端点。新的调用会创建新的 Return Request;已取消的则保持label-canceled。
幂等性
x-returnhelper-idempotency-key 请求头为选填。不带该请求头的调用会正常执行,但不具备防重复的保护。请参阅幂等性。
相关
- 按始发位置取得运送费用 — 在提交前预览费用。
- 取消退货面单 — 在包裹抵达仓库前取消面单。
- Webhooks — 订阅
labelGenerated与markShipmentArrive,以接收完整的运货单生命周期。 - Seller Reference Number — 如何设置
sellerReferenceNumber并基于 Webhook 事件与您自己的订单记录对账。
授权
Your API key
Your API token — keep this private
请求体
application/json
Return service type code
Order title / return title
Total declared value of the return
Currency code for totalValue. Must be usd (lowercase).
Shipment details including origin address and parcel info
Show child attributes
Show child attributes
Seller reference number
Additional remarks
响应
Success
Created return shipment details
Show child attributes
Show child attributes