Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not match input arguments for Orders API call #42

Open
tarekrahme opened this issue Mar 26, 2023 · 1 comment
Open

Could not match input arguments for Orders API call #42

tarekrahme opened this issue Mar 26, 2023 · 1 comment

Comments

@tarekrahme
Copy link

tarekrahme commented Mar 26, 2023

Hello

I am getting the Could not match input arguments error when trying to fetch orders. You can see in the URL that the params I set are MarketplaceIds and CreatedAfter.

Weirdly enough when I set the config.host to be the production URL, I get no error (but obviously an array of empty orders as my account has no orders, it's just my developer account.)

(Also, does this gem take care of OAuth or am I correct in thinking that I need to do that myself separately outside of this gem to get the refresh_token of the seller?)

ETHON: performed EASY effective_url=https://sandbox.sellingpartnerapi-na.amazon.com/orders/v0/orders?MarketplaceIds=A1AM78C64UM0Y8%2CATVPDKIKX0DER&CreatedAfter=2023-01-20T17%3A50%3A53 response_code=400 return_code=ok total_time=0.707399
┃ HTTP response body ~BEGIN~
┃ [{"code":"InvalidInput","message":"Could not match input arguments"}]

Thanks so much in advance!

@cduv
Copy link

cduv commented May 26, 2023

Hi,

It's a different API call but I think is the same problem.

We are having the same problem when doing create_feed_document in the feeds-api-model pointing to the Sandbox. When we point to production endpoints works correctly.

Config to use sandbox:

 AmzSpApi.configure do |config|
        config.region = 'eu'
        config.timeout = 20 # seconds
        config.sandbox = true
        #config.debugging = true
end

And then:

body = AmzSpApi::FeedsApiModel::CreateFeedDocumentSpecification.new(content_type: "text/xml")
response = feeds.create_feed_document(body)

We get the following error:

HTTP status code: 400
Response headers: {"Server"=>"Server", "Date"=>"Wed, 24 May 2023 11:55:30 GMT", "Content-Type"=>"application/json", "Content-Length"=>"121", "Connection"=>"keep-alive", "x-amz-rid"=>"K4H...", "x-amzn-RateLimit-Limit"=>"5.0", "x-amzn-RequestId"=>"be74....", "x-amz-apigw-id"=>"OPF...", "X-Amzn-Trace-Id"=>"Root=1-....", "Vary"=>"Content-Type,Accept-Encoding,User-Agent", "Strict-Transport-Security"=>"max-age=47474747; includeSubDomains; preload"}
Response body: {
  "errors": [
    {
      "code": "400",
      "message": "Invalid input",
      "details": "Invalid input"
    }
  ]
}

When we point to the production endpoint the method returns the url correctly.

Are we missing something? Has someone managed to use the Sandbox with the feeds-api-model?

Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants