Для AI-агентов: markdown этой страницы — /docs/api-op-createcart.md · индекс документации — /llms.txt
createCart
Обновлено
POST /api/v1/carts
createCart
#Авторизация и права
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 | "header" |
| 0.name | "Idempotency-Key" |
| 0.required | true |
| 0.schema | 0.schema |
#Тело запроса
| Поле | Значение |
|---|
| Тело запроса | null |
#Ответы
| Поле | Значение |
|---|
| 201.content.application/json.schema | CreateCartResponse |
| 201.description | "Cart and its UniversalLink row were committed atomically" |
| 201.headers.ETag.description | "Strong Cart composition validator" |
| 201.headers.ETag.required | true |
| 201.headers.ETag.schema | 201.headers.ETag.schema |
#Ошибки
| Поле | Значение |
|---|
| 400.content.application/problem+json.schema | ProblemDetails |
| 400.description | "Idempotency-Key is absent, blank, or malformed" |
| 400.x-error-codes | ["IDEMPOTENCY_KEY_REQUIRED"] |
| 401.content.application/problem+json.schema | ProblemDetails |
| 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 |
| 403.description | "The authenticated credential lacks the required Cart operation scope" |
| 403.x-error-codes | ["INSUFFICIENT_SCOPE"] |
| 409.content.application/problem+json.schema | ProblemDetails |
| 409.description | "Cart idempotency request hash differs from the original request" |
| 409.x-error-codes | ["CART_INACTIVE","IDEMPOTENCY_KEY_MISMATCH"] |
| 422.content.application/problem+json.schema | ProblemDetails |
| 422.description | "Cart creation input is not processable" |
#Дополнительные условия
| Поле | Значение |
|---|
| operationId | "createCart" |
| 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_interceptor | true |