# 2025-02-18: Cart Service - deprecated fields

## Overview

Several fields in cart's response have been deprecated and are now replaced by `calculatedPrice` and `unitPrice` fields. The new fields provide a more comprehensive and consistent way to access price calculations.

### Deprecated cart-level fields:

* `totalPrice` - use `calculatedPrice.finalPrice` instead
* `subTotalPrice` - use `calculatedPrice.price` or `calculatedPrice.discountedPrice` instead
* `taxAggregate` - use `calculatedPrice.finalPrice.taxAggregate` instead
* `subtotalAggregate` - use `calculatedPrice.price` instead
* `totalDiscount` - use `calculatedPrice.totalDiscount` instead
* `feeYrnAggregate` - use `calculatedPrice.totalFees` and `items[].calculatedPrice.fees` instead
* `shipping` - use `calculatedPrice.totalShipping` instead
* `itemFeesTotal` - use `calculatedPrice.totalFee` instead
* `paymentFeesTotal` - use `calculatedPrice.paymentFees` instead
* `totalAuthorizedAmount` - use `calculatedPrice.upliftValue` instead

### Deprecated cart item-level fields:

* `price` - use `unitPrice` instead
* `itemPrice` - use `unitPrice` instead
* `itemTaxInfo` - use `calculatedPrice.price` instead
* `fees` - use `calculatedPrice.fees` instead
* `authorizedAmount` - use `calculatedPrice.upliftValue` instead
* `totalDiscount` - use `calculatedPrice.totalDiscount` instead
* `externalFees` - use `calculatedPrice.fees` instead
* `couponDiscounts` - use `calculatedPrice.totalDiscounts.appliedDiscounts` instead

## Updated endpoints

| Endpoint                                                                                                                                                                    | Description                                                                   |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| [Retrieving cart details by ID](https://developer.emporix.io/api-references/api-guides/checkout/cart/api-reference/carts#get-cart-tenant-carts-cartid)                      | Deprecated response fields are replaced by `calculatedPrice` and `unitPrice`. |
| [Retrieving cart details by criteria](https://developer.emporix.io/api-references/api-guides/checkout/cart/api-reference/carts#get-cart-tenant-carts)                       | Deprecated response fields are replaced by `calculatedPrice` and `unitPrice`. |
| [Retrieving all products added to a cart](https://developer.emporix.io/api-references/api-guides/checkout/cart/api-reference/cart-items#get-cart-tenant-carts-cartid-items) | Deprecated response fields are replaced by `calculatedPrice` and `unitPrice`. |

## Known problems

There are no known problems.
