Amazon-SP-API-CSharp icon indicating copy to clipboard operation
Amazon-SP-API-CSharp copied to clipboard

Report - Start - End -Date

Open kevinvenclovas opened this issue 2 years ago • 13 comments

Hi im very confused.

I want some some datas from my order. So i use this report : ReportTypes.GET_FLAT_FILE_ORDER_REPORT_DATA_INVOICING

Some information about my order:

PurchaseDate = 10:56:02 UTC Time LastUpdateDate = 12:10:51 UTC Time

Now i cant find this order in the report result with all combinations of the available timestamps. I tried some random timestamps and got the order only back on the timestamp: 11:35:31 UTC Time

What is this for an timestamp? This make zero sense for me!

kevinvenclovas avatar Jun 15 '22 11:06 kevinvenclovas

I agree in the report they don’t use fixed standards for all report i face this in many report . Maybe we need to open case for this in Amazon

abuzuhri avatar Jun 15 '22 11:06 abuzuhri

Hi,

it works for us. i think LastUpdateTime (12:10:51 UTC Time) is (at this time) the shipping date. (orderstatus is shipped)

All(mostly?) orders, first status are pending. If status change to unshipped, it comes in report GET_FLAT_FILE_ORDER_REPORT_DATA_INVOICING. So difference PurchaseDate = 10:56:02 UTC Time to Timestamp 11:35:31 UTC Time is ok.

We have pending orders for several days.

Example of one of our orders GET /orders/v0/orders PurchaseDate = "2022-06-27T12:30:29Z" LastUpdateDate = "2022-06-27T12:34:36Z" OrderStatus = Pending

LastUpdateDate = "2022-06-27T12:59:49Z" OrderStatus = Unshipped

result of report (includes order) - created manually CreatedTime = {30.06.2022 09:52:00} DataEndTime = {27.06.2022 13:02:00} DataStartTime = {27.06.2022 12:57:00}

ProcessingEndTime = {30.06.2022 09:52:15} ProcessingStartTime = {30.06.2022 09:52:05}

=> order was found in time range 12:57 - 13:02!

tip for report GET_FLAT_FILE_ORDER_REPORT_DATA_INVOICING: I no longer create the report manually. I scheduled the report (every 15min or 5 min or...) then, i check the report list for new entries and downlaod the file.

var parameterssSchedule = new ParameterReportList(); parameterssSchedule.pageSize = 100; parameterssSchedule.reportTypes = new List<Constants.ReportTypes>(); parameterssSchedule.reportTypes.Add(Constants.ReportTypes.GET_FLAT_FILE_ORDER_REPORT_DATA_INVOICING); parameterssSchedule.processingStatuses = new List<Constants.ProcessingStatuses>(); parameterssSchedule.processingStatuses.Add(Constants.ProcessingStatuses.DONE); //todo i just wanted done parameterssSchedule.marketplaceIds = new List(); parameterssSchedule.marketplaceIds.Add(MarketPlace.Germany.ID); parameterssSchedule.createdSince = DateTime.UtcNow.AddDays(-7); //todo optimize (was for testing)

