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

# Crea una nueva requisición con sus grupos e ítems



## OpenAPI

````yaml post /requisitions/
openapi: 3.0.3
info:
  title: Esolbay API
  version: 1.0.0
  description: API Esolbay.
servers:
  - url: http://localhost:3000/api/v1
    description: Ruta base local
  - url: https://api.esolbay.com/api/v1
    description: Producción
  - url: https://staging.esolbay.com/api/v1
    description: Staging
security:
  - apiKeyAuth: []
  - bearerAuth: []
paths:
  /requisitions/:
    post:
      tags:
        - Requisitions
      summary: Crea una nueva requisición con sus grupos e ítems
      operationId: createRequisition
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                type:
                  type: string
                sector:
                  type: string
                code:
                  type: string
                groups:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      deliveryMethod:
                        $ref: '#/components/schemas/DeliveryMethod'
                      addressId:
                        type: string
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/GroupItemCreate'
                    required:
                      - deliveryMethod
                      - items
                  minItems: 1
              required:
                - title
                - groups
      responses:
        '201':
          description: Requisición creada
          content:
            application/json:
              schema:
                type: object
                properties:
                  requisitionId:
                    type: string
                required:
                  - requisitionId
        '400':
          description: Solicitud inválida
components:
  schemas:
    DeliveryMethod:
      type: string
      enum:
        - pickup
        - delivery
    GroupItemCreate:
      type: object
      properties:
        quantity:
          type: integer
          minimum: 0
          exclusiveMinimum: true
        itemId:
          type: string
        item:
          $ref: '#/components/schemas/InventoryItemPayload'
      required:
        - quantity
    InventoryItemPayload:
      type: object
      properties:
        code:
          type: string
        name:
          type: string
        description:
          type: string
        unitOfMeasure:
          type: string
        brand:
          type: string
        material:
          type: string
        certification:
          type: string
        type:
          type: string
      required:
        - name
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````