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

## Overview

Several fields in order's response have been deprecated in favor of new `calculatedPrice` and `unitPrice` fields. The new fields provide a more comprehensive and consistent way to access price calculations.

### Deprecated order-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 order 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                                                              |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
| [Creating a new order as employee](https://developer.emporix.io/api-references/api-guides/orders/order/api-reference/orders-tenant-managed#post-order-v2-tenant-salesorders)         | Deprecated response fields in favor of `calculatedPrice` and `unitPrice` |
| [Creating a new order as customer](https://developer.emporix.io/api-references/api-guides/orders/order/api-reference/orders-customer-managed#post-order-v2-tenant-orders)            | Deprecated response fields in favor of `calculatedPrice` and `unitPrice` |
| [Retrieving order details](https://developer.emporix.io/api-references/api-guides/orders/order/api-reference/orders-customer-managed#get-order-v2-tenant-orders-orderid)             | Deprecated response fields in favor of `calculatedPrice` and `unitPrice` |
| [Retrieving a specific order by ID](https://developer.emporix.io/api-references/api-guides/orders/order/api-reference/orders-tenant-managed#get-order-v2-tenant-salesorders-orderid) | Deprecated response fields in favor of `calculatedPrice` and `unitPrice` |

## Known problems

There are no known problems.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.emporix.io/changelog/archive/changelog-2025/2025-02-18-order.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
