openapi: 3.0.3
info:
  title: Repzo API - Cart
  version: 1.0.0
  description: OpenAPI specification for Repzo Cart endpoints.
servers:
  - url: https://sv.api.repzo.me
paths:
  /cart:
    get:
      summary: Find carts
      operationId: findCarts
      parameters:
        - in: query
          name: params
          schema:
            type: object
            properties:
              client_id:
                type: string
                description: Client ID filter
              type:
                type: string
                enum: [invoice, proforma]
                description: Cart type filter
              per_page:
                type: number
                description: Number of carts per page
              page:
                type: number
                description: Page number
              from__id:
                type: string
                description: Start from this cart ID
              to__id:
                type: string
                description: End at this cart ID
          description: Query parameters for filtering carts
      responses:
        "200":
          description: A list of carts
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CartFindResult"
    post:
      summary: Create a cart
      operationId: createCart
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CartCreateBody"
      responses:
        "201":
          description: Cart created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CartCreateResult"
  /cart/{id}:
    get:
      summary: Get a cart by ID
      operationId: getCart
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Cart details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CartGetResult"

components:
  schemas:
    CartFindResult:
      type: object
      description: Result of finding carts
      properties:
        data:
          type: array
          items:
            $ref: "#/components/schemas/CartData"
        total_result:
          type: number
          description: Total number of carts
        current_count:
          type: number
          description: Count of carts in current page
        total_pages:
          type: number
          description: Total number of pages
        current_page:
          type: number
          description: Current page number
        per_page:
          type: number
          description: Number of carts per page
        first_page_url:
          type: string
          description: URL for the first page
        last_page_url:
          type: string
          description: URL for the last page
        next_page_url:
          type: string
          description: URL for the next page
        prev_page_url:
          type: string
          description: URL for the previous page
        path:
          type: string
          description: Base URL path

    CartData:
      type: object
      description: Cart data schema
      properties:
        _id:
          type: string
          description: Cart ID
        type:
          type: string
          enum: [invoice, proforma]
          description: Cart type
        processable:
          type: boolean
          description: Whether the cart is processable
        failure_reasons:
          type: array
          items:
            type: string
          description: List of failure reasons
        external_serial_number:
          type: string
          description: External serial number
        qr_code_tlv:
          type: string
          description: QR code TLV
        skip_promos:
          type: boolean
          description: Skip promotions flag
        skipped_promotions:
          type: array
          items:
            type: object
            properties:
              _id:
                type: string
              name:
                type: string
              ref:
                type: string
          description: List of skipped promotions
        client_id:
          type: string
          description: Client ID
        client_name:
          type: string
          description: Client name
        comment:
          type: string
          description: Cart comment
        return_comment:
          type: string
          description: Return comment
        creator:
          type: object
          properties:
            _id:
              type: string
            type:
              type: string
              enum: [rep, client, admin]
            rep:
              type: string
            admin:
              type: string
            client:
              type: string
            name:
              type: string
          description: Cart creator
        implemented_by:
          type: object
          properties:
            _id:
              type: string
            type:
              type: string
              enum: [rep, client, admin]
            rep:
              type: string
            admin:
              type: string
            client:
              type: string
            name:
              type: string
          description: Cart implementer
        latest:
          type: boolean
          description: Latest version flag
        version:
          type: number
          description: Cart version
        time:
          type: number
          description: Cart timestamp
        issue_date:
          type: string
          format: date
          description: Issue date
        delivery_date:
          type: string
          format: date
          description: Delivery date
        currency:
          type: string
          description: Currency code
        serial_number:
          type: object
          properties:
            formatted:
              type: string
            counter:
              type: number
          description: Serial number
        geo_tag:
          type: object
          properties:
            type:
              type: string
              enum: [Point]
            coordinates:
              type: array
              items:
                type: number
          description: Geographic location
        sync_id:
          type: string
          description: Sync ID
        address:
          type: object
          additionalProperties: true
          description: Address information
        company_namespace:
          type: array
          items:
            type: string
          description: Company namespaces
        promotions:
          type: array
          items:
            type: object
          description: Applied promotions
        priceLists:
          type: array
          items:
            type: object
          description: Price lists
        visit_id:
          type: string
          description: Visit ID
        teams:
          type: array
          items:
            type: string
          description: Team IDs
        converter:
          type: object
          properties:
            _id:
              type: string
            type:
              type: string
              enum: [rep, client, admin]
            rep:
              type: string
            admin:
              type: string
            client:
              type: string
            name:
              type: string
          description: Cart converter
        converted_proforma_serial_number:
          type: object
          properties:
            formatted:
              type: string
            counter:
              type: number
          description: Converted proforma serial number
        converted_proforma_return_serial_number:
          type: object
          properties:
            formatted:
              type: string
            counter:
              type: number
          description: Converted proforma return serial number
        proforma_reference:
          type: string
          description: Proforma reference
        converted_at:
          type: number
          description: Conversion timestamp
        exclude_return_items:
          type: boolean
          description: Exclude return items flag
        returned_from:
          type: string
          description: Returned from
        returned_to:
          type: string
          description: Returned to
        returned_from_serial_number:
          type: object
          properties:
            formatted:
              type: string
            counter:
              type: number
          description: Returned from serial number
        returned_to_serial_number:
          type: object
          properties:
            formatted:
              type: string
            counter:
              type: number
          description: Returned to serial number
        partiall_returned_from:
          type: string
          description: Partially returned from
        partiall_returned_from_serial_number:
          type: object
          properties:
            formatted:
              type: string
            counter:
              type: number
          description: Partially returned from serial number
        due_date:
          type: string
          format: date
          description: Due date
        return_serial_number:
          type: object
          properties:
            formatted:
              type: string
            counter:
              type: number
          description: Return serial number
        origin_warehouse:
          type: string
          description: Origin warehouse
        msl_sales:
          type: string
          description: MSL sales
        route:
          type: string
          description: Route
        paymentsData:
          type: object
          properties:
            invoice_value:
              type: number
            paid:
              type: number
            balance:
              type: number
            payments:
              type: array
              items:
                type: object
                properties:
                  payment_serial_number:
                    type: object
                    properties:
                      formatted:
                        type: string
                      counter:
                        type: number
                  payment_id:
                    type: string
                  invoice_serial_number:
                    type: object
                    properties:
                      formatted:
                        type: string
                      counter:
                        type: number
                  return_serial_number:
                    type: object
                    properties:
                      formatted:
                        type: string
                      counter:
                        type: number
                  fullinvoice_id:
                    type: string
                  view_serial_number:
                    type: object
                    properties:
                      formatted:
                        type: string
                      counter:
                        type: number
                  type:
                    type: string
                    enum: [invoice, payment, return_invoice]
                  amount:
                    type: number
          description: Payment data
        consumption:
          type: object
          properties:
            status:
              type: string
              enum: [consumed, unconsumed, partially_consumed]
            remainder:
              type: number
          description: Consumption data
        subtotal:
          type: number
          description: Subtotal
        discount_amount:
          type: number
          description: Discount amount
        discount_amount_float:
          type: number
          description: Discount amount float
        taxable_subtotal:
          type: number
          description: Taxable subtotal
        net_total:
          type: number
          description: Net total
        tax_amount:
          type: number
          description: Tax amount
        tax_amount_after_deduction_float:
          type: number
          description: Tax amount after deduction float
        tax_amount_after_deduction_float_rounded_sum:
          type: number
          description: Tax amount after deduction float rounded sum
        tax_amount_after_deduction_float_rounded:
          type: number
          description: Tax amount after deduction float rounded
        total:
          type: number
          description: Total amount
        total_float:
          type: number
          description: Total float
        total_float_rounded:
          type: number
          description: Total float rounded
        total_float_rounded_sum:
          type: number
          description: Total float rounded sum
        total_before_tax:
          type: number
          description: Total before tax
        taxable_amount_float:
          type: number
          description: Taxable amount float
        taxable_amount_float_rounded_sum:
          type: number
          description: Taxable amount float rounded sum
        taxable_amount_float_rounded:
          type: number
          description: Taxable amount float rounded
        pre_subtotal:
          type: number
          description: Pre-subtotal
        pre_discount_amount:
          type: number
          description: Pre-discount amount
        pre_discount_amount_float:
          type: number
          description: Pre-discount amount float
        pre_taxable_subtotal:
          type: number
          description: Pre-taxable subtotal
        pre_net_total:
          type: number
          description: Pre-net total
        pre_tax_amount:
          type: number
          description: Pre-tax amount
        pre_tax_amount_after_deduction_float:
          type: number
          description: Pre-tax amount after deduction float
        pre_tax_amount_after_deduction_float_rounded:
          type: number
          description: Pre-tax amount after deduction float rounded
        pre_tax_amount_after_deduction_float_rounded_sum:
          type: number
          description: Pre-tax amount after deduction float rounded sum
        pre_total:
          type: number
          description: Pre-total
        pre_total_float:
          type: number
          description: Pre-total float
        pre_total_float_rounded:
          type: number
          description: Pre-total float rounded
        pre_total_float_rounded_sum:
          type: number
          description: Pre-total float rounded sum
        pre_total_before_tax:
          type: number
          description: Pre-total before tax
        pre_taxable_amount_float:
          type: number
          description: Pre-taxable amount float
        pre_taxable_amount_float_rounded:
          type: number
          description: Pre-taxable amount float rounded
        pre_taxable_amount_float_rounded_sum:
          type: number
          description: Pre-taxable amount float rounded sum
        return_subtotal:
          type: number
          description: Return subtotal
        return_discount_amount:
          type: number
          description: Return discount amount
        return_discount_amount_float:
          type: number
          description: Return discount amount float
        return_taxable_subtotal:
          type: number
          description: Return taxable subtotal
        return_net_total:
          type: number
          description: Return net total
        return_tax_amount:
          type: number
          description: Return tax amount
        return_tax_amount_after_deduction_float:
          type: number
          description: Return tax amount after deduction float
        return_tax_amount_after_deduction_float_rounded:
          type: number
          description: Return tax amount after deduction float rounded
        return_tax_amount_after_deduction_float_rounded_sum:
          type: number
          description: Return tax amount after deduction float rounded sum
        return_total:
          type: number
          description: Return total
        return_total_float:
          type: number
          description: Return total float
        return_total_float_rounded:
          type: number
          description: Return total float rounded
        return_total_float_rounded_sum:
          type: number
          description: Return total float rounded sum
        return_total_before_tax:
          type: number
          description: Return total before tax
        return_taxable_amount_float:
          type: number
          description: Return taxable amount float
        return_taxable_amount_float_rounded:
          type: number
          description: Return taxable amount float rounded
        return_taxable_amount_float_rounded_sum:
          type: number
          description: Return taxable amount float rounded sum
        deductionRatio:
          type: number
          description: Deduction ratio
        deductionFixed:
          type: number
          description: Fixed deduction
        totalDeductedTax:
          type: number
          description: Total deducted tax
        totalDeductedTaxFloat:
          type: number
          description: Total deducted tax float
        totalDeduction:
          type: number
          description: Total deduction
        totalDeductionFloat:
          type: number
          description: Total deduction float
        totalDeductionBeforeTax:
          type: number
          description: Total deduction before tax
        totalDeductionBeforeTaxFloat:
          type: number
          description: Total deduction before tax float
        totalAfterDeduction:
          type: number
          description: Total after deduction
        totalAfterDeductionFloat:
          type: number
          description: Total after deduction float
        lines_discount:
          type: number
          description: Lines discount
        lines_discount_float:
          type: number
          description: Lines discount float
        taxes:
          type: object
          additionalProperties: true
          description: Tax information
        overwriteDeductionFixed:
          type: number
          description: Overwrite deduction fixed
        overwriteTaxExempt:
          type: boolean
          description: Overwrite tax exempt
        tax_exempt:
          type: boolean
          description: Tax exempt flag
        overwriteDeductionRatio:
          type: number
          description: Overwrite deduction ratio
        shipping_zone:
          type: object
          additionalProperties: true
          description: Shipping zone
        payment_method:
          type: object
          additionalProperties: true
          description: Payment method
        shipping_price:
          type: number
          description: Shipping price
        shipping_tax:
          type: number
          description: Shipping tax
        shipping_charge:
          type: number
          description: Shipping charge
        payment_charge:
          type: number
          description: Payment charge
        total_with_charges:
          type: number
          description: Total with charges
        payment:
          type: object
          properties:
            amount:
              type: number
          description: Payment information
        workorder:
          type: string
          description: Work order
        asset:
          type: string
          description: Asset
        asset_unit:
          type: string
          description: Asset unit
        signature:
          type: string
          description: Signature
        createdAt:
          type: string
          format: date-time
          description: Creation timestamp
        updatedAt:
          type: string
          format: date-time
          description: Last update timestamp
        items:
          type: array
          items:
            type: object
          description: Cart items
        return_items:
          type: array
          items:
            type: object
          description: Return items
        invoice_payment_type:
          type: string
          enum: [cash, credit]
          description: Invoice payment type
        total_items_base_unit_qty:
          type: number
          description: Total items base unit quantity
        total_items_qty:
          type: number
          description: Total items quantity
        total_return_items_base_unit_qty:
          type: number
          description: Total return items base unit quantity
        total_return_items_qty:
          type: number
          description: Total return items quantity
        cart:
          type: object
          additionalProperties: true
          description: Cart data
        __v:
          type: number
          description: Version number

    CartCreateBody:
      type: object
      description: Body for creating a cart
      required:
        - type
        - failure_reasons
        - client_id
        - client_name
        - latest
        - issue_date
        - currency
        - geo_tag
        - sync_id
        - company_namespace
        - promotions
        - priceLists
        - teams
        - paymentsData
        - consumption
        - createdAt
        - updatedAt
        - items
        - invoice_payment_type
      properties:
        type:
          type: string
          enum: [invoice, proforma]
          description: Cart type
        processable:
          type: boolean
          description: Whether the cart is processable
        failure_reasons:
          type: array
          items:
            type: string
          description: List of failure reasons
        external_serial_number:
          type: string
          description: External serial number
        skip_promos:
          type: boolean
          description: Skip promotions flag
        skipped_promotions:
          type: array
          items:
            type: object
            properties:
              _id:
                type: string
              name:
                type: string
              ref:
                type: string
          description: List of skipped promotions
        client_id:
          type: string
          description: Client ID
        client_name:
          type: string
          description: Client name
        comment:
          type: string
          description: Cart comment
        return_comment:
          type: string
          description: Return comment
        creator:
          type: object
          properties:
            _id:
              type: string
            type:
              type: string
              enum: [rep, client, admin]
            rep:
              type: string
            admin:
              type: string
            client:
              type: string
            name:
              type: string
          description: Cart creator
        implemented_by:
          type: object
          properties:
            _id:
              type: string
            type:
              type: string
              enum: [rep, client, admin]
            rep:
              type: string
            admin:
              type: string
            client:
              type: string
            name:
              type: string
          description: Cart implementer
        latest:
          type: boolean
          description: Latest version flag
        version:
          type: number
          description: Cart version
        time:
          type: number
          description: Cart timestamp
        issue_date:
          type: string
          format: date
          description: Issue date
        delivery_date:
          type: string
          format: date
          description: Delivery date
        currency:
          type: string
          description: Currency code
        serial_number:
          type: object
          properties:
            formatted:
              type: string
            counter:
              type: number
          description: Serial number
        geo_tag:
          type: object
          properties:
            type:
              type: string
              enum: [Point]
            coordinates:
              type: array
              items:
                type: number
          description: Geographic location
        sync_id:
          type: string
          description: Sync ID
        address:
          type: object
          additionalProperties: true
          description: Address information
        company_namespace:
          type: array
          items:
            type: string
          description: Company namespaces
        promotions:
          type: array
          items:
            type: object
          description: Applied promotions
        priceLists:
          type: array
          items:
            type: object
          description: Price lists
        visit_id:
          type: string
          description: Visit ID
        teams:
          type: array
          items:
            type: string
          description: Team IDs
        converter:
          type: object
          properties:
            _id:
              type: string
            type:
              type: string
              enum: [rep, client, admin]
            rep:
              type: string
            admin:
              type: string
            client:
              type: string
            name:
              type: string
          description: Cart converter
        converted_proforma_serial_number:
          type: object
          properties:
            formatted:
              type: string
            counter:
              type: number
          description: Converted proforma serial number
        converted_proforma_return_serial_number:
          type: object
          properties:
            formatted:
              type: string
            counter:
              type: number
          description: Converted proforma return serial number
        proforma_reference:
          type: string
          description: Proforma reference
        converted_at:
          type: number
          description: Conversion timestamp
        exclude_return_items:
          type: boolean
          description: Exclude return items flag
        returned_from:
          type: string
          description: Returned from
        returned_to:
          type: string
          description: Returned to
        returned_from_serial_number:
          type: object
          properties:
            formatted:
              type: string
            counter:
              type: number
          description: Returned from serial number
        returned_to_serial_number:
          type: object
          properties:
            formatted:
              type: string
            counter:
              type: number
          description: Returned to serial number
        partiall_returned_from:
          type: string
          description: Partially returned from
        partiall_returned_from_serial_number:
          type: object
          properties:
            formatted:
              type: string
            counter:
              type: number
          description: Partially returned from serial number
        due_date:
          type: string
          format: date
          description: Due date
        return_serial_number:
          type: object
          properties:
            formatted:
              type: string
            counter:
              type: number
          description: Return serial number
        origin_warehouse:
          type: string
          description: Origin warehouse
        msl_sales:
          type: string
          description: MSL sales
        route:
          type: string
          description: Route
        paymentsData:
          type: object
          properties:
            invoice_value:
              type: number
            paid:
              type: number
            balance:
              type: number
            payments:
              type: array
              items:
                type: object
                properties:
                  payment_serial_number:
                    type: object
                    properties:
                      formatted:
                        type: string
                      counter:
                        type: number
                  payment_id:
                    type: string
                  invoice_serial_number:
                    type: object
                    properties:
                      formatted:
                        type: string
                      counter:
                        type: number
                  return_serial_number:
                    type: object
                    properties:
                      formatted:
                        type: string
                      counter:
                        type: number
                  fullinvoice_id:
                    type: string
                  view_serial_number:
                    type: object
                    properties:
                      formatted:
                        type: string
                      counter:
                        type: number
                  type:
                    type: string
                    enum: [invoice, payment, return_invoice]
                  amount:
                    type: number
          description: Payment data
        consumption:
          type: object
          properties:
            status:
              type: string
              enum: [consumed, unconsumed, partially_consumed]
            remainder:
              type: number
          description: Consumption data
        subtotal:
          type: number
          description: Subtotal
        discount_amount:
          type: number
          description: Discount amount
        discount_amount_float:
          type: number
          description: Discount amount float
        taxable_subtotal:
          type: number
          description: Taxable subtotal
        net_total:
          type: number
          description: Net total
        tax_amount:
          type: number
          description: Tax amount
        tax_amount_after_deduction_float:
          type: number
          description: Tax amount after deduction float
        tax_amount_after_deduction_float_rounded_sum:
          type: number
          description: Tax amount after deduction float rounded sum
        tax_amount_after_deduction_float_rounded:
          type: number
          description: Tax amount after deduction float rounded
        total:
          type: number
          description: Total amount
        total_float:
          type: number
          description: Total float
        total_float_rounded:
          type: number
          description: Total float rounded
        total_float_rounded_sum:
          type: number
          description: Total float rounded sum
        total_before_tax:
          type: number
          description: Total before tax
        taxable_amount_float:
          type: number
          description: Taxable amount float
        taxable_amount_float_rounded_sum:
          type: number
          description: Taxable amount float rounded sum
        taxable_amount_float_rounded:
          type: number
          description: Taxable amount float rounded
        pre_subtotal:
          type: number
          description: Pre-subtotal
        pre_discount_amount:
          type: number
          description: Pre-discount amount
        pre_discount_amount_float:
          type: number
          description: Pre-discount amount float
        pre_taxable_subtotal:
          type: number
          description: Pre-taxable subtotal
        pre_net_total:
          type: number
          description: Pre-net total
        pre_tax_amount:
          type: number
          description: Pre-tax amount
        pre_tax_amount_after_deduction_float:
          type: number
          description: Pre-tax amount after deduction float
        pre_tax_amount_after_deduction_float_rounded:
          type: number
          description: Pre-tax amount after deduction float rounded
        pre_tax_amount_after_deduction_float_rounded_sum:
          type: number
          description: Pre-tax amount after deduction float rounded sum
        pre_total:
          type: number
          description: Pre-total
        pre_total_float:
          type: number
          description: Pre-total float
        pre_total_float_rounded:
          type: number
          description: Pre-total float rounded
        pre_total_float_rounded_sum:
          type: number
          description: Pre-total float rounded sum
        pre_total_before_tax:
          type: number
          description: Pre-total before tax
        pre_taxable_amount_float:
          type: number
          description: Pre-taxable amount float
        pre_taxable_amount_float_rounded:
          type: number
          description: Pre-taxable amount float rounded
        pre_taxable_amount_float_rounded_sum:
          type: number
          description: Pre-taxable amount float rounded sum
        return_subtotal:
          type: number
          description: Return subtotal
        return_discount_amount:
          type: number
          description: Return discount amount
        return_discount_amount_float:
          type: number
          description: Return discount amount float
        return_taxable_subtotal:
          type: number
          description: Return taxable subtotal
        return_net_total:
          type: number
          description: Return net total
        return_tax_amount:
          type: number
          description: Return tax amount
        return_tax_amount_after_deduction_float:
          type: number
          description: Return tax amount after deduction float
        return_tax_amount_after_deduction_float_rounded:
          type: number
          description: Return tax amount after deduction float rounded
        return_tax_amount_after_deduction_float_rounded_sum:
          type: number
          description: Return tax amount after deduction float rounded sum
        return_total:
          type: number
          description: Return total
        return_total_float:
          type: number
          description: Return total float
        return_total_float_rounded:
          type: number
          description: Return total float rounded
        return_total_float_rounded_sum:
          type: number
          description: Return total float rounded sum
        return_total_before_tax:
          type: number
          description: Return total before tax
        return_taxable_amount_float:
          type: number
          description: Return taxable amount float
        return_taxable_amount_float_rounded:
          type: number
          description: Return taxable amount float rounded
        return_taxable_amount_float_rounded_sum:
          type: number
          description: Return taxable amount float rounded sum
        deductionRatio:
          type: number
          description: Deduction ratio
        deductionFixed:
          type: number
          description: Fixed deduction
        totalDeductedTax:
          type: number
          description: Total deducted tax
        totalDeductedTaxFloat:
          type: number
          description: Total deducted tax float
        totalDeduction:
          type: number
          description: Total deduction
        totalDeductionFloat:
          type: number
          description: Total deduction float
        totalDeductionBeforeTax:
          type: number
          description: Total deduction before tax
        totalDeductionBeforeTaxFloat:
          type: number
          description: Total deduction before tax float
        totalAfterDeduction:
          type: number
          description: Total after deduction
        totalAfterDeductionFloat:
          type: number
          description: Total after deduction float
        lines_discount:
          type: number
          description: Lines discount
        lines_discount_float:
          type: number
          description: Lines discount float
        taxes:
          type: object
          additionalProperties: true
          description: Tax information
        overwriteDeductionFixed:
          type: number
          description: Overwrite deduction fixed
        overwriteTaxExempt:
          type: boolean
          description: Overwrite tax exempt
        tax_exempt:
          type: boolean
          description: Tax exempt flag
        overwriteDeductionRatio:
          type: number
          description: Overwrite deduction ratio
        shipping_zone:
          type: object
          additionalProperties: true
          description: Shipping zone
        payment_method:
          type: object
          additionalProperties: true
          description: Payment method
        shipping_price:
          type: number
          description: Shipping price
        shipping_tax:
          type: number
          description: Shipping tax
        shipping_charge:
          type: number
          description: Shipping charge
        payment_charge:
          type: number
          description: Payment charge
        total_with_charges:
          type: number
          description: Total with charges
        payment:
          type: object
          properties:
            amount:
              type: number
          description: Payment information
        workorder:
          type: string
          description: Work order
        asset:
          type: string
          description: Asset
        asset_unit:
          type: string
          description: Asset unit
        signature:
          type: string
          description: Signature
        createdAt:
          type: string
          format: date-time
          description: Creation timestamp
        updatedAt:
          type: string
          format: date-time
          description: Last update timestamp
        items:
          type: array
          items:
            type: object
          description: Cart items
        return_items:
          type: array
          items:
            type: object
          description: Return items
        invoice_payment_type:
          type: string
          enum: [cash, credit]
          description: Invoice payment type
        total_items_base_unit_qty:
          type: number
          description: Total items base unit quantity
        total_items_qty:
          type: number
          description: Total items quantity
        total_return_items_base_unit_qty:
          type: number
          description: Total return items base unit quantity
        total_return_items_qty:
          type: number
          description: Total return items quantity
        cart:
          type: object
          additionalProperties: true
          description: Cart data

    CartCreateResult:
      $ref: "#/components/schemas/CartData"
      description: Result of creating a cart

    CartGetResult:
      $ref: "#/components/schemas/CartData"
      description: Result of getting a cart
