亚马逊 SP-API 接口调试问题比较多,记录下来,给有需要的人
在使用v0 接口创建shipment 时,{{baseUrl}}/fba/inbound/v0/shipments/:shipmentId
会遇到一个错误:
"message": "Error: You must include a valid ShipmentId with a call to the CreateInboundShipment operation. Get ShipmentId values by calling the CreateInboundShipmentPlan operation. The request to CreateInboundShipment must include only items and quantities that have been previously planned through CreateInboundShipmentPlan. If a ShipmentId is not used to create a shipment within 48 hours it will expire.",
看到shipmentID 无效,后来检查文档,是quantity 字段不对,应该是QuantityShipped。
"InboundShipmentItems": [
{
"QuantityShipped": 400,
"SellerSKU": "xx-x-xxx",
"ShipmentId": "xxx",
"FulfillmentNetworkSKU": "xxx",
"PrepDetailsList": [
{
"PrepInstruction": "Labeling",
"PrepOwner": "SELLER"
}
]
}
]
亚马逊有时候接口提示信息比较诡异,多注意检查字段参数是否都正确,就会修复一些莫名其妙的错误