Developer forum

Forum » Development » Unit name/code in /dwapi/ecommerce/carts

Unit name/code in /dwapi/ecommerce/carts

Martin Moen
Reply

When using /dwapi/ecommerce/carts/{secret} to get cart information through the API we only get the UnitId back.
What would be the best way to get the name of the unit?

Do I have to query the product API for each orderline to get it?
There is no API-endpoint to get the Units...

 

Screenshot_2021-12-12_110859.png

Replies

 
Nicolai Pedersen
Reply

Hi Martin

You cannot. I have added UnitName to the orderlineviewmodel. You need an update to Dynamicweb.Ecommerce to get this change.

I have noted down the missing unit endpoint.

BR Nicolai

 
Martin Moen
Reply

Thanks! Which version will it be available in (1.12.35)?
https://www.nuget.org/packages/Dynamicweb.Ecommerce/

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Yes, probably.

Votes for this answer: 1

 

You must be logged in to post in the forum