hendt/ebay-api

API translates my listings into German

Closed this issue · 4 comments

new eBayApi({
	appId: config.eBay.clientID,
	certId: config.eBay.clientSecret,
	sandbox: false,
	siteId: eBayApi.SiteId.EBAY_GB,
	scope: [
		"https://api.ebay.com/oauth/api_scope",
	],
	acceptLanguage: "en-GB",
	contentLanguage: ContentLanguage.en_GB,
});

this.ebay.oAuth2.getClientAccessToken()`

This is how I initialize the API wrapper. Later I call

let item = await this.ebay.buy.browse.getItemByLegacyId({
	legacy_item_id: itemID,
});

This query works, but the title of the listing is translated into German from English.
For example. the title Samsung SMT-C7100/C7101 500GB Boxed with Remote Control NEW becomes Samsung smt-c7100/c7101 500gb boxed mit Fernbedienung NEU but the description remains in English. Also, some details such as condition are also translated into German, such as condition, neu. The price is also converted into Euros.

Help with this would be appreciated.

Didn't check, but try to set also the marketplaceId:

new eBayApi({
	appId: config.eBay.clientID,
	certId: config.eBay.clientSecret,
	sandbox: false,
	siteId: eBayApi.SiteId.EBAY_GB,
        marketplaceId: eBayApi.MarketplaceId.EBAY_GB,
	scope: [
		"https://api.ebay.com/oauth/api_scope",
	],
	acceptLanguage: "en-GB",
	contentLanguage: ContentLanguage.en_GB,
});

Yep, that worked. Still can't understand why it chose German. Thanks a bunch!

Because this API is heavily used and developed by German merchant :)
I'll explaint this more in documentation and maybe it would be better to to set US/GB as default...

Ah I see. It could be more preferable to not have a default and force the user to specify their own?