---
metadata:
  - name: generator
    content: Diplodoc Platform v5.63.1
alternate:
  - https://yandex.ru/dev/kit/ru/openapi/Klienty/GetCustomerCart.md
  - href: https://yandex.ru/dev/kit/ru/openapi/Klienty/GetCustomerCart.md
    type: text/markdown
    title: Markdown version
  - href: https://yandex.ru/dev/kit/ru/llms.txt?revision=2ae18b532326fa8e770e853bc2ca2dc50a62ac6d
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/kit/ru/llms.txt?revision=2ae18b532326fa8e770e853bc2ca2dc50a62ac6d

<div class="openapi">

# Получение корзины клиента

<!-- markdownlint-disable-file -->

Возвращает текущий состав корзины клиента. Товары из наборов и выбранные подарки
попадают в `items` отдельными позициями наравне с обычными товарами. Позиции с товарами,
снятыми с публикации, в выдачу не попадают. Если корзина пуста или ее у клиента еще
не было, свойство `items` пусто, а суммы равны `0`.

## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-get);margin-bottom: 12px">

<div class="openapi__request">

GET {.openapi__method}
```text translate=no
https://api.kit.yandex.net/v1/customers/{customer_id}/cart
```

</div>

</div>

</div>

## Responses

<div class="openapi__response__code__200">

## 200 OK

Корзина клиента.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "items": [
    {
      "product_variant_id": "00000000-0000-0000-0000-000000000001",
      "name": "Футболка, размер M",
      "quantity": 2,
      "price": "1200.00",
      "final_price": "1100.00",
      "total_price": "2400.00",
      "total_final_price": "2200.00"
    }
  ],
  "total_price": "2400.00",
  "total_final_price": "2200.00",
  "updated_at": "2024-05-20T12:30:00Z"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_items_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [CartItem](#entity-CartItem)[]

Позиции корзины.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "product_variant_id": "00000000-0000-0000-0000-000000000001",
    "name": "Футболка, размер M",
    "quantity": 2,
    "price": "1200.00",
    "final_price": "1100.00",
    "total_price": "2400.00",
    "total_final_price": "2200.00"
  }
]
```

{% endcut %}
{.table-cell}
||
||

_total_final_price_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;decimal&gt;

Итоговая стоимость корзины после скидок на товары и наборы. Скидка по промокоду
корзины в нее не входит — в отличие от `Order.total_final_price`.

_Example:_{.json-schema-reset .json-schema-example} `2200.00`
{.table-cell}
||
||

_total_price_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;decimal&gt;

Общая стоимость корзины до скидок.

_Example:_{.json-schema-reset .json-schema-example} `2400.00`
{.table-cell}
||
||

_updated_at_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

Дата и время последнего изменения корзины. Отсутствует, если корзины у клиента еще не было.

_Example:_{.json-schema-reset .json-schema-example} `2024-05-20T12:30:00Z`
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### CartItem {#entity-CartItem}

Позиция в корзине клиента.

#|
|| **Name** | **Description** ||
||

_final_price_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;decimal&gt;

Цена товара за единицу после скидок на товар и наборы. Скидка по промокоду корзины
в нее не входит — в отличие от `OrderItem.final_price`.

_Example:_{.json-schema-reset .json-schema-example} `1100.00`
{.table-cell}
||
||

_name_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Название товара.

_Example:_{.json-schema-reset .json-schema-example} `Футболка, размер M`
{.table-cell}
||
||

_price_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;decimal&gt;

Цена товара за единицу до скидок.

_Example:_{.json-schema-reset .json-schema-example} `1200.00`
{.table-cell}
||
||

_product_variant_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;uuid&gt;

Идентификатор товара. Не является уникальным ключом позиции. Один товар попадает
в несколько позиций, если он:
- является частью набора;
- добавлен с разными дополнительными услугами;
- выбран подарком.
Количества по таким позициям нужно суммировать.

_Example:_{.json-schema-reset .json-schema-example} `00000000-0000-0000-0000-000000000001`
{.table-cell}
||
||

_quantity_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Количество товара, которое клиент положил в корзину. Может превышать остаток на складе.
Приводится к доступному значению, когда клиент открывает корзину или оформляет заказ.
{.table-cell}
||
||

_total_final_price_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;decimal&gt;

Итоговая стоимость позиции — `final_price`, умноженная на `quantity`.

_Example:_{.json-schema-reset .json-schema-example} `2200.00`
{.table-cell}
||
||

_total_price_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;decimal&gt;

Стоимость позиции до скидок — `price`, умноженная на `quantity`.

_Example:_{.json-schema-reset .json-schema-example} `2400.00`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "product_variant_id": "00000000-0000-0000-0000-000000000001",
  "name": "Футболка, размер M",
  "quantity": 2,
  "price": "1200.00",
  "final_price": "1100.00",
  "total_price": "2400.00",
  "total_final_price": "2200.00"
}
```

{% endcut %}

</div>

</div>

<div class="openapi__response__code__400">

## 400 Bad Request

Некорректный запрос.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "code": "VALIDATION_ERROR",
  "message": "Invalid input",
  "trace_id": "00000000000000000000000000000000"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_code_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `VALIDATION_ERROR`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `Invalid input`
{.table-cell}
||
||

_trace_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Уникальный идентификатор запроса для отладки.

_Example:_{.json-schema-reset .json-schema-example} `00000000000000000000000000000000`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__401">

## 401 Unauthorized

Не авторизован.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "code": "VALIDATION_ERROR",
  "message": "Invalid input",
  "trace_id": "00000000000000000000000000000000"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_code_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `VALIDATION_ERROR`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `Invalid input`
{.table-cell}
||
||

_trace_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Уникальный идентификатор запроса для отладки.

_Example:_{.json-schema-reset .json-schema-example} `00000000000000000000000000000000`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__404">

## 404 Not Found

Ресурс не найден.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "code": "VALIDATION_ERROR",
  "message": "Invalid input",
  "trace_id": "00000000000000000000000000000000"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_code_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `VALIDATION_ERROR`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `Invalid input`
{.table-cell}
||
||

_trace_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Уникальный идентификатор запроса для отладки.

_Example:_{.json-schema-reset .json-schema-example} `00000000000000000000000000000000`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__500">

## 500 Internal Server Error

Внутренняя ошибка сервера.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "code": "VALIDATION_ERROR",
  "message": "Invalid input",
  "trace_id": "00000000000000000000000000000000"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_code_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `VALIDATION_ERROR`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `Invalid input`
{.table-cell}
||
||

_trace_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Уникальный идентификатор запроса для отладки.

_Example:_{.json-schema-reset .json-schema-example} `00000000000000000000000000000000`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

</div>

[*Deprecated]: No longer supported, please use an alternative and newer version.