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
611 stars 734 forks source link

listFinancialEvents CustomError required field #223

Closed masterevgeni closed 2 years ago

masterevgeni commented 2 years ago

I using SP-API, I trying get listFinancialEvents, I sending all fields as described. request:

  url: 'https://sellingpartnerapi-na.amazon.com/finances/v0/financialEvents?details=true&granularityId=ATVPDKIKX0DER&granularityType=Marketplace&marketplaceIds=ATVPDKIKX0DER',
  body: null,
  headers: {
    Authorization: 'AWS4-HMAC-SHA256 Credential=xxxxxxxx, SignedHeaders=host;x-amz-access-token;x-amz-date, Signature=f2c14070a4dc2ae63fbd336938df6085e2e2560d38a94cd3e9562f6cb512f269',
    'Content-Type': 'application/json; charset=utf-8',
    host: 'sellingpartnerapi-na.amazon.com',
    'x-amz-access-token': 'xxxxxxxxx',
    'x-amz-security-token': 'xxxxxxxxx',
    'x-amz-date': '20220303T185615Z'
  }
}

response:

  body: '{\n' +
    '  "errors": [\n' +
    '    {\n' +
    '      "code": "InvalidInput",\n' +
    '      "message": "Must specify a valid value of atleast one of : 1)AmazonOrderId, 2)FinancialEventGroupId and 3)PostedAfter",\n' +
    '      "details": ""\n' +
    '    }\n' +
    '  ]\n' +
    '}',

As I checked "AmazonOrderId" doesn't appear in SP_API, it looks like this field belongs to MWS api as well I tried to pass "AmazonOrderId: "xxx-xxxxx-xxxxxxx"," in query but still getting same error.

any solution or workaround?

Thanks

franciscocha commented 2 years ago

@masterevgeni Yeah it looks like they still need to do some more testing with their SPA. However if you are looking for order specific financial events I was able to use /finances/v0/orders/{orderId}/financialEvents.

adrian-amz commented 2 years ago

Hello @masterevgeni ,

In order to correctly resolve this issue, please open a support case so we can pursue the investigation, as additional details are required from your end.

Thanks, Adrian C Selling Partner API Developer Support