question

dallasbusinessphone avatar image
0 Likes"
dallasbusinessphone asked ·

How to check order cancellation status as a seller with eBay post order API call?

Hi, 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 "400 bad request" response after the call. The following is the call process I wrote: string url = " https://api.ebay.com/post-order/v2/cancellation/check_eligibility";; HttpWebRequest cancelOrderRequest = (HttpWebRequest)WebRequest.Create(url); cancelOrderRequest.Headers.Add("Authorization" ,"TOKEN " + UserDataManager.Instance.KeyedToken[this.sellerID].ToString()); cancelOrderRequest.ContentType = "application/json"; cancelOrderRequest.Accept = "application/json"; cancelOrderRequest.Headers.Add("X-EBAY-C-MARKETPLACE-ID", "EBAY_US"); cancelOrderRequest.Headers.Add("legacyOrderId", this.orderLineItemID); cancelOrderRequest.Method = "POST"; HttpWebResponse response = (HttpWebResponse)cancelOrderRequest.GetResponse(); 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.
post order apinot workingcancellationhttp bad request
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.

zhuowei.developersupport@ebay.com avatar image
0 Likes"
zhuowei.developersupport@ebay.com answered ·
Hi dallasbusinessphone, As per our log, you were pointing to the following Resource URI ` /post-order/v2/cancellation/check_eligibility%7B%22legacyOrderId%22:%20%223712593xxxxx-9027407xxxxx%22%7D` the "check_eligibility" API call. The correct Resource URI for the POST call should be https://api.ebay.com/post-order/v2/cancellation/check_eligibility for production environment showing below:![alt text][1] Can you give it a try and let me know if that works? Best Regards, [1]: /storage/temp/1186-cancellation-check-eligibility-call.png

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

zhuowei.developersupport@ebay.com avatar image
0 Likes"
zhuowei.developersupport@ebay.com answered ·
Hi blocki26, According to our log, you did not pass the required **Authorization** http request header as documented here: http://developer.ebay.com/Devzone/post-order/concepts/MakingACall.html#headers Hi dallasbusinessphone, I am able to get result for the orderid: 371113342980-906277908024 with no issue. Can you try the call via Postman? Share a screen shot if you are still running into an error. ![alt text][1] Best Regards, [1]: /storage/temp/1228-check-cancel-eligibility-371113342980-906277908024.png

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

blocki26 avatar image
0 Likes"
blocki26 answered ·
Hello @ zhuowei.developersupport@ebay.com , any updates on my last reported issue? How can we check Inquiry Eligibility without a 401 error? Thanks in advance.
· 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.

dallasbusinessphone avatar image
0 Likes"
dallasbusinessphone answered ·
Hi, Mr. Zhuowei, Thank you for your time. I have modified my codes. Rewrite the request URI and body parameters. Now I get a response as '400 Bad Request'. Request URI: https://api.ebay.com/post-order/v2/cancellation/check_eligibility Request Body: "legacyOrderId": "371113342980-906277908024" Response {nnCoection: close RlogId: t6%60dhdfiuq%60%3F%3Cdka7e37e*fa%3Ea-159f5cc546c-0xfb Content-Length: 183 Date: Tue, 31 Jan 2017 18:32:05 GMT Set-Cookie: ebay=%5Esbf%3D%23%5E;Domain=. ebay.com;Path=/,dp1=bu1p/QEBfX0BAX19AQA**5a720ba6^;Domain=. ebay.com;Expires=Thu, 31-Jan-2019 18:32:06 GMT;Path=/,s=CgAD4ACBYkimmZjVjYzU0NmIxNTkwYTYyMDZkNzAzZWY4ZmZhOTUzMTalRJhw;Domain=. ebay.com;Path=/; HttpOnly,nonsession=CgADLAAFYkN8uMQDKACBh9tmmZjVjYzU0NmIxNTkwYTYyMDZkNzAzZWY4ZmZhOTUzMTaodRt2;Domain=. ebay.com;Expires=Wed, 31-Jan-2018 18:32:06 GMT;Path=/ X-Content-Type-Options: nosniff X-EBAY-C-REQUEST-ID: ri=wp90iYKKbu28,rci=uwWsr8lkfLOWCHt8 X-EBAY-C-VERSION: 1.0.0 X-EBAY-REQUEST-ID: 159f5cc5468.a88bb72.7315d.fa2bb6e0![PESClient[]] X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block Content-Type: application/json Connection: keep-alive } Would you mind checking what's going on please? Appreciate you. 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.

