场景
最近要做货品部门的需求,涉及到发货和入库相关的API,对此研究了fulfillment-inbound-api
官方文档路径:fulfillment-inbound-api
从货品部门了解到的具体步骤为:
-
创建一个发货计划(createInboundShipmentPlan)
-
然后创建发货(createInboundShipment),
-
最后获取贴箱单(getLabels)
再了解到这些后我做了如下尝试
实操
准备工作
- 亚马逊店铺账号
- 开发者权限 如不会搭建开发者环境请点这里
- 配置AWS认证 如不会配置AWS认证请点这里,完成6以前的操作就可以调用sp-api了
第一、获取曾经发货的相关信息
1.先获取曾经创建过的发货-getShipments
String queryType="SHIPMENT";
String marketplaceId = "ATVPDKIKX0DER";
GetShipmentsResponse shipments = null;
List<String> shipmentStatusList = Arrays.asList("WORKING","SHIPPED","RECEIVING","CANCELLED","DELETED","CLOSED","ERROR","IN_TRANSIT","DELIVERED","CHECKED_IN");
ArrayList<String> shipmentIdList = new ArrayList<>();
try {
shipments = fbaInboundApi.getShipments(queryType,marketplaceId,shipmentStatusList,shipme ntIdList,start_time