> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yume.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Create carts



## OpenAPI

````yaml /openapi/plus.json post /v1/plus/carts/
openapi: 3.0.3
info:
  title: Yume API — Plus
  version: 1.0.0
  description: Подключаемые продукты тарифа Plus.
servers:
  - url: https://api.yume.cloud
    description: Production
  - url: https://api.stage.yume.cloud
    description: Stage
security: []
paths:
  /v1/plus/carts/:
    post:
      tags:
        - carts
      summary: Create carts
      operationId: carts_create
      parameters:
        - $ref: '#/components/parameters/TenantId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompanyCart'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CompanyCart'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CompanyCart'
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompanyCart'
          description: ''
      security:
        - jwtAuth: []
        - {}
components:
  parameters:
    TenantId:
      name: X-Tenant-Id
      in: header
      required: false
      schema:
        type: integer
      description: >-
        Компания, в контексте которой выполняется запрос — её id из `GET
        /v1/tenant/`. Пользователь должен состоять в этой компании: чужой id
        доступа к данным не даёт. Без заголовка компания определяется по домену
        запроса.
  schemas:
    CompanyCart:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        items:
          type: array
          items:
            $ref: '#/components/schemas/CompanyCartItem'
          readOnly: true
        company_name:
          type: string
          readOnly: true
        company_address:
          type: string
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
          title: Создан
        updated_at:
          type: string
          format: date-time
          readOnly: true
          title: Обновлен
        name:
          type: string
          nullable: true
          maxLength: 255
        phone:
          type: string
          nullable: true
          maxLength: 255
        status:
          readOnly: true
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/StatusEnum'
            - $ref: '#/components/schemas/NullEnum'
        payment_type:
          $ref: '#/components/schemas/PaymentTypeEnum'
        payment_status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatusEnum'
          readOnly: true
        payment_invoice_url:
          type: string
          format: uri
          readOnly: true
          nullable: true
        bonus:
          type: boolean
        price:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          readOnly: true
        start_at:
          type: string
          format: date-time
          nullable: true
        end_at:
          type: string
          format: date-time
          nullable: true
        fact_start_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        fact_end_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        outer_id:
          type: integer
          readOnly: true
          nullable: true
        comment:
          type: string
          nullable: true
          maxLength: 2048
        user:
          type: integer
          readOnly: true
          nullable: true
        tenant:
          type: integer
          nullable: true
        company:
          type: integer
          nullable: true
      required:
        - company_address
        - company_name
        - created_at
        - fact_end_at
        - fact_start_at
        - id
        - items
        - outer_id
        - payment_invoice_url
        - payment_status
        - price
        - status
        - updated_at
        - user
    CompanyCartItem:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        product_name:
          type: string
          readOnly: true
        quantity:
          type: integer
          minimum: 1
        created_at:
          type: string
          format: date-time
          readOnly: true
          title: Создан
        updated_at:
          type: string
          format: date-time
          readOnly: true
          title: Обновлен
        price:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          readOnly: true
        cart:
          type: integer
          readOnly: true
        product:
          type: integer
        product_company:
          type: integer
          nullable: true
        product_price:
          type: integer
          nullable: true
      required:
        - cart
        - created_at
        - id
        - price
        - product
        - product_name
        - quantity
        - updated_at
    StatusEnum:
      enum:
        - 0
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
      type: integer
      description: |-
        * `0` - Запрос
        * `1` - Забронировано
        * `2` - В аренде
        * `3` - Отменено
        * `4` - Завершено
        * `5` - Должник
        * `6` - Просрочка
    NullEnum:
      enum:
        - null
    PaymentTypeEnum:
      enum:
        - card
        - cash
      type: string
      description: |-
        * `card` - Карта
        * `cash` - Наличные
    PaymentStatusEnum:
      enum:
        - 0
        - 1
        - 2
      type: integer
      description: |-
        * `0` - Ожидается оплата
        * `1` - Оплата произведена
        * `2` - Частичная оплата
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````