Ebay developer API function get_item_aspects_for_category returns only English content - ebay-api

I'm working on eBay Developer API with addItem method, that requires to make an additional call for category aspects by given category ID. My marketplace is Germany and addItem requires me to send aspects with German language but eBay get_item_aspects_for_category returns only English values. I'm sending Accept-Language header as de-DE and X-EBAY-C-MARKETPLACE-ID as EBAY_DE for sure.
What im doing wrong?
For example i have a category id 258017, that returns something like that:
{"aspects":[{"localizedAspectName":"Brand","aspectConstraint":{"aspectDataType":"STRING","itemToAspectCardinality":"SINGLE","aspectMode":"FREE_TEXT","aspectRequired":true,"aspectUsage":"RECOMMENDED","aspectEnabledForVariations":false,"aspectApplicableTo":["PRODUCT"]},"aspectValues":[{"localizedValue":"Unbranded"},{"localizedValue":"+ONE"},{"localizedValue":"10 Strawberry Street"}]}

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

Related

Shopify Storefront - How to create a customer with a local context?

I have difficulties creating a customer the way I want.
The store has German as the base language, and English, France and Spanish as other supported languages.
When I create a customer with the storefront graphql API, it will always have german as the language used for the notification emails.
So what I tried already:
Use the #inContext(locale: Fr) -Syntax
Make use of accept-language and content-language http headers
What I tried as well, was to update the customer entity by using the admin-grapqhl API. Even though this worked as expected, the first welcome mail will still be sent in german, since I can only update the customer after it was created.
I cannnot create the customer by the admin API as well, because I would loose the option for the user so set a password.
It's quite unimaginable that this is not covered by the storefront API somehow, so does anyone has a clue on how to archive this?

How to get localized game news from Steam Web API?

The Steam Web API has an ISteamNews interface with a GetNewsForApp method that returns the latest game announcements, example request
GET http://api.steampowered.com/ISteamNews/GetNewsForApp/v0002/?appid=570&count=3&maxlength=0&format=json&feeds=steam_community_announcements
And everything works fine, but the news are only in English, and I can't find how to change it.
Some methods have an optional l= parameter, but it does not work for news, although the steam client displays localized news and, according to the documentation, there is full support for localizations.
I'm fairly certain the documentation you're linking is for publishing a news event for Steam partners/developers.
When running the SupportedAPIList call from this documentation: Steam Web API News Documentation
These are the parameters the API currently accepts for non-publishers/devs without an API Key:
{"name":"GetNewsForApp","version":2,"httpmethod":"GET","parameters":
{"name":"appid","type":"uint32","optional":false,"description":"AppID to retrieve news for"}
{"name":"maxlength","type":"uint32","optional":true,"description":"Maximum length for the content to return, if this is 0 the full content is returned, if it's less then a blurb is generated to fit."}
{"name":"enddate","type":"uint32","optional":true,"description":"Retrieve posts earlier than this date (unix epoch timestamp)"}
{"name":"count","type":"uint32","optional":true,"description":"# of posts to retrieve (default 20)"}
{"name":"feeds","type":"string","optional":true,"description":"Comma-separated list of feed names to return news for"}
{"name":"tags","type":"string","optional":true,"description":"Comma-separated list of tags to filter by (e.g. 'patchnodes')"}]}]}
You will have to play around with these parameters to filter the proper responses. Just remember that the Steam API allows only 100,000 requests within a 24 hour period or your IP/API key may be subject to ban or withdrawal. Unfortunately at this time I have been unable to locate what sorts of queries the parameters feeds and tags accept.
Goodluck

How can I retrieve Shopify products via the REST API in a specific language without being admin?

Imagine a route on a Shopify shop like this: https://shopifyshop.com/products/some-product?lang=en - then I can access the product as JSON like this: https://shopifyshop.com/products/some-product.json?lang=en
However the main issue is that then the ?lang parameter is not respected. How can I have it respect the language parameter?
If the shop has the multiple languages enabled you can use the language code in the url like, example for Japanese:
shopifyshop.com/ja/products/some-product.json

Ebay API. Translate

I use ebay API. Products get to the location US siteId = 0, so that everything goes back to English (the category and products).
Searched API for translation in the official documentation, found nothing.
Question: how to get the products and categories in Russian language?
Little old question but..
eBay does not automatically translate its categories according to the siteId.
there are several eBay marketplaces see here
and each has its own categories and its category version (means that some categories found in siteId==0 are not available in other siteId) that can be retrieved via getCategories
then there are "real" translation APIs
but that's another kind of services:
Translaion APIs

Transform eBay search URL into eBay REST API call to get the same items

Here's what I want to do .
Users search for the items they want to track on main eBay website and set filters
They enter the URL on my website. Sample eBay URL
I make calls to eBay API and email them if items with price lower than X have been listed
To do that, I need to transform the eBay URL I mentioned above into an URL to call eBay REST API and get the same products.
So far I only managed to search by keywords and order by newest listing:
http://svcs.ebay.com/services/search/FindingService/v1?SECURITY-APPNAME=XXXXXX&OPERATION-NAME=findItemsByKeywords&SERVICE-VERSION=1.0.0&RESPONSE-DATA-FORMAT=JSON&RESTPAYLOAD&keywords=iphone&paginationInput.entriesPerPage=10&sortOrder=StartTimeNewest
I don't know how to get the search parameters from main eBay URL and use them to call the API.
You'll probably need to reverse engineer all/most of eBay's URL parameters to interpret exactly what the user is intending to search for. Then from there you can build an API call.
I'm not aware of any formal documentation of eBay URL parameters. I've unofficially noted a few on my site, but there are many more.