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

# Crear

> Crea un nuevo almacén.




## OpenAPI

````yaml /api/openapi.json post /logistics/warehouses
openapi: 3.1.0
info:
  title: Riqra API
  version: '1.0'
  contact:
    email: soporte@riqra.com
    url: https://www.riqra.com/
    name: Riqra Support
  description: >-
    Usando nuestra API puedes integrar tu ERP o tu sistema actual de
    administración con [Riqra](https://www.riqra.com/).
servers:
  - url: https://sandbox.api.riqra.com
    description: Sandbox
  - description: Producción
    url: https://api.riqra.com
security:
  - API Key: []
tags:
  - name: Almacenes
  - name: Banners
  - name: Categorías
  - name: Clientes
  - name: Clientes - Direcciones
  - name: Cobertura
  - name: Comercio
  - name: Cupones
  - name: Inventario
  - name: Líneas de Crédito
  - name: Lista de Precios
  - name: Lista de Precios - Precios
  - name: Marcas
  - name: Pedidos
  - name: Productos
  - name: Productos Sugeridos
  - name: Promociones
  - name: Stock
  - name: Subcategorías
  - name: Variantes
paths:
  /logistics/warehouses:
    post:
      tags:
        - Almacenes
      summary: Crear
      description: |
        Crea un nuevo almacén.
      operationId: createWarehouse
      requestBody:
        content:
          application/json:
            schema:
              description: ''
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                code:
                  type: string
                  minLength: 1
                isDefault:
                  type: boolean
                location:
                  type: object
                  required:
                    - line
                    - coordinates
                  properties:
                    line:
                      type: string
                      minLength: 1
                    reference:
                      type: string
                      minLength: 1
                    erpCode:
                      type: string
                      minLength: 1
                    zipCode:
                      type: string
                      minLength: 1
                    contactName:
                      type: string
                      minLength: 1
                    contactPhone:
                      type: string
                      minLength: 1
                    contactEmail:
                      type: string
                      minLength: 1
                    coordinates:
                      type: array
                      items:
                        type: number
                    divisions:
                      type: object
                      minProperties: 3
                      maxProperties: 4
                      properties:
                        level1:
                          type: string
                          minLength: 1
                        level2:
                          type: string
                          minLength: 1
                        level3:
                          type: string
                          minLength: 1
                        level4:
                          type: string
                          minLength: 1
                      required:
                        - level1
                        - level2
                        - level3
              required:
                - name
                - isDefault
                - location
        description: >
          **Divisions.**

          Estos niveles constituyen los componentes de la ubicación. Para
          obtener más información, consulte:
          https://en.wikipedia.org/wiki/List_of_administrative_divisions_by_country.

          ```json

          {
            "dvisions": {
              "level1": "Municipalidad Metropolitana de Lima",
              "level2": "Provincia de Lima",
              "level3": "Miraflores",
              "level4": "Urb los Tulipanes"
            }
          }

          ```
      responses:
        '201':
          description: Invalid input
          headers:
            Location:
              schema:
                type: string
              description: Ubicación del recurso creado.
components:
  securitySchemes:
    API Key:
      name: api-key
      type: apiKey
      in: header
      description: >-
        Todas las llamadas al API tienen que contener este header junto a la
        clave para poder autenticar y autorizar al cliente.

````