question

eseller-solutions avatar image
0 Likes"
eseller-solutions asked ·

Exception while getUser call

Hello,

 

I am using the GetUser Call for getting the sitecode of another ebay users. But at some point i am getting the following exception

 

ERROR - ApiCall.executeByApiName(583) | com.ebay.sdk.ApiException: ItemId required for this Detail Level. Transactional relationship must exist between requesting and subject user.
 

 

The code i am using is as follows :

 

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
 <S:Header>
  <ebl:RequesterCredentials xmlns:ebl="urn:ebay:apis:eBLBaseComponents" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:mustUnderstand="0">
   <ebl:eBayAuthToken>My Ebay token</ebl:eBayAuthToken>
  </ebl:RequesterCredentials>
 </S:Header>
 <S:Body>
  <GetUserRequest xmlns="urn:ebay:apis:eBLBaseComponents">
   <ErrorLanguage>en_US</ErrorLanguage>
   <Version>673</Version>
   <UserID>ebayidUserID>
  </GetUserRequest>
 </S:Body>
</S:Envelope>

 

I am not sure what is going wrong...May i get some help?

 

Thanks and regards

esellersolutions

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.

1 Answer

· Write an Answer
zhuowei.developersupport@ebay.com avatar image
0 Likes"
zhuowei.developersupport@ebay.com answered ·

Hi eseller-solutions,

 

   The error indicates that you were sending the DetailLevel to ReturnAll in your code as below:

        DetailLevelCodeType[] detailLevels = new DetailLevelCodeType[]{

            DetailLevelCodeType.RETURN_ALL

        };

        GetUserCall call = new GetUserCall(context);

        call.setDetailLevel(detailLevels);

        call.setUserID(OTHER EBAY USER's USERID");

 

  You can fix the request error if you comment out  'call.setDetailLevel(detailLevels)'. 

 

 For GetUser call,  you can only use ReturnAll detail level for either two use cases below:

  1. you are retrieving the data for the requester identified by the user token  

  2. you have transaction relationship with the userID passed into the call.setUserID method and the ItemID is also passed through in the same call.

 

 

Best Regards,

 

  

· Share
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.