# 2025-04-10: Cart Service - cart validation and configuration improvement

## Overview

A new cart validation endpoint has been added to allow validating a cart without performing any modifications. Additionally, a new configuration setting has been introduced that allows skipping the validation of the existing cart items when a new item is added to the cart. The configuration improves performance for carts that include multiple items.

## Added endpoints

| Endpoint                                                                                                                                                      | Description                                                                                                                                          |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Validating cart items](https://developer.emporix.io/api-references/api-guides/checkout/cart/api-reference/carts#get-cart-tenant-carts-cartid-validate)       | Validates cart items' prices.                                                                                                                        |
| [Adding a product to cart](https://developer.emporix.io/api-references/api-guides/checkout/cart/api-reference/cart-items#post-cart-tenant-carts-cartid-items) | When `cartItemValidationSkipExistingItemsValidationOnAddToCart` is set to `true`, the add to cart does not validate the existing cart items' prices. |

## New configuration settings

| Key                                                        | Name                                                            | Type    |
| ---------------------------------------------------------- | --------------------------------------------------------------- | ------- |
| `cartItemValidationSkipExistingItemsValidationOnAddToCart` | Skip existing cart items validation on adding new item to cart. | BOOLEAN |

## 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-04-10-cart.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.
