question

mosquitonetsonlineau avatar image
0 Likes"
mosquitonetsonlineau asked

GetSellerTransactions not filtering by number of days .NET

I am using the ebay API to bring in orders awaiting shipping into my ecommerce website built in c#. I can get what i need, showing me the last 100 orders but if i restrict the GetSellerTransactionsRequestType by numberofdays it still returns back 100 orders. This is my code sample. Is there something i am missing? GetSellerTransactionsRequestType request = new GetSellerTransactionsRequestType(); request.Version = "859"; request.NumberOfDays = 4; GetSellerTransactionsResponseType response = service.GetSellerTransactions(request); Thanks
apitrading apigetsellertransactions
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jourbandts avatar image
0 Likes"
jourbandts answered
Ah ok. You want to add this line, request.NumberOfDaysSpecified = true; The request won't pick up a few of the inputs without setting the "Specified" to true.
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jourbandts avatar image
0 Likes"
jourbandts answered
I am assuming you didn't expect to still get 100 orders back from just 4 days? With the limited code you put in the forum it is hard to tell what is wrong. The fact that you are getting back orders means some sort of time frame is getting executed. Maybe the results you are getting are correct? So I would suggest 2 things, 1. Use our SDK to make the call 2. Enable logging Here is a code snippet for logging the XML request, // very important, let's setup the logging ApiLogManager oLogManager = new ApiLogManager(); oLogManager.ApiLoggerList.Add(new eBay.Service.Util.FileLogger("GetSellerTransactions.log", true, true, true)); oLogManager.EnableLogging = true; oContext.ApiLogManager = oLogManager; Here is a sample (it is for GetOrders but you get the concept), https://ebaydts.com/eBayKBDetails?KBid=1679
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mosquitonetsonlineau avatar image
0 Likes"
mosquitonetsonlineau answered
Thanks for your answer. No we dont expect 100 records, should only be 20 or so. This is the larger block of code: string callName = "GetSellerTransactions"; // Build the request URL string requestURL = endpoint + "?callname=" + callName + "&siteid=" + siteId + "&appid=" + appId + "&version=" + version + "&routing=default"; // Create the service eBayAPIInterfaceService service = new eBayAPIInterfaceService(); // Assign the request URL to the service locator. service.Url = requestURL; // Set credentials service.RequesterCredentials = new CustomSecurityHeaderType(); service.RequesterCredentials.eBayAuthToken = "******"; service.RequesterCredentials.Credentials = new UserIdPasswordType(); service.RequesterCredentials.Credentials.AppId = appId; service.RequesterCredentials.Credentials.DevId = devId; service.RequesterCredentials.Credentials.AuthCert = certId; // Make the call to GetSellerTransactions GetSellerTransactionsRequestType request = new GetSellerTransactionsRequestType(); request.Version = "859"; request.NumberOfDays = 4; GetSellerTransactionsResponseType response = service.GetSellerTransactions(request); Seems to start about a month ago from whatever date it is now. We do this on a daily basis so only really need the last couple of days worth Thanks Chris
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mosquitonetsonlineau avatar image
0 Likes"
mosquitonetsonlineau answered
Perfect, sounds obvious in the end Thanks
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.