question

jusrich_7650 avatar image
0 Likes"
jusrich_7650 asked ·

REST option for getCategories?

Is there an example of fetching categories via REST?

Heres an example of what I'm trying to do currently, to get categories for ebay motors.

https://svcs.ebay.com/services/search/TradingService/v1?
SECURITY-APPNAME=myappid
&OPERATION-NAME=GetCategories
&SERVICE-VERSION=1.0.0
&GLOBAL-ID=EBAY-MOTOR&API-SITEID=100

This isn't working and returns with a "1" :(

I don't have a ton of experience with SOAP, so anyway to grab data with GET url params, or even POST with body would be great. I've looked through a lot of the documentation around gettting categories and it seams a little sparse of examples here.

Thanks for any guidance on this topic!



categoriescategories list
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
clickimusprime avatar image
0 Likes"
clickimusprime answered ·

You can use XML post or SOAP with TradingAPI. Take a look at the Taxonomy API. It's REST and you don't have to sign up for it, but you need to use tokens.



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

Thanks @clickimusprime for the response!

I poked around and thankfully I found the OpenAPI docs to know how to make the call. Glad they are moving to this format as the docs have been pretty confusing for getting categories.

https://developer.ebay.com/api-docs/commerce/taxonomy/static/overview.html

For those that find this and just want to skip right to getting the categories the endpoint is

https://api.ebay.com/commerce/taxonomy/v1/category_tree/:category_tree_id

You'll need to send the need to send the Oauth header `Bearer {myoauthtoken}` along with the request.

0 Likes 0 · ·

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.