blocki26 avatar image
0 Likes"
blocki26 answered ·
I just tried the legacyOrderId version (rest of the request kept the same) and the outcome is the same: Status Code: 401 Unauthorized Connection: keep-alive Content-Encoding: gzip Content-Length: 20 Date: Thu, 26 Jan 2017 17:52:53 GMT RlogId: t6q%60uhbuv*fkpfgsecklb%7Dp0m%3D9un%7Fq%60uhbuv*533316-159dbe8a0ec-0xe9 Set-Cookie: dp1=bu1f/Jutta5a6b6af5^tzo/-3c588a4585^exc/0%3A0%3A0%3A058b1c475^pcid/11166369435a6b6af5^mpc/0%7C7758976675^a1p/0588b88f 5^u1p/YmxvY2tpMjY*5a6b6af5^bl/DE5c4c9e75^expt/0001485452766197597acf9e^pbf/%238080000000045a6b6af5^;Domain=. ebay.com;Expires=Sat, 26-Jan-2019 17:52:53 GMT;Path=/ WWW-Authenticate: IAF,TOKEN,ESAMS,APP,ASSERTION,IP, X-EBAY-C-REQUEST-ID: ri=%2BhIhcxn9s1wC,rci=Do%2FM8cH0rFMWePrW X-EBAY-C-VERSION: 1.0.0 X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block x-content-type-options: nosniff
· 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.

blocki26 avatar image
0 Likes"
blocki26 answered ·
Hi zhuowei.developersupport@ebay.com, I did an Inquiry Eligibility check and according to your documentation here: https://developer.ebay.com/Devzone/post-order/post-order_v2_inquiry_check_eligibility__post.html the correct payload/body is { /* CheckInquiryEligibilityRequest */ "itemId": string, "transactionId": string }
· 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.

zhuowei.developersupport@ebay.com avatar image
0 Likes"
zhuowei.developersupport@ebay.com answered ·
Hi block26, The Check Cancellation Eligibility API call only supports one request parameter: [legacyOrderId][1] Please replace your request payload with the following and give it a try { "legacyOrderId":"110186875804-28301757001" } Let me know if there are still issues. Best Regards, [1]: http://developer.ebay.com/Devzone/post-order/post-order_v2_cancellation_check_eligibility__post.html#Request.legacyOrderId
· 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.

blocki26 avatar image
0 Likes"
blocki26 answered ·
Hey @ zhuowei.developersupport@ebay.com , I'd like to give a reminder as my test was 3 days ago and the logs only go back 7 days.
· 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.

blocki26 avatar image
0 Likes"
blocki26 answered ·
Sorry, I meant to test and post this earlier but couldn't find the time to do so. I refer only to Sandbox right now. UserID: testuser_block2 Method: POST Call URI: https://api.sandbox.ebay.com/post-order/v2/inquiry/check_eligibility Body: { "itemId": "110186875804", "transactionId": "28301757001" } Response: Status Code: 401 Unauthorized Connection: keep-alive Content-Encoding: gzip Content-Length: 20 Date: Fri, 20 Jan 2017 12:48:27 GMT Set-Cookie: ebay=%5Esbf%3D%23%5E;Domain=. ebay.com;Path=/ dp1=bu1p/QEBfX0BAX19AQA**5a633a9b^bl/DEen-US5c446e1b^;Domain=. ebay.com;Expires=Sun, 20-Jan-2019 12:48:27 GMT;Path=/ s=CgAD4ACBYg1ibYmI5NWMwZGIxNTkwYTg2MDhiOTBjNDdiZmZjYTgzNDb59ocK;Domain=. ebay.com;Path=/; HttpOnly nonsession=CgADKACBh6AibYmI5NWMwZGIxNTkwYTg2MDhiOTBjNDdiZmZjYTgzNDakydu0;Domain=. ebay.com;Expires=Sat, 20-Jan-2018 12:48:27 GMT;Path=/ WWW-Authenticate: IAF,TOKEN,ESAMS,APP,ASSERTION,IP, X-EBAY-C-REQUEST-ID: ri=xKTLZs9eouYc,rci=jAy0EDq54vC94mnh X-EBAY-C-VERSION: 1.0.0 X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block rlogid: t6q%60uhbuv*fkpfgsecklb%7Dp0m%3D9un%7Fq%60uhbuv*533316-159bbebc305-0xcb x-content-type-options: nosniff I also meant to add a screenshot of my RESTClient but it always says "Error parsing the uploaded file.".
· 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.

dallasbusinessphone avatar image
0 Likes"
dallasbusinessphone answered ·
Hi, Thank you for your reply. I didn't use Sandbox test. I don't have Sandbox UserID. I used production UserID directly. I just tried to call the "check_eligibility" API again, still 401 unauthorized and returned RlogId: t6%60dhdfiuq%60%3F%3Cdka7e37e*fa%3Ea-159adf1c377-0x121 Date: Tue, 17 Jan 2017 19:40:19 GMT My API requester's Production AppID: suntechc-suntech-PRD-1d2ce5828-1ac21bf8 Thank you so much for all your help. 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.