question

d.b.metals avatar image
0 Likes"
d.b.metals asked ·

Issue with Search Inquiries call

import requests


def case_search():
    header = {"X-EBAY-API-SITEID": "0",
              "X-EBAY-API-COMPATIBILITY-LEVEL": "1179",
              "X-EBAY-C-MARKETPLACE-ID": "EBAY_US",
              "X-EBAY-API-CALL-NAME": "Get_Inquiry",
              "Authorization":  "Bearer --Oauth token--"}
    return requests.get("https://api.ebay.com/post-order/v2/inquiry/search?", headers=header)


x = case_search()
print(x.text)


This is the code I'm running and all I'm getting back is just some monstrosity of code blocks like this

</script><!--[if lt IE 9]></div><![endif]--></footer>

<div id="widget-platform">

<script type="application/javascript">window.widget_platform = {"renderType":1,"renderDelay":500,"triggerFallBack":true,"status":4,"queryParam":null,"widgets":[{"html":"","css":null,"js":null,"jsInline":null,"init":""}],"showdiag":[]};</script>

<div id='gh_user' style='display:none;'></div>

</div>

</div></div></main><script src=https://ir.ebaystatic.com/rs/c/error-b89405.js></script>;


I have no idea why or how but nothing I'm trying is working. I've adjusted the heads to exclude/include almost all combinations of what is suggested and required. I've tried doing broad and narrow searches but I keep getting the same response. It's a 200 code but it sure isn't anything useful.

post-order apisearch inquriries
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
sagar_developersupport avatar image
0 Likes"
sagar_developersupport answered ·

Hi @d.b.metals ,

We have noticed that you are not using all of required headers when making the calls.

Please go through the link given below to know all of the required headers and steps to make the call.

Ref: https://developer.ebay.com/devzone/post-order/concepts/MakingACall.html

Best regards ,
eBay Developer Support

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