question

the-blue-flash avatar image
0 Likes"
the-blue-flash asked

C# Trading API - GetMyMessages only receive few message headers,C# GetMyMessages - only get few Message Header as response

Hello,


my tool only receive 5-8 last message headers with this request.

i have tryed many request headers, but is always the same response.

i follow this link:

https://developer.ebay.com/devzone/xml/docs/reference/ebay/GetMyMessages.html


in my account, there are 24 messages, but response not getting all.

What is the problem?


thanks:)

,

Hello,

my tool receive only 5-7 last messages with the soap trading api.

i tryed many headers, like "ReturnHeaders", "ReturnAll" etc.


is there any more infos about this api request.


ebay-trading-api
10 |600

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

sagar_developersupport avatar image
0 Likes"
sagar_developersupport answered

Hi @the-blue-flash ,

To get your all of the messages, please make one GetMyMessages. call with DetailLevel set to ReturnHeaders, without including MessageID values.

This will return a complete list of message headers with their corresponding message ID values. Cache these ID values and use them in a second call to GetMyMessages with DetailLevel set to ReturnMessages.

Using this method, you can retrieve details of up to ten specific messages at a time.

Best Regards ,
eBay Developer Support

10 |600

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

the-blue-flash avatar image
0 Likes"
the-blue-flash answered
string requestURL = $"{endpoint}?callname={callName}&siteid={siteId}&appid={appId}&version={version}&Routing=new";

            eBayAPIInterfaceClient service = new eBayAPIInterfaceClient("eBayAPI", requestURL);



            CustomSecurityHeaderType requesterCredentials = new CustomSecurityHeaderType();
            requesterCredentials.eBayAuthToken = Account.Token;
            requesterCredentials.Credentials = new UserIdPasswordType();
            requesterCredentials.Credentials.AppId = appId;
            requesterCredentials.Credentials.DevId = devId;
            requesterCredentials.Credentials.AuthCert = certId;

            GetMyMessagesRequestType request = new GetMyMessagesRequestType();
            request.Version = version;
            request.WarningLevel = WarningLevelCodeType.High;
            request.DetailLevel = new DetailLevelCodeType[] { DetailLevelCodeType.ReturnHeaders};

            GetMyMessagesResponseType response = service.GetMyMessages(ref requesterCredentials, request);


i try this, but i can get only 7 messages.

i have try now the ebay sdk, but with the same result.


eBay.Service.Core.Sdk.ApiContext context = new eBay.Service.Core.Sdk.ApiContext();
            context.SoapApiServerUrl = endpoint;
            ApiCredential apiCredential = new ApiCredential();
            apiCredential.eBayToken = Account.Token;
            context.ApiCredential = apiCredential;
            context.Site = eBay.Service.Core.Soap.SiteCodeType.Germany;
            GetMyMessagesCall apicall = new GetMyMessagesCall(context);
            apicall.DetailLevelList = new eBay.Service.Core.Soap.DetailLevelCodeTypeCollection();
            apicall.DetailLevelList.Add(eBay.Service.Core.Soap.DetailLevelCodeType.ReturnHeaders);
            apicall.GetMyMessages();


in this version, the messagelist.count of this call is 7, too.

i dont know why?!

10 |600

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.