Home
Find the answer to your question
I need to make a GeteBayDetails call to get the ShippingServices for UK using SOAP. How should I specify the sites?
Summary
You need to specify the required siteid in the server URL against which you are making the SOAP request. For instance, if you are need to get the shipping services for UK, you need to set the numeric value of the siteid parameter to 3.
Detailed Description
>
private void SOAPCall() { eBaySOAP.eBayAPIInterfaceService service = new eBaySOAP.eBayAPIInterfaceService(); string endpoint = "https://api.sandbox.ebay.com/wsapi"; string callName = "GeteBayDetails"; string siteId = "3"; string version = "1031";
// Build the request URL and set the siteid string requestURL = endpoint + "?callname=" + callName
// Assign the request URL to the servicelocator. service.Url = requestURL;
// Set credentials service.RequesterCredentials = new eBaySOAP.CustomSecurityHeaderType(); service.RequesterCredentials.eBayAuthToken = "token"; //use your token
eBaySOAP.GeteBayDetailsRequestType request = new eBaySOAP.GeteBayDetailsRequestType(); request.DetailName = new eBaySOAP.DetailNameCodeType[1]; request.DetailName.SetValue(eBaySOAP.DetailNameCodeType.ShippingServiceDetails, 0); request.Version = version; eBaySOAP.GeteBayDetailsResponseType response = service.GeteBayDetails(request);
} |