amzn / selling-partner-api-models

This repository contains OpenAPI models for developers to use when developing software to call Selling Partner APIs.
Apache License 2.0
577 stars 730 forks source link

generateTransportationOptions sucess then requst listTransportationOptions but respon does't return something #4171

Open loco925 opened 1 week ago

loco925 commented 1 week ago

listTransportationOptionsdoesn‘t return something。why?place help me!how can i do。

[listTransportationOptions]respon: {"Data":{"Pagination":{"NextToken":null},"TransportationOptions":[]},"IsSuccess":true,"ErrorCode":null,"Message":"{\"transportationOptions\":[],\"pagination\":{}}","AddtionData":{}}

we use 【getInboundOperationStatus】to see result,it return: {"Data":{"Operation":"generateTransportationOptions","OperationId":"a6c624cc-4365-42bd-87a2-0fff734ecad0","OperationProblems":[{"Code":"BadRequest","Details":null,"Message":"WARNING: Since pallet and freight info has not been provided, we may not be able to produce PCP-LTL options as part of GenerateTransportationOptions for the following shipment IDs: [shaaa92bfe-dada-4ed6-b197-95245ea595a4, sh0de4901c-5bc6-442d-a0be-f9e0a2a4cfd6]","Severity":"WARNING"}],"OperationStatus":{"Value":"FAILED","Defined":true}},"IsSuccess":true,"ErrorCode":null,"Message":"{"operationStatus":"FAILED","operationId":"a6c624cc-4365-42bd-87a2-0fff734ecad0","operation":"generateTransportationOptions","operationProblems":[{"severity":"WARNING","code":"BadRequest","message":"WARNING: Since pallet and freight info has not been provided, we may not be able to produce PCP-LTL options as part of GenerateTransportationOptions for the following shipment IDs: [shaaa92bfe-dada-4ed6-b197-95245ea595a4, sh0de4901c-5bc6-442d-a0be-f9e0a2a4cfd6]"}]}","AddtionData":{}}

mafge commented 1 week ago

Hi @loco925, thanks for reaching out! Have you followed the steps in the Fulfillment Inbound Use Case Guide. It is very important to follow the exact steps from the guide. Best, Marc Selling Partner Developer Services

loco925 commented 1 week ago

【generateTransportationOptions】resqust: {"placementOptionId":"plc1da2864-ad81-46d6-85a3-337b07a8492b","shipmentTransportationConfigurations":[{"readyToShipWindow":{"start":"2024-09-24T16:00:00Z"},"shipmentId":"shaaa92bfe-dada-4ed6-b197-95245ea595a4"},{"readyToShipWindow":{"start":"2024-09-24T16:00:00Z"},"shipmentId":"sh0de4901c-5bc6-442d-a0be-f9e0a2a4cfd6"}]}

【generateTransportationOptions】respon: {"Data":{"OperationId":"db37ebaa-a3d5-41c7-911c-0ebfea7d4414"},"IsSuccess":true,"ErrorCode":null,"Message":"{\"operationId\":\"db37ebaa-a3d5-41c7-911c-0ebfea7d4414\"}","AddtionData":{}}

【listTransportationOptions】resqust: {"inboundPlanId":"wf7bad8bac-b7c5-4cd5-9ccf-eff64c51e6d2","shipmentId":"shaaa92bfe-dada-4ed6-b197-95245ea595a4"},

【listTransportationOptions】respon: {"Data":{"Pagination":{"NextToken":null},"TransportationOptions":[]},"IsSuccess":true,"ErrorCode":null,"Message":"{\"transportationOptions\":[],\"pagination\":{}}","AddtionData":{}}

