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

# Update an inventory level

> 
        Partial update for inventory level thresholds and reordering settings.

        Fields accepted: minQuantity, maxQuantity, includeUsed, autoCreate, active, customerPoNumber.

        skuId, warehouseId, and regionId are NOT accepted (immutable after creation) — sending
        any of them returns 400 with a per-field error message. Any other field name returns
        400 'Unknown field: <name>'. Sending an empty body returns 400 'At least one modifiable
        field must be provided'.

        Setting active=false soft-deletes the level. Reactivating via PATCH (active=true on an
        inactive level) is not supported; use POST /api/inventory-levels. Sending active=true
        on an already-active level is a 200 no-op (no state change, no write).
    



## OpenAPI

````yaml /openapi.json patch /api/v1/inventory-levels/{id}
openapi: 3.1.0
info:
  title: Firstbase API Specification Beta
  description: Integration endpoints for Firstbase
  version: 0.1.0
servers:
  - url: /
    description: Default
security:
  - ApiKey: []
tags:
  - name: Inventory Orders
    description: Create and manage inventory orders
  - name: Shipment Notices V1
    description: 'Query shipment notice orders (V1: package items expose `inventories` list)'
  - name: Packages
    description: ''
  - name: Categories
    description: Query available categories for asset creation
  - name: Catalog
    description: ''
  - name: New Joiners
    description: New joiner provisioning pipeline for the organization
  - name: Orders
    description: ''
  - name: People
    description: >-
      Manage the users of Firstbase for your organization. API follows the SCIM
      standard.
    externalDocs:
      url: https://scim.cloud/
  - name: People — Lifecycle
    description: Offboard and reactivate users.
  - name: Assets
    description: Manage inventory assets
  - name: Regions V1
    description: Query regions (V1)
  - name: Warehouses V1
    description: Query warehouses (V1)
  - name: Brands
    description: Query available brands for asset creation
  - name: Inventory
    description: ''
  - name: Replacements
    description: Create and manage equipment replacements
  - name: Offices
    description: Manage and query office locations for the authenticated organization
  - name: Returns
    description: Return and Replacements
