public IHttpActionResult GetProductInformation([FromBody] GetProductInformationRequest request) { ProductCatalog catalog = CatalogLibrary.GetCatalog(request.CatalogId); Product product = CatalogLibrary.GetProduct(request.Sku); Category category = CatalogLibrary.GetCategory(request.CategoryId.Value); string niceUrl = CatalogLibrary.GetNiceUrlForProduct(product, category, catalog); PriceCalculation priceCalculation = CatalogLibrary.CalculatePrice(product); Currency currency = priceCalculation.YourPrice.Amount.Currency; ProductInformation productInformation = new ProductInformation() { NiceUrl = niceUrl, PriceCalculation = new PriceCalculationViewModel() { Discount = new PriceViewModel() { Amount = new MoneyViewModel() { Value = priceCalculation.Discount.Amount.Value, DisplayValue = new Money(priceCalculation.Discount.Amount.Value, currency).ToString() }, AmountExclTax = new MoneyViewModel() { Value = priceCalculation.Discount.AmountExclTax.Value, DisplayValue = new Money(priceCalculation.Discount.AmountExclTax.Value, currency).ToString() }, AmountInclTax = new MoneyViewModel() { Value = priceCalculation.Discount.AmountInclTax.Value, DisplayValue = new Money(priceCalculation.Discount.AmountInclTax.Value, currency).ToString() } }, IsDiscounted = priceCalculation.IsDiscounted, YourPrice = new PriceViewModel() { Amount = new MoneyViewModel() { Value = priceCalculation.YourPrice.Amount.Value, DisplayValue = new Money(priceCalculation.YourPrice.Amount.Value, currency).ToString() }, AmountInclTax = new MoneyViewModel() { Value = priceCalculation.YourPrice.AmountInclTax.Value, DisplayValue = new Money(priceCalculation.YourPrice.AmountInclTax.Value, currency).ToString() }, AmountExclTax = new MoneyViewModel() { Value = priceCalculation.YourPrice.AmountExclTax.Value, DisplayValue = new Money(priceCalculation.YourPrice.AmountExclTax.Value, currency).ToString() } }, ListPrice = new PriceViewModel() { Amount = new MoneyViewModel() { Value = priceCalculation.ListPrice.Amount.Value, DisplayValue = new Money(priceCalculation.ListPrice.Amount.Value, currency).ToString() }, AmountExclTax = new MoneyViewModel() { Value = priceCalculation.ListPrice.AmountExclTax.Value, DisplayValue = new Money(priceCalculation.ListPrice.AmountExclTax.Value, currency).ToString() }, AmountInclTax = new MoneyViewModel() { Value = priceCalculation.ListPrice.AmountInclTax.Value, DisplayValue = new Money(priceCalculation.ListPrice.AmountInclTax.Value, currency).ToString() } } } }; productInformation.Sku = product.Sku; return(Json(productInformation)); }