> ## 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.

# Atualizar Depósito

> Altera os mapeamentos logísticos, nome, status, código ou endereço do galpão.

### Path

<ParamField path="id" type="string" required>
  UUID da Entidade Depósito.
</ParamField>

### Body

<ParamField body="name" type="string">Novo nome ou apelido do Armazém.</ParamField>
<ParamField body="code" type="string">Troca do Código interno de rastreio. Retorna 409 se conflitar com existente.</ParamField>
<ParamField body="zipCode" type="string">Novo CEP local.</ParamField>
<ParamField body="address" type="string">Novo Logradouro físico.</ParamField>
<ParamField body="active" type="boolean">Se falsificado `false`, impede novas emissões a não ser que possua estoque retido.</ParamField>

### Response

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "e4b6d4e8-8e6d-41da-abdb-8fc358a9e7f1",
    "name": "Armazém Norte (Revisado)",
    "active": true
  }
  ```
</ResponseExample>


## OpenAPI

````yaml patch /warehouses/{id}
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:
  /warehouses/{id}:
    patch:
      tags:
        - Warehouses
      summary: Atualizar depósito
      operationId: WarehousesController_update
      parameters:
        - name: id
          required: true
          in: path
          schema:
            format: uuid
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWarehouseDto'
      responses:
        '200':
          description: Depósito atualizado
        '404':
          description: Depósito não encontrado
        '409':
          description: Código de depósito duplicado
      security:
        - bearer: []
components:
  schemas:
    UpdateWarehouseDto:
      type: object
      properties:
        name:
          type: string
          description: Nome do depósito
          example: Depósito Principal
        code:
          type: string
          description: Código único (auto-gerado se vazio)
          example: DEP-001
        type:
          type: string
          enum:
            - OWN
            - STORE
            - FULFILLMENT
            - THIRD_PARTY
          description: Tipo do depósito
          default: OWN
        companyId:
          type: string
          description: ID da empresa associada
        address:
          description: Endereço do depósito
          allOf:
            - $ref: '#/components/schemas/WarehouseAddressDto'
        notes:
          type: string
          description: Observações
        isActive:
          type: boolean
          description: Ativar/desativar depósito
    WarehouseAddressDto:
      type: object
      properties:
        street:
          type: string
        number:
          type: string
        complement:
          type: string
        neighborhood:
          type: string
        city:
          type: string
        state:
          type: string
        zipCode:
          type: string

````