question

ngfx3592 avatar image
0 Likes"
ngfx3592 asked ·

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
cancellation
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
catherine_developersupport avatar image
0 Likes"
catherine_developersupport answered ·
· 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.