Developer forum

Forum » Ecommerce - Standard features » Web API GetProduct variant ID

Web API GetProduct variant ID

Mafalda Correa Dynamicweb Employee
Mafalda Correa
Reply

Hi,

I'm using the web api to get a product feed and I need to pass the Variant id, I tried passing it as a parameter, but I still only get the base product and not the variant. 

https://dev-swiftrizzo.mydwsite1.com/dwapi/Products/GetProduct?ProductId=10059&VariantId=VO3.VO13&LanguageId=LANG1&CurrencyCode=EUR&CountryCode=DK&ShopId=SHOP1&FilledProperties=Id,Name,VariantId,Price&PriceSettings.ShowPricesWithVat=True&PriceSettings.FilledProperties=PriceFormatted

Is it not possible to get the variant or am I doing something wrong?


Replies

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply

Hi,

I was able to ouput the property on DW9.12 admin via URL e.g. as follows: /dwapi/ecommerce/products/prod1343/VO64?LanguageId=LANG1&CurrencyCode=EUR&CountryCode=&ShopId=SHOP4&FilledProperties=Id,Name,VariantId (attachment).

BR, Oleg QA

2021-09-15_13-48-45.png
 
Mafalda Correa Dynamicweb Employee
Mafalda Correa
Reply

I thought I had to use the GetProduct controller to get a JSON response, but I've tried the way you suggested and it works just fine. Thank you!

 

You must be logged in to post in the forum