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
612 stars 736 forks source link

[BUG] [SP-API] [Issue] SC_VAT_TAX_REPORT start time and end time has unexpected behaviour #2720

Closed yitzolsberg closed 7 months ago

yitzolsberg 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
[x] Documentation issue or request
[ ] Other... Please describe:

SP-API Name and Version or Report/Feed Type

ReportType: SC_VAT_TAX_REPORT

Expected Behavior

It's clear that this report only allows "whole days" worth of information to be downloaded, and the way the report works is that it ignores the time part of the request, and gives the full day of the date part, which means as follows:

If you want two full days of data, for example 2023/10/11 and 2023/10/12, you send the request as follows:

{
    "reportType":"SC_VAT_TAX_REPORT",
    "dataStartTime":"2023-10-11T00:00:00+00:00",
    "dataEndTime":"2023-10-12T00:00:00+00:00",
    "marketplaceIds": [ ... ]
}

which works as expected. However, to get one day of data, you can't do

    "dataStartTime":"2023-10-11T00:00:00+00:00",
    "dataEndTime":"2023-10-11T00:00:00+00:00",

as the report comes back as cancelled. The only way I can get it to work is to make sure the endTime is after the startTime, like so:

    "dataStartTime":"2023-10-11T00:00:00+00:00",
    "dataEndTime":"2023-10-11T00:00:01+00:00",

even by a second works to get the whole days data. This seems a bug to me. Either the end time date should not be included (I think this is how it worked in MWS), or it should allow endTime to be the same as startTime.

Either way this sort of behaviour should be clearly documented.

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

closed for inactivity