# deleteCartItem

Source: <https://telegafirst.com/docs/api-op-deletecartitem>
Locale: ru
releaseGitSha: ea133cd4ad87fe549ef000b139be145be9bd1717
sourceContentDigest: ab0b95074d5d5019bb1c37b492061f87f1c7077052cd1f93a2d9c92b6c5888c6
Version: 2

# deleteCartItem

`DELETE /api/v1/carts/{code}/items/{line_no}`

deleteCartItem

## Авторизация и права

Scopes: ALL. Auth alternatives: OR; scopes внутри альтернативы: ALL.

| Поле | Значение |
| - | - |
| security.0.hubApiKey | \[] |
| security.1.hubBearer | \[] |
| securitySchemes.hubApiKey.in | "header" |
| securitySchemes.hubApiKey.name | "X-Api-Key" |
| securitySchemes.hubApiKey.type | "apiKey" |
| securitySchemes.hubBearer.scheme | "bearer" |
| securitySchemes.hubBearer.type | "http" |
| x-required-scopes | \["orders"] |

## Параметры запроса

| Поле | Значение |
| - | - |
| 0.in | "path" |
| 0.name | "code" |
| 0.required | true |
| 0.schema | [0.schema](https://telegafirst.com/docs/schema-46feeaff5156934ff5aa18bda9501891f2b15e520703af2ac60c0fa351d0127d) |
| 1.in | "path" |
| 1.name | "line\_no" |
| 1.required | true |
| 1.schema | [1.schema](https://telegafirst.com/docs/schema-2a1379ebe9f4b632fbdf3732d4b86b26e9fbf2aa92cf2449dde7bf4dc122060f) |
| 2.in | "header" |
| 2.name | "If-Match" |
| 2.required | true |
| 2.schema | [2.schema](https://telegafirst.com/docs/schema-c368c9e6d62cd43841854a0c6b6f706bca622d6fb3feae05cb9569025bbfe2d8) |

## Тело запроса

| Поле | Значение |
| - | - |
| Тело запроса | null |

## Ответы

| Поле | Значение |
| - | - |
| 200.content.application/json.schema | [CartProjection](https://telegafirst.com/docs/schema-14c8c8839d36ba8567ab99849fc8eb9e0980131dd606d30149dcb62f8e8a529b) |
| 200.description | "Line deleted; an empty Cart remains active" |
| 200.headers.ETag.description | "Strong Cart composition validator" |
| 200.headers.ETag.required | true |
| 200.headers.ETag.schema | [200.headers.ETag.schema](https://telegafirst.com/docs/schema-c368c9e6d62cd43841854a0c6b6f706bca622d6fb3feae05cb9569025bbfe2d8) |

## Ошибки

| Поле | Значение |
| - | - |
| 400.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 400.description | "If-Match is malformed" |
| 400.x-error-codes | \["MALFORMED\_IF\_MATCH"] |
| 401.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 401.description | "Missing, invalid, revoked, or expired Hub credential" |
| 401.x-error-codes | \["INVALID\_API\_KEY","INVALID\_JWT"] |
| 403.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 403.description | "The authenticated credential lacks the required Cart operation scope" |
| 403.x-error-codes | \["INSUFFICIENT\_SCOPE"] |
| 404.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 404.description | "Cart or Cart line is unknown or belongs to a different tenant" |
| 409.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 409.description | "Cart is inactive" |
| 409.x-error-codes | \["CART\_INACTIVE","IDEMPOTENCY\_KEY\_MISMATCH"] |
| 412.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 412.description | "If-Match does not match the current Cart revision" |
| 412.headers.ETag.description | "Strong Cart composition validator" |
| 412.headers.ETag.required | true |
| 412.headers.ETag.schema | [412.headers.ETag.schema](https://telegafirst.com/docs/schema-c368c9e6d62cd43841854a0c6b6f706bca622d6fb3feae05cb9569025bbfe2d8) |
| 428.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 428.description | "If-Match is required" |
| 428.x-error-codes | \["ETAG\_REQUIRED","PRICING\_QUOTE\_REQUIRED"] |

## Дополнительные условия

| Поле | Значение |
| - | - |
| operationId | "deleteCartItem" |
| tags | \["Carts"] |
| x-idempotency | "none" |
| x-idempotency-boundary.implementation | "etag-only" |
| x-idempotency-boundary.rationale | "DELETE is protected solely by the strong Cart ETag and must not acquire an incidental global Idempotency-Key cache entry." |
| x-idempotency-boundary.skip\_global\_interceptor | true |
