Developer forum

Forum » Ecommerce - Standard features » Products WebApi return specific ProductField only

Products WebApi return specific ProductField only

Mario Santos Dynamicweb Employee
Mario Santos
Reply

Hi,

How can we request the products webapi to return a specific product field and not all? I tried with the following query parameters but with no luck:

  • ProductSettings.ProductFieldSettings.FieldsToShow=IsNonOrderable
  • ProductFieldSettings.FieldsToShow=IsNonOrderable

Sample URL:
https://dev-swiftrizzo.mydwsite1.com/dwapi/ecommerce/products/search?QueryName=Products&RepositoryName=Products&UserId=&LanguageId=LANG1&CurrencyCode=USD&CountryCode=US&ShopId=SHOP1&ProductSettings.FilledProperties=Id,Name,Number,VariantId,DefaultUnitId,StockLevel,NeverOutOfstock,Price,ProductFields&ProductSettings.PriceSettings.ShowPricesWithVat=True&ProductSettings.PriceSettings.FilledProperties=PriceFormatted,Price&&PageSize=7&eq=10046

BR, Mario

 


Replies

 
Pedro Meias
Pedro Meias
Reply

Hi Dynamicweb,

Recently faced the same situation. It would help us to know how to request the webapi to return a single product field.

 

Thank you.

 
Mario Santos Dynamicweb Employee
Mario Santos
Reply

Is this possible?

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

I need to understand exactly what you are looking for?

The API can strip out properties - but when it comes to product fields and categories the property it self is a collection and you might want to return only a specific value from that collection - so a bit different (and currently not supported).

I.e. you want to return only the item in the "ProductFields" array where the systename=MyVolume?

 
Mario Santos Dynamicweb Employee
Mario Santos
Reply

Yes, that's exacly what we are looking for. So depending on API request parameters it would only return a specific item in the ProductFields array, in your example it would be the MyVolume.

 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply

Hi Mario and Pedro

An update has been made to this issue. 
Please try the new updated version 9.16.8 or 9.17.1 
Get these releases from the download section https://doc.dynamicweb.dk/downloads/dynamicweb-9 

Kind Regards
Care Support
Kristian Kirkholt

 

You must be logged in to post in the forum