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

# Adjust Inventory

> Adjust inventory for a variant.

Reasons:
- received: New stock arrived
- sold: Item sold (usually automatic)
- damaged: Write-off damaged goods
- returned: Customer return
- correction: Manual count correction



## OpenAPI

````yaml /api-reference/openapi.json post /api/dashboard/inventory/adjust
openapi: 3.1.0
info:
  title: Agentic Commerce API
  description: |2-

        Agentic Commerce API - E-commerce Backend

        ## APIs

        ### Dashboard API (`/api/dashboard`)
        Authenticated endpoints for merchant management:
        - Products, Variants, Options
        - Inventory management
        - Orders and fulfillment
        - Customers
        - Collections

        ### Storefront API (`/api/storefront`)
        Public endpoints for client websites:
        - Product catalog
        - Collections
        - Cart management
        - Checkout

        ### Sync API (`/api/sync`)
        Integration endpoints for zunkiree-search:
        - Product sync
        - Availability checks
        - Order creation from AI widget
        
  version: 1.0.0
servers: []
security: []
paths:
  /api/dashboard/inventory/adjust:
    post:
      tags:
        - Dashboard
        - Inventory
      summary: Adjust Inventory
      description: |-
        Adjust inventory for a variant.

        Reasons:
        - received: New stock arrived
        - sold: Item sold (usually automatic)
        - damaged: Write-off damaged goods
        - returned: Customer return
        - correction: Manual count correction
      operationId: adjust_inventory_api_dashboard_inventory_adjust_post
      parameters:
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
        - name: X-Stella-Merchant-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Stella-Merchant-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InventoryAdjustmentCreate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventoryAdjustmentResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    InventoryAdjustmentCreate:
      properties:
        variant_id:
          type: string
          format: uuid
          title: Variant Id
        quantity_change:
          type: integer
          title: Quantity Change
          description: Positive to add, negative to remove
        reason:
          type: string
          pattern: ^(received|sold|damaged|returned|correction)$
          title: Reason
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
      type: object
      required:
        - variant_id
        - quantity_change
        - reason
      title: InventoryAdjustmentCreate
      description: Schema for creating an inventory adjustment.
    InventoryAdjustmentResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        variant_id:
          type: string
          format: uuid
          title: Variant Id
        quantity_change:
          type: integer
          title: Quantity Change
        previous_quantity:
          type: integer
          title: Previous Quantity
        new_quantity:
          type: integer
          title: New Quantity
        reason:
          type: string
          title: Reason
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
        adjusted_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Adjusted By
        created_at:
          type: string
          format: date-time
          title: Created At
        variant_sku:
          anyOf:
            - type: string
            - type: 'null'
          title: Variant Sku
        product_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Product Name
      type: object
      required:
        - id
        - variant_id
        - quantity_change
        - previous_quantity
        - new_quantity
        - reason
        - note
        - adjusted_by
        - created_at
      title: InventoryAdjustmentResponse
      description: Schema for inventory adjustment in responses.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````