Question by ngfx3592 · Feb 05, 2018 at 02:27 AM · cancellation
Call Cancellation Check_eligibility API Response 500,Call In Sandbox
I'm trying to make a HTTP request to check the eligibility of orders. I'm pretty sure the token I used and legacyorderID I used are fine in this process. But I always get a "500 internal server error." response after the call. The following is the call process I wrote:
Code: var url = "https://api.sandbox.ebay.com/post-order/v2/cancellation/check_eligibility"; HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(url); httpWebRequest.ContentType = "application/json"; httpWebRequest.Accept = "application/json"; httpWebRequest.Method = "post"; httpWebRequest.Timeout = 50000; httpWebRequest.Headers.Add("X-EBAY-C-MARKETPLACE-ID", "EBAY_US,EBAY_UK,EBAY_DE,EBAY_AU,and EBAY_CA"); httpWebRequest.Headers.Add("Authorization", "TOKEN my token"); var model = new OrderEligibilityCheckInfo { LegacyOrderId = "110251868787-28831969001", };
var json = JsonConvert.SerializeObject(model).ToString();
byte[] byteArray = Encoding.UTF8.GetBytes(json);
httpWebRequest.ContentLength = byteArray.Length;
Stream stream = httpWebRequest.GetRequestStream();
stream.Write(byteArray, 0, byteArray.Length);
stream.Close();
HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
StreamReader streamReader = new StreamReader(httpWebResponse.GetResponseStream());
string responseContent = streamReader.ReadToEnd();
Could some one tell me, whether my settings of call are wrong or the cancel order API does not work now?
Thanks for the reply deeply.
Sandbox UserID: " testuser_ashcook " RlogId: t6%60dhdfiuq%60%28ciudbq%60anng%7Fu2h%3F%3Cwk%7Defmfckpse*1343454%29pqtfwpu%29pdhcaj%7E%29fgg%7E%606%28dlh-161650fb6b8-0x153 Response : Remote server return
Answer by catherine_developersupport · Feb 07, 2018 at 10:25 AM
duplicate posting as https://forums.developer.ebay.com/questions/25195/call-cancellation-check-eligibility-api-response-5.html
People who like this
Your answer