My current confusion is why listTransportationOptions does not return data. Which parameter did I pass incorrectly? What should I do to return data? I encountered this prompt ("severity":"WARNING","code":"BadRequest","message":"WARNING: Since pallet and freight info has not been provided, we may not be able to produce PCP-LTL options as part of GenerateTransportationOptions for the following) How to deal with it? I don’t want to ship in LTL mode. I want to choose to ship by myself, SP mode.

mafge commented 1 week ago

@loco925 When you intend to use SPD you shouldn't be concerned about the warning. Did you call setPackingInformation before generatePlacementOptions?

loco925 commented 1 week ago

【setPackingInformation】 has been called before calling 【generatePlacementOptions】

Fulfillment Inbound API v2024-03-20 I called in the following order:(Please help to check that the order of requests is correct. )

  1. Create an inbound plan
  2. Generate PackingOptions
  3. List packaging options
  4. List PackingGroupItems
  5. Confirm packaging options
  6. Set packaging information
  7. Generate PlacementOptions
  8. List placement options
  9. Confirm placement options
  10. getShipment
  11. Generate DeliveryWindowOptions
  12. listDeliveryWindowOptions
  13. Confirm DeliveryWindowOptions
  14. Generate transportation options
  15. List transportation options

I just requested 【getInboundOperationStatus】 to check the OperationId returned by setPackingInformation to see if the operation was successful. It returned "WARNING: Boxes weighing more than 15.00 kg must be marked "Heavy Package" (viewable from both the top and sides of each carton)." I think this error report should have no impact.

mafge commented 1 week ago

@loco925 The only thing I am seeing in your calls is that usually you generate and list placement options, delivery window options and transportation options first and in the last step make the confirm calls, e.g.:

I would also recommend to cancel the existing inbound plan and create a new one as the APIs are quite fragile if you don't follow the exact order.

loco925 commented 1 week ago

Please ask another question. Does STA's new process API support the cancellation of some products? Take the left branch process SPD mode.

Since there will be special attributes after packing but cannot be shipped in the end, and the shipment has been pre-created, 0 cannot be filled in when uploading packing information. How to deal with this situation?

loco925 commented 1 week ago

【getInboundOperationStatus】What should I do when encountering this problem? I request it every once in a while, but it still returns failure.

respon: {"Data":{"Operation":"confirmPlacementOption","OperationId":"e8d72792-14ec-4187-aa89-6ee77631292a","OperationProblems":[{"Code":"InternalServerError","Details":null,"Message":"ERROR: Something went wrong. Please try again later.","Severity":"ERROR"}],"OperationStatus":{"Value":"FAILED","Defined":true}},"IsSuccess":true,"ErrorCode":null,"Message":"{\"operationStatus\":\"FAILED\",\"operationId\":\"e8d72792-14ec-4187-aa89-6ee77631292a\",\"operation\":\"confirmPlacementOption\",\"operationProblems\":[{\"severity\":\"ERROR\",\"code\":\"InternalServerError\",\"message\":\"ERROR: Something went wrong. Please try again later.\"}]}","AddtionData":{}}

mafge commented 5 days ago

Please ask another question. Does STA's new process API support the cancellation of some products? Take the left branch process SPD mode.

Since there will be special attributes after packing but cannot be shipped in the end, and the shipment has been pre-created, 0 cannot be filled in when uploading packing information. How to deal with this situation?

You can use generateShipmentContentUpdatePreviews, listShipmentContentUpdatePreviews and confirmShipmentContentUpdatePreview for that.

loco925 commented 3 days ago

【getInboundOperationStatus】What should I do when encountering this problem? I request it every once in a while, but it still returns failure。the OperationId is divided into multiple warehouses, we 【confirmPlacementOption】occur error

respon: {"Data":{"Operation":"confirmPlacementOption","OperationId":"e8d72792-14ec-4187-aa89-6ee77631292a","OperationProblems":[{"Code":"InternalServerError","Details":null,"Message":"ERROR: Something went wrong. Please try again later.","Severity":"ERROR"}],"OperationStatus":{"Value":"FAILED","Defined":true}},"IsSuccess":true,"ErrorCode":null,"Message":"{"operationStatus":"FAILED","operationId":"e8d72792-14ec-4187-aa89-6ee77631292a","operation":"confirmPlacementOption","operationProblems":[{"severity":"ERROR","code":"InternalServerError","message":"ERROR: Something went wrong. Please try again later."}]}","AddtionData":{}}

mafge commented 3 days ago

@loco925 Sorry for the inconveniences! There are currently some issues with shipments that are divided into multiple warehouses. While we are working on resolving these issues, my recommendation for now is to avoid placement options with multiple shipments.