question

chrdavid avatar image
0 Likes"
chrdavid asked

getItemAspectsForCategory returns only English values,getItemAspectsForCategory for Germany returns english values

Hi! Im working with Germany Marketplace with addItem method that requres to send ItemSpecifics fields with Germany language, but getItemAspectsForCategory method returns only English values and I'm getting error about that. For example Brand has to be Marke, Product as Produkt. I'm sending request with headers Accept-Language as de-DE and X-EBAY-C-MARKETPLACE-ID as EBAY_DE

additemcategoriesaspects
10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

michab2003 avatar image
0 Likes"
michab2003 answered

servus david. this call doesn´t need any header. the category_tree_id tells ebay which "platform" is asked. so in your case, you have to use 77 (EBAY_DE)

for example:
https://api.ebay.com/commerce/taxonomy/v1/category_tree/77/get_item_aspects_for_category?category_id=259119

{
      "localizedAspectName": "Verschlussart",
      "aspectConstraint": {
        "aspectDataType": "STRING",
        "itemToAspectCardinality": "SINGLE",
        "aspectMode": "FREE_TEXT",
        "aspectRequired": false,
        "aspectUsage": "OPTIONAL",
        "aspectEnabledForVariations": false
      },
      "aspectValues": [
        {
          "localizedValue": "Drehverschluss"
        },
        {
          "localizedValue": "Druckverschluss"
        },
        {
          "localizedValue": "Klickverschluss"
        },
        {
          "localizedValue": "Trinkventil"
        }
      ]
    } 

and as always: use the API explorer first, then your code:

and secondly, as always: whenever possible, use production, not the sandbox! (sadly).

10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sh.imaja-79 avatar image
0 Likes"
sh.imaja-79 answered

UPD. Yes (not recommended), content returns in English, but eBay Developer API has Translation API with translate method that works with Deutsch (German) language also and its possible to translate some strings there and then send it to API.

crediblebh

UPD2. Finally Solved. getItemAspectsForCategory has an URI Parameter named category_tree_id that in real is Ebay Site ID of needle MarketPlace. But in docs description of this field doesnt follow site id implementation.


For example, endpoint for EBAY_DE (site id 77) for category 258017 has to be:


https:// api . ebay . com /commerce/taxonomy/v1/category_tree/77/get_item_aspects_for_category?category_id=258017

10 |600

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.