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
618 stars 742 forks source link

Failure to execute 'updateShipmentStatus' API endpoint #2154

Closed tahir1122 closed 2 years ago

tahir1122 commented 2 years ago

Describe the bug The 'updateShipmentStatus' API endpoint for Orders API is not working at all.

URL of the content on GitHub https://github.com/amzn/selling-partner-api-docs/blob/main/references/orders-api/ordersV0.md#updateshipmentstatus

Issue Details Returns nothing useful because the API is broken. Following is one of the requests I tried and it failed:

POST /orders/v0/orders/{orderId}/shipment { "marketplaceId": "A1VC38T7YXB528", "shipmentStatus": "RefusedPickup" }

Following is the response I get: { "errors": [ { "code": "InvalidInput", "message": "Unsupported ShipmentStatus passed", "details": "" } ] }

even though 'RefusedPickup' is a valid Shipment Status (https://github.com/amzn/selling-partner-api-docs/blob/main/references/orders-api/ordersV0.md#shipmentstatus)

Similarly, I get following error if I change the shipmentStatus: "errors": [ { "code": "InvalidInput", "message": "Invalid Request Parameters", "details": "" } ]

I have been using the following spec for samples on the payload for the request: https://raw.githubusercontent.com/amzn/selling-partner-api-models/main/models/orders-api-model/ordersV0.json

lozo55 commented 2 years ago

Hi, i had simillar problem:

I have a problem with the updateShipmentStatus endpoit.I have response code 400:

'code: "InvalidInput", "message": "Invalid Request Parameters". I don't understand what the problem is, all other endpoints work fine for me. Payload is correct in my opinion. I pass an array with marketplace_id and shipment_status, order_items I leave empty. I pass the order_id and payload to the UpdateShipmentStatusRequest method. The data is in the format as in the documentation from amazon. Does anyone know what the problem is? I will accept any advice as I am tired of this.

@edit nevermind, i dont understand endpoint destination

EugeneTheDeveloper commented 2 years ago

Hi,

I'm running into the exact same problem as OP. Trying to update status to ReadyForPickup or PickedUp results in the the generic 400 error response: { "errors": [ { "code": "InvalidInput", "message": "Invalid Request Parameters", "details": "" } ] }

I'm also following the documentation: https://github.com/amzn/selling-partner-api-docs/blob/main/references/orders-api/ordersV0.md#updateshipmentstatus

I checked our seller central app settings, and we do have the "Inventory and Order Tracking" role as per this doc, which specifies that you need it to be able to call the updateShipmentStatus endpoint: https://developer-docs.amazon.com/sp-api/docs/inventory-and-order-tracking-role. So if the issue is with our account, it's not clear what it could be from the error message.

Does anyone have any ideas what the root cause could be?

UPDATE: The reason turned out to be that "updateShipmentStatus operation is only intended to be used with sellers who are participating in the In-store Pickup program, and the different ShipmentStatus elements reflect the status for these in-store pickup orders.". Hope this helps others who encounter this error.

github-actions[bot] commented 2 years ago

This is a very old issue that is probably not getting as much attention as it deserves. We encourage you to check if this is still an issue after the latest release and if you find that this is still a problem, please feel free to open a new issue and make a reference to this one.

github-actions[bot] commented 2 years ago

closed for inactivity