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 741 forks source link

[BUG] [SP-API] Get Shipments doesn't honor MarketplaceId Query Param #2584

Closed ryanjpaul closed 8 months ago

ryanjpaul commented 1 year ago

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

SP-API Name and Version or Report/Feed Type

Fulfillment Inbound API v0

Expected Behavior

In making a request to the GET /fba/inbound/v0/shipments endpoint, the value passed in as MarketplaceId should be honored. All data responded should be inbound shipments to fulfillment centers in the specified marketplace

Current Behavior

I am passing in the following query parameters: ShipmentStatusList="WORKING,SHIPPED,READY_TO_SHIP,RECEIVING,CANCELLED,DELETED,CLOSED,ERROR,IN_TRANSIT,DELIVERED,CHECKED_IN" MarketplaceId= "A2EUQ1WTGCTBG2" (CA) QueryType = SHIPMENT

However, in the response there appears to be data for US inbound shipments (based on the DestinationFulfillmentCenterId and cross-checking). When I change the MarketplaceId to be US, the response is exactly the same.

Why is this query parameter not being honored?

rugved1991 commented 1 year ago

Hi @ryanjpaul,

Thanks for reaching out. Can you share request and response details along with headers? If you have already opened up a developer support case regarding this issue, please provide the case ID. Once we have the request ID and timestamps we can investigate further.

Best, Rugved Solutions Architect, SP API

ryanjpaul commented 1 year ago

Hey @rugved1991 ,

Sure. I'm making the request via the Python SP API wrapper. I just made the request using the same parameters as mentioned in my original question.

Request Headers: {'host': 'sellingpartnerapi-na.amazon.com', 'user-agent': 'python-sp-api-0.18.4', 'x-amz-access-token': '<access_token>', 'x-amz-date': '20230523T141317Z', 'content-type': 'application/json'}

Request Params: {'MarketplaceId': 'A2EUQ1WTGCTBG2', 'LastUpdatedAfter': '2023-04-23T10:12:09Z', 'LastUpdatedBefore': '2023-05-23T14:12:09Z', 'ShipmentStatusList': 'WORKING,SHIPPED,READY_TO_SHIP,RECEIVING,CANCELLED,DELETED,CLOSED,ERROR,IN_TRANSIT,DELIVERED,CHECKED_IN', 'QueryType': 'DATE_RANGE'}

Response Headers: {'Server': 'Server', 'Date': 'Tue, 23 May 2023 14:15:00 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'x-amz-rid': 'VJ7J2VPMDR8VXVH3HDBW', 'x-amzn-RateLimit-Limit': '2.0', 'x-amzn-RequestId': 'a39d10ad-30e6-4319-9f1f-951dc66a5779', 'x-amz-apigw-id': 'OPFa39d10ad30e6', 'X-Amzn-Trace-Id': 'Root=1-646cca64-a39d10ad30e64319', 'Content-Encoding': 'gzip', 'Vary': 'accept-encoding,Content-Type,Accept-Encoding,User-Agent', 'Strict-Transport-Security': 'max-age=47474747; includeSubDomains; preload'}

Please let me know if there's anything else needed. Also, I have not opened a developer support case regarding the issue, do you suggest I do so?

ryanjpaul commented 1 year ago

Hi @rugved1991, just following up here thanks

davidszoke1 commented 1 year ago

Experiencing the same. I even tried removing the MarketplaceId param from the request and it still works, giving the exact same data. Same if I put something random as a value.

adeelsohailahmed commented 1 year ago

This is a known problem for NA region. Please see: amzn/selling-partner-api-models#2844. That issue was closed without any proper follow-up. We're experiencing the same issue.

teddy-codes commented 1 year ago

Experiencing the same issue. MarketplaceId is not acknowledged.

@chapmanjw Is this something you can get directed to the correct team? Looks like we're not having any luck getting an answer to this.

DanielLanger commented 1 year ago

@rugved1991 any updates here?

gorillaforce commented 1 year ago

@rugved1991 we are also seeing this behavior. It is very annoying because combined with the API not providing the destination fulfillment center address, there's no way to know which marketplace the inbound shipment was sent to.

@adeelsohailahmed we also see this in EU region as well.

For now, we're considering implementing a difficult work around like possibly retrieving the shipping label and parsing the PDF to get the ship to country. Or maybe keeping a lookup table of all the amazon fulfillment center codes and their addresses (which is constantly changing, so that's a terrible solution too).

Anyone figure this out yet?

github-actions[bot] commented 8 months 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 8 months ago

closed for inactivity