К содержанию
TelegaFirst

Для AI-агентов: markdown этой страницы — /docs/api-op-addcartitem.mdиндекс документации — /llms.txt

addCartItem

Обновлено

POST /api/v1/carts/{code}/items

addCartItem

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

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.requiredtrue
0.schema0.schema
1.in"header"
1.name"If-Match"
1.requiredtrue
1.schema1.schema
2.in"header"
2.name"Idempotency-Key"
2.requiredtrue
2.schema2.schema

Тело запроса

ПолеЗначение
content.application/json.schemaAddCartItemRequest
requiredtrue

Ответы

ПолеЗначение
200.content.application/json.schemaCartProjection
200.description"Line added or a canonical equal line increased"
200.headers.ETag.description"Strong Cart composition validator"
200.headers.ETag.requiredtrue
200.headers.ETag.schema200.headers.ETag.schema

Ошибки

ПолеЗначение
400.content.application/problem+json.schemaProblemDetails
400.description"Idempotency-Key is absent or If-Match is malformed"
400.x-error-codes["IDEMPOTENCY_KEY_REQUIRED","MALFORMED_IF_MATCH"]
401.content.application/problem+json.schemaProblemDetails
401.description"Missing, invalid, revoked, or expired Hub credential"
401.x-error-codes["INVALID_API_KEY","INVALID_JWT"]
403.content.application/problem+json.schemaProblemDetails
403.description"The authenticated credential lacks the required Cart operation scope"
403.x-error-codes["INSUFFICIENT_SCOPE"]
404.content.application/problem+json.schemaProblemDetails
404.description"Cart is unknown or belongs to a different tenant"
409.content.application/problem+json.schemaProblemDetails
409.description"Cart is inactive or the idempotency request hash differs"
409.x-error-codes["CART_INACTIVE","IDEMPOTENCY_KEY_MISMATCH"]
412.content.application/problem+json.schemaProblemDetails
412.description"If-Match does not match the current Cart revision"
412.headers.ETag.description"Strong Cart composition validator"
412.headers.ETag.requiredtrue
412.headers.ETag.schema412.headers.ETag.schema
422.content.application/problem+json.schemaProblemDetails
422.description"Cart item is not purchasable or violates Cart business rules"
428.content.application/problem+json.schemaProblemDetails
428.description"If-Match and Idempotency-Key are required"
428.x-error-codes["ETAG_REQUIRED","PRICING_QUOTE_REQUIRED"]

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

ПолеЗначение
operationId"addCartItem"
tags["Carts"]
x-idempotency"none"
x-idempotency-boundary.implementation"cart-local-durable-receipt"
x-idempotency-boundary.rationale"Cart owns the transaction-atomic replay result; the global 24-hour interceptor must not shadow its receipt or change its conflict semantics."
x-idempotency-boundary.skip_global_interceptortrue