List<Report> reportsSchedulesList = amazonConnection.Reports.GetReports(parameterssSchedule); if (reportsSchedulesList != null && reportsSchedulesList.Count > 0) { //check for new reports foreach (var reportschedule in reportsSchedulesList) { if (reportschedule.ReportScheduleId != null) // IMPORTANT: only scheduled Reports! { //todo } } }

sat-it avatar Jun 30 '22 11:06 sat-it

@sat-it Thank you!

Do you have FBA orders? There are not available in this report. GET_FLAT_FILE_ORDER_REPORT_DATA_INVOICING

Is there an other solution for FbA orders?

kevinvenclovas avatar Jun 30 '22 12:06 kevinvenclovas

yes, i use report "GET_AMAZON_FULFILLED_SHIPMENTS_DATA_INVOICING". i have tried many reports, it is the only one with full address.

Note for B2B orders (with VAT Number) & FBA! Example: Amazon sends our goods from DE to AT. If the business customer (AT) has a VAT number, then it is a "tax free intracommunity delivery"

The report not includes vat information, the following fields are missing: "buyer-tax-registration-id" "buyer-tax-registration-country" "buyer-tax-registration-type"

I opened a case on amazon but no solution yet.

sat-it avatar Jun 30 '22 13:06 sat-it

@sat-it thanks again!

I think the sp-api is not ready for release. There are so many issuee But we have one month left to switch … :/

We need the VAT-Information also for FBA orders…

Love it to work with Amazon Api ❤️😅

Can you keep us up to date with your case for the tax issue.

kevinvenclovas avatar Jun 30 '22 13:06 kevinvenclovas

Hello @sat-it @kevinvenclovas

We are looking into retrieving order information from Amazon SP-API. For MFN MFA both; with VatRegistrationId and shipFrom if possible. Which endpoint do you recommend to use?

MFN: ? AFN: GET_ORDER_REPORT_DATA_INVOICING

semso-software avatar Jul 01 '22 12:07 semso-software

Hi,

i also miss shipFrom fields in the SP-API reports.

MFN: XML - GET_ORDER_REPORT_DATA_INVOICING TXT - GET_FLAT_FILE_ORDER_REPORT_DATA_INVOICING (both only contains MFN Orders)

I don't work with xml. I did a quick comparison of the results from both reports. GET_ORDER_REPORT_DATA_INVOICING also contains BuyerTaxRegistrationId, BillingAdress and ShippingAdress.

FBA: XML - I can't find a comparable report (https://developer-docs.amazon.com/sp-api/docs/report-type-values) TXT - GET_AMAZON_FULFILLED_SHIPMENTS_DATA_INVOICING is the only report that contains complete BillingAdress and ShippingAdress. But no BuyerTaxRegistrationId!

My case was cloesd. I should contact another department on Amazon. I did that and am waiting for an answer again...

sat-it avatar Jul 01 '22 14:07 sat-it

Any Update here ?

abuzuhri avatar Jul 26 '22 05:07 abuzuhri

no, unfortunately not yet. But the case is still open.

sat-it avatar Jul 26 '22 07:07 sat-it

Hi All,

Any progress here @kevinvenclovas @sat-it

abuzuhri avatar Aug 30 '22 14:08 abuzuhri

@abuzuhri

we implemented an workarround so i have not followed this up.

We created an schedule report on amazon and requested every 10 minutes the new reports so we didn't need start and end date of the report

kevinvenclovas avatar Aug 30 '22 14:08 kevinvenclovas

sorry, for waiting case is cloesd. there will be no change to the report "GET_AMAZON_FULFILLED_SHIPMENTS_DATA_INVOICING".

we can get the missing information (VAT Number) from the report: (Invoice data reports) XML - GET_XML_VAT_INVOICE_DATA_REPORT TXT - GET_FLAT_FILE_VAT_INVOICE_DATA_REPORT

PLEASE read description! https://developer-docs.amazon.com/sp-api/docs/report-type-values

I haven't finished testing yet, I can summarize the following

  1. Report (GET_FLAT_FILE_VAT_INVOICE_DATA_REPORT) contains all (MFN & FBA, SHIPMENT, REFUND, RETURN etc.)
  2. complete billing and shipping adress
  3. VAT-Number

I wanted to compare the FBA data GET_AMAZON_FULFILLED_SHIPMENTS_DATA_INVOICING / GET_FLAT_FILE_VAT_INVOICE_DATA_REPORT

var reportOptions = new FikaAmazonAPI.AmazonSpApiSDK.Models.Reports.ReportOptions(); reportOptions.Add("ReportOption=All", "true"); //to check! DateTime startDateTime = Convert.ToDateTime("01.09.2022 0:00:00"); DateTime endeDateTime = Convert.ToDateTime("03.09.2022 23:59:59"); var datatAndDownloadFile = amazonConnection.Reports.CreateReportAndDownloadFile( Constants.ReportTypes.GET_FLAT_FILE_VAT_INVOICE_DATA_REPORT, startDateTime, endeDateTime, reportOptions, false);

DateTimeRange (01.09.-03.09.22) Report "GET_AMAZON_FULFILLED_SHIPMENTS_DATA_INVOICING" contains orders with shipment-date DateTimeRange (01.09.-03.09.22) Report "GET_FLAT_FILE_VAT_INVOICE_DATA_REPORT" contains orders with order-date.


Quetion I only use FBA in the SP-API.

MWS Report "GET_AMAZON_FULFILLED_SHIPMENTS_DATA_INVOICING" SP-API Report "GET_AMAZON_FULFILLED_SHIPMENTS_DATA_INVOICING"

Both reports contains the same columns, with NO VAT-Number. what was the solution in MWS for FBA?

sat-it avatar Sep 28 '22 08:09 sat-it

Hi @sat-it,

I use the orders API and the GET_VAT_TRANSACTION_DATA report to get the VAT Number

RenzoF avatar Oct 03 '22 14:10 RenzoF

That#s an issue you could never resolve, because this is amazon.

About 10 years ago we had the same problem using the MWS Order Api.

Amazon uses thousands of decoupled systems it takes some time to syncronize them all and sometimes some transactions get stuck and go a few days on holiday.

Therefore it is best practise if you use regular recurring reports e.g. if you request a report as described every 15 minutes for the last 15 minutes. it should be best practise to recall the report once a day for the last 24 hours and once a week for the last 7 days.

ThomasL1973 avatar Dec 04 '22 16:12 ThomasL1973

Since we have no control to this i will close this issue

abuzuhri avatar Mar 17 '23 19:03 abuzuhri