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

# Set the exact quantity of a cart line (by the line item's own id) — 0 removes it



## OpenAPI

````yaml /openapi/order-service.json patch /v1/cart/items/{id}
openapi: 3.0.0
info:
  title: Asiko Order Service
  description: Cart, checkout, order lifecycle
  version: '1.0'
  contact: {}
servers: []
security: []
tags:
  - name: orders
    description: ''
  - name: cart
    description: ''
paths:
  /v1/cart/items/{id}:
    patch:
      tags:
        - cart
      summary: >-
        Set the exact quantity of a cart line (by the line item's own id) — 0
        removes it
      operationId: CartController_setQuantity
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetCartItemQuantityBody'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CartResponseDto'
      security:
        - bearer: []
components:
  schemas:
    SetCartItemQuantityBody:
      type: object
      properties:
        quantity:
          type: number
          example: 3
          minimum: 0
          description: 0 removes the line
      required:
        - quantity
    CartResponseDto:
      type: object
      properties:
        id:
          type: string
        userId:
          type: string
        items:
          type: array
          items:
            $ref: '#/components/schemas/CartItemResponseDto'
        subtotal:
          type: number
      required:
        - id
        - userId
        - items
        - subtotal
    CartItemResponseDto:
      type: object
      properties:
        id:
          type: string
        productId:
          type: string
        productName:
          type: string
        productImage:
          type: string
          nullable: true
        size:
          type: string
          enum:
            - 500g
            - 1kg
            - 2kg
            - 5kg
            - 10kg
            - 25kg and above
          nullable: true
        quantity:
          type: number
        unitPrice:
          type: number
      required:
        - id
        - productId
        - productName
        - quantity
        - unitPrice
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````