具体请求信息给一下看看。
在 Fulfillment Inbound API v2024-03-20 里,shippingMode 只出现在两个 schema 里,全都是响应:
- TransportationOption.shippingMode — listTransportationOptions 返回的
- ShippingConfiguration.shippingMode — listPackingOptions 返回的
整个 API 里没有任何一个请求体接受 shippingMode / SHIPPING_MODE。所以你前后端传得再顺畅,这个值也只是在你自己系统里打转,亚马逊那边压根没收到 → 后台运输方式当然是空的。
正确的写入方式:选 ID,不是传 mode
运输方式是通过选中一个 transportationOptionId 隐式确定的,三步:
generateTransportationOptions (POST, 异步)
↓
listTransportationOptions (GET) → 拿到一堆 option,每个带 shippingMode + shippingSolution
↓ 在这里用你前端传来的 SHIPPING_MODE 做【筛选】
confirmTransportationOptions (POST, 异步) → 只提交 shipmentId + transportationOptionId
confirmTransportationOptions 的请求体只有这几个字段,没别的:
{
"transportationSelections": [
{
"shipmentId": "sh1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"transportationOptionId": "to1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"contactInformation": { "name": "xxx", "phoneNumber": "1234567890" }
}]
}
所以代码改法是:前端传的 SHIPPING_MODE 拿去 filter 列表,而不是塞进请求体。

问 目前运输方式应该怎么传递给亚马逊,我现在传递过去是空的,有没有大佬看一下?