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
590 stars 728 forks source link

Fulfillment Inbound 2024-03-20 Generate Transportation Options: Fail to execute COMPUTE_TRANSPORTATION_OPTIONS API with errors #4184

Open brandondev1 opened 2 weeks ago

brandondev1 commented 2 weeks ago

Seeing this randomly (happens sometimes, but subsequent identical plans will succeed) when executing GetInboundOpertationStatus after GenerateTransportationOptions.

I submitted this issue previously, but it was closed for some reason as being "similar" to issue 4048 even though that is a ConfirmTransportationOptions issue with a completely different error.

GenerateTransportationOptions

REQUEST:
{
    "uri": "https://sellingpartnerapi-na.amazon.com/inbound/fba/2024-03-20/inboundPlans/wf5b422a1d-6a93-480a-876c-261f701ca50f/transportationOptions ",
    "method": "POST",,
    "body": {
        "placementOptionId": "pl758be03e-58f0-4d49-b093-ae36637ef346",
        "shipmentTransportationConfigurations": [
            {
                "readyToShipWindow": {
                    "start": "2024-09-23T00:00:00.000Z"
                },
                "shipmentId": "she7dc40c7-e8d5-4e34-a90c-8764e99cd96b",
                "contactInformation": {
                    "phoneNumber": "813-333-2233",
                    "email": "sam@email.com",
                    "name": "Sam Iam"
                },
                "pallets": [
                    {
                        "quantity": 1,
                        "stackability": "NON_STACKABLE",
                        "weight": {
                            "unit": "LB",
                            "value": 466
                        },
                        "dimensions": {
                            "unitOfMeasurement": "IN",
                            "length": 48,
                            "width": 40,
                            "height": 40
                        }
                    }
                ],
                "freightInformation": {
                    "freightClass": "FC_50",
                    "declaredValue": {
                        "code": "USD",
                        "amount": 1000
                    }
                }
            }
        ]
    }
}

RESPONSE:
{
  "operationId": "6d482cc5-52df-40d9-953a-c78634d61065"
}

Subsequent request to GetInboundOperationStatus

REQUEST:
{
    "uri": "https://sellingpartnerapi-na.amazon.com/inbound/fba/2024-03-20/operations/6d482cc5-52df-40d9-953a-c78634d61065",
    "method": "GET",
}

RESPONSE:
{
  "operationStatus": "FAILED",
  "operationId": "64b29674-80b4-4064-ab13-bbd7019b45d1",
  "operation": "generateTransportationOptions",
  "operationProblems": [
    {
      "severity": "ERROR",
      "code": "BadRequest",
      "message": "ERROR: Fail to execute COMPUTE_TRANSPORTATION_OPTIONS API with errors."
    }
  ]
}
amitvaghani commented 1 week ago

I'm facing the same problem when I tried to confirmTransportationOptions My response:

ERROR: { "operationStatus": "FAILED", "operationId": "c954b3b8-afa7-44ca-8dcf-41dcb807a0d8", "operation": "confirmTransportationOptions", "operationProblems": [ { "severity": "ERROR", "code": "BadRequest", "message": "ERROR: Fail to execute CONFIRM_CARRIERS API with errors." } ] }

Body Data: { "transportationSelections": [ { "shipmentId": "sh5b7e755e-2f85-47f2-XXXX-XXXXXXXXXXXX", "transportationOptionId": "toebc71138-8e68-XXXX-XXXX-XXXXXXXXXXXX", "contactInformation": { "name": "XXXXXXXX", "phoneNumber": "XXXXXXXXXX", "email": "XXXXXXXXXXXXXXXXX" } }, { "shipmentId": "shd3b71197-c50d-4b3a-XXXX-XXXXXXXXXXXX", "transportationOptionId": "toebc71138-8e68-XXXX-XXXX-XXXXXXXXXXXX", "contactInformation": { "name": "XXXXXXXX", "phoneNumber": "XXXXXXXXXX", "email": "XXXXXXXXXXXXXXXXX" } ] }

based on:

list_of_transportaion_option = { "carrier": { "name": "UPS", "alphaCode": "UPSN" }, "quote": { "cost": { "amount": 5.3, "code": "USD" } }, "preconditions": [], "shipmentId": "sh5b7e755e-2f85-XXXX-XXXX-XXXXXXXXXXXXX", "shippingMode": "GROUND_SMALL_PARCEL", "transportationOptionId": "toebc71138-8e68-XXXX-XXXX-XXXXXXXXXX", "shippingSolution": "AMAZON_PARTNERED_CARRIER" }

placement_option = { "fees": [ { "description": "Placement service fee represents service to inbound with minimal shipment splits and destinations of skus", "type": "FEE", "value": { "amount": 0.49, "code": "USD" }, "target": "Placement Services" } ], "shipmentIds": [ "sh5b7e755e-2f85-XXXX-XXXX-XXXXXXXXXXX", "shd3b71197-c50d-XXXX-XXXX-XXXXXXXXXXXX" ], "discounts": [], "expiration": "2024-10-03T06:48:14.748Z", "placementOptionId": "pl60108e3d-45fc-XXXX-XXXX-XXXXXXXXXXXXX", "status": "OFFERED" }

How to solve?