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

# Ajuste Manual Rápido

> Ajusta diretamente para mais (+X) ou menos (-X) o estoque do produto.

### Path

<ParamField path="productId" type="string" required>ID do produto.</ParamField>

### Body

<ParamField body="warehouseId" type="string" required>Onde a quantia subirá/descerá.</ParamField>
<ParamField body="quantity" type="number" required>Quantidade a ser somada ou subtraída. Não pode ser `0`.</ParamField>
<ParamField body="reason" type="string">Motivo do ajuste.</ParamField>

### Response

<ResponseExample>
  ```json Response theme={null}
  {
    "message": "Estoque ajustado com sucesso."
  }
  ```
</ResponseExample>


## OpenAPI

````yaml patch /inventory/product/{productId}/adjust
openapi: 3.0.0
info:
  title: Hub Marketplace API
  description: API for managing marketplace listings and keys
  version: '1.0'
  contact: {}
servers: []
security: []
tags:
  - name: listings
    description: ''
paths:
  /inventory/product/{productId}/adjust:
    patch:
      tags:
        - Inventory
      summary: Ajustar estoque de um produto
      operationId: InventoryController_adjustStock
      parameters:
        - name: productId
          required: true
          in: path
          schema:
            format: uuid
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateInventoryDto'
      responses:
        '200':
          description: Estoque ajustado
        '400':
          description: Quantity não pode ser zero
        '404':
          description: Produto não encontrado
      security:
        - bearer: []
components:
  schemas:
    UpdateInventoryDto:
      type: object
      properties:
        quantity:
          type: number
          description: Quantidade a ajustar (positivo ou negativo)
          example: 10
        reason:
          type: string
          enum:
            - manual
            - nota_fiscal
            - scanner
            - reserve
            - confirm
            - release
            - import
            - transfer_out
            - transfer_in
            - return
            - sale
            - zero_reset
            - csv_import
            - inventory_count
          description: Razão do ajuste
          example: manual
        warehouseId:
          type: string
          description: ID do depósito (usa padrão se omitido)
      required:
        - quantity
        - reason

````