paths:
  /api/v1/inventory-levels/{id}:
    patch:
      tags:
        - Inventory Levels
      summary: Update an inventory level
      description: |2-

                Partial update for inventory level thresholds and reordering settings.

                Fields accepted: minQuantity, maxQuantity, includeUsed, autoCreate, active, customerPoNumber.

                skuId, warehouseId, and regionId are NOT accepted (immutable after creation) — sending
                any of them returns 400 with a per-field error message. Any other field name returns
                400 'Unknown field: <name>'. Sending an empty body returns 400 'At least one modifiable
                field must be provided'.

                Setting active=false soft-deletes the level. Reactivating via PATCH (active=true on an
                inactive level) is not supported; use POST /api/inventory-levels. Sending active=true
                on an already-active level is a 200 no-op (no state change, no write).
            
      operationId: updateInventoryLevel
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateInventoryLevelRequest'
        required: true
      responses:
        '200':
          description: Inventory level updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventoryLevelResponse'
        '400':
          description: >-
            Bad request — validation, immutable field, unknown field, empty
            body, or reactivation attempt.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiHttpErrors'
        '404':
          description: >-
            Inventory level not found (or not visible to the caller's
            organization)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiHttpErrors'
        '409':
          description: Conflict
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PublicApiHttpErrors'
components:
  schemas:
    UpdateInventoryLevelRequest:
      type: object
      description: |2-

                Partial update for an inventory level. Only the fields listed in this schema are accepted.

                IMPORTANT: This endpoint does NOT accept skuId, warehouseId, or regionId — these are
                immutable after creation. Sending any of them returns 400 with a per-field error
                (Cannot change <field> after creation). Sending any other field name returns 400
                with detail Unknown field: <name>. Sending an empty body returns 400 At least one
                modifiable field must be provided. Fields skuId, warehouseId, and regionId are
                not editable after the inventory level has been created.

                Setting active to false soft-deletes the inventory level. Reactivating via PATCH
                (active=true on an inactive level) is not supported; use POST /api/inventory-levels.
                Sending active=true on an already-active level is a 200 no-op (no state change).

                NOTE: Sending a wrong type for a numeric field (e.g. minQuantity: "foo") returns 400
                with detail "Field \"<field>\" is missing or has an invalid value" — this is the global
                deserialization error shape, not the per-field aggregated shape described above.
            
      properties:
        minQuantity:
          type: integer
          format: int32
          description: New minimum quantity threshold (>= 1).
          example: 5
        maxQuantity:
          type: integer
          format: int32
          description: >-
            New maximum quantity threshold (>= 1; must be > minQuantity unless
            both equal 1).
          example: 20
        includeUsed:
          type: boolean
          description: Whether to include used inventory in stock calculations.
          example: false
        autoCreate:
          type: boolean
          description: Whether to automatically create restock orders when stock is low.
          example: false
        active:
          type: boolean
          description: >-
            Set to false to soft-delete the inventory level. Setting true on an
            inactive level is rejected.
          example: false
        customerPoNumber:
          type: string
          description: >-
            Customer purchase order number to apply to restock orders created
            from this level
          example: PO-12345
        unknownFields:
          type: object
          additionalProperties: {}
      required:
        - unknownFields
    InventoryLevelResponse:
      type: object
      description: >-
        Inventory level configuration with current stock details for a specific
        SKU, warehouse, and region
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for this inventory level configuration
          example: 123e4567-e89b-12d3-a456-426614174000
        skuId:
          type: string
          format: uuid
          description: ID of the SKU whose stock level this configuration controls
          example: 123e4567-e89b-12d3-a456-426614174000
        warehouseId:
          type: string
          format: uuid
          description: ID of the warehouse where this inventory level applies
          example: 123e4567-e89b-12d3-a456-426614174000
        regionId:
          type: string
          format: uuid
          description: >-
            ID of the region scope for this inventory level; null means the
            organization's default region
          example: 123e4567-e89b-12d3-a456-426614174000
        minQuantity:
          type: integer
          format: int32
          description: Minimum quantity threshold
          example: 5
        maxQuantity:
          type: integer
          format: int32
          description: Maximum quantity threshold
          example: 20
        includeUsed:
          type: boolean
          description: Whether used inventory is included in stock calculations
        autoCreate:
          type: boolean
          description: Whether inventory orders are automatically created when stock is low
        active:
          type: boolean
          description: Whether this inventory level is active
        customerPoNumber:
          type: string
          description: >-
            Optional customer PO number copied to restock orders created from
            this level
          example: PO-12345
        stockDetails:
          $ref: '#/components/schemas/StockDetails'
          description: Current stock details for this inventory level
        createdInventoryOrderId:
          type: string
          format: uuid
          description: >-
            Inventory order id created by autoCreate; null when no restock was
            triggered.
          example: 123E4567-E89B-12D3-A456-426614174000
      required:
        - active
        - autoCreate
        - id
        - includeUsed
        - maxQuantity
        - minQuantity
        - skuId
        - stockDetails
        - warehouseId
    PublicApiHttpErrors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/PublicApiError'
      required:
        - errors
    StockDetails:
      type: object
      description: Current stock availability details
      properties:
        newInventories:
          type: integer
          format: int32
          description: Count of new-condition inventory items available
          example: 12
        usedInventories:
          type: integer
          format: int32
          description: Count of used-condition inventory items available
          example: 3
        pendingInventoryOrders:
          type: integer
          format: int32
          description: Count of pending inventory order items
          example: 2
        totalAvailable:
          type: integer
          format: int32
          description: >-
            Total effective available stock (new + pending, plus used if
            includeUsed)
          example: 14
        totalItemsToOrder:
          type: integer
          format: int32
          description: Number of items to order to reach max level
          example: 6
      required:
        - newInventories
        - pendingInventoryOrders
        - totalAvailable
        - totalItemsToOrder
        - usedInventories
    PublicApiError:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable description of the error
          example: Invalid request
        source:
          type: string
          description: >-
            Entity or field path that caused the error (for example order,
            shipmentNotice, or person:email)
          example: request
      required:
        - detail
        - source
  securitySchemes:
    ApiKey:
      type: apiKey
      description: Prefix the value with "ApiKey" to indicate the custom authorization type
      name: Authorization
      in: header

````