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

# Create Lead

> Recupera la información djfgj



## OpenAPI

````yaml POST /maihue/lead
openapi: 3.0.1
info:
  title: Maihue Lead API
  description: API for managing Maihue Lead information
  version: 1.0.0
servers:
  - description: Production server
    url: https://api.bbrands.io/api/v1
  - description: Staging server
    url: https://cert.api.bbrands.io/api/v1
  - description: Development server
    url: https://dev.api.bbrands.io/api/v1
security:
  - bearerAuth: []
paths:
  /maihue/lead:
    post:
      summary: Obtener información de leadss
      description: Recupera la información djfgj
      parameters:
        - in: query
          name: documentId
          schema:
            type: string
            format: uuid
          required: true
          description: ID del documento del lead
        - in: query
          name: page
          schema:
            type: integer
            minimum: 1
            default: 1
          description: Número de página para la paginación
        - in: query
          name: limit
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
          description: Número de resultados por página
      responses:
        '200':
          description: Operación exitosa
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/MaihueLead'
                  metadata:
                    $ref: '#/components/schemas/MetadataList'
                type: object
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    MaihueLead:
      properties:
        documentId:
          description: Unique identifier for the Maihue Lead.
          format: uuid
          type: string
        collection_channel:
          description: The channel through which the lead was collected.
          maxLength: 250
          nullable: true
          type: string
        commercial_activity:
          description: The commercial activity associated with the lead.
          maxLength: 250
          nullable: true
          type: string
        contact:
          description: The contact person for the lead.
          maxLength: 250
          type: string
        dni:
          description: The DNI (Documento Nacional de Identidad) of the lead.
          maxLength: 50
          type: string
        email:
          description: The email address of the lead.
          maxLength: 250
          type: string
        evaluation_debt:
          description: >-
            The evaluated debt of the lead. Precision of 12 digits with 2
            decimal places.
          format: decimal
          nullable: true
          type: number
        evaluation_score:
          description: >-
            The evaluation score of the lead. Precision of 6 digits with 2
            decimal places.
          format: decimal
          nullable: true
          type: number
        gloss:
          description: Additional notes or comments about the lead.
          maxLength: 150
          nullable: true
          type: string
        ip:
          description: The IP address from which the lead was submitted.
          maxLength: 50
          type: string
        name:
          description: The name of the lead.
          maxLength: 250
          type: string
        name_fantasy:
          description: The fantasy or trade name of the lead's business.
          maxLength: 250
          nullable: true
          type: string
        paymentMethod:
          description: The preferred payment method of the lead.
          enum:
            - PAC
            - PAT
            - TRANSFER
          nullable: true
          type: string
        phone:
          description: The phone number of the lead.
          maxLength: 50
          type: string
        sUtmCompaign:
          description: The UTM campaign parameter from the server side.
          maxLength: 250
          nullable: true
          type: string
        sUtmContent:
          description: The UTM content parameter from the server side.
          maxLength: 250
          nullable: true
          type: string
        sUtmMedium:
          description: The UTM medium parameter from the server side.
          maxLength: 250
          nullable: true
          type: string
        sUtmSource:
          description: The UTM source parameter from the server side.
          maxLength: 250
          nullable: true
          type: string
        sUtmTerm:
          description: The UTM term parameter from the server side.
          maxLength: 250
          nullable: true
          type: string
        type:
          description: The type of lead.
          enum:
            - COMPANY
            - HORECA
            - HOME
          type: string
        utmCompaign:
          description: The UTM campaign parameter from the client side.
          maxLength: 250
          nullable: true
          type: string
        utmContent:
          description: The UTM content parameter from the client side.
          maxLength: 250
          nullable: true
          type: string
        utmMedium:
          description: The UTM medium parameter from the client side.
          maxLength: 250
          nullable: true
          type: string
        utmSource:
          description: The UTM source parameter from the client side.
          maxLength: 250
          nullable: true
          type: string
        utmTerm:
          description: The UTM term parameter from the client side.
          maxLength: 250
          nullable: true
          type: string
        address:
          $ref: '#/components/schemas/Address'
          description: The associated Address record.
        country:
          $ref: '#/components/schemas/Country'
          description: The associated Country record.
        typeDni:
          $ref: '#/components/schemas/TypeDni'
          description: The associated TypeDni record.
        createdAt:
          description: >-
            The timestamp when the lead was created. Sent as ISO 8601 format and
            transformed to a valid database date.
          format: date-time
          type: string
        deletedAt:
          description: >-
            The timestamp when the lead was deleted, if applicable. Sent as ISO
            8601 format and transformed to a valid database date.
          format: date-time
          nullable: true
          type: string
        isActived:
          description: Indicates whether the lead is active.
          type: boolean
        isDeleted:
          description: Indicates whether the lead has been deleted.
          type: boolean
        updatedAt:
          description: >-
            The timestamp when the lead was last updated. Sent as ISO 8601
            format and transformed to a valid database date.
          format: date-time
          nullable: true
          type: string
      type: object
    MetadataList:
      type: object
      properties:
        correlation:
          description: The correlation identifier
          type: string
        currentPage:
          description: The current page number
          type: integer
        itemsPerPage:
          description: The number of items per page
          type: integer
        status:
          description: The HTTP status code
          type: integer
        timestamp:
          description: The timestamp of the response
          format: date-time
          type: string
        totalItems:
          description: The total number of items
          type: integer
        totalPages:
          description: The total number of pages
          type: integer
    Address:
      type: object
      properties:
        street:
          type: string
        city:
          type: string
    Country:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the Country.
    TypeDni:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the TypeDni.
    BadRequestError:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
        - example:
            error:
              code: BBXYYYZZZ
              errors: []
              message: 'Bad Request: The request contains invalid or missing parameters'
            metadata:
              correlation: 29146752-ef3a-4569-b397-ff2144412c4a
              status: 400
              timestamp: '2025-01-01T00:00:00Z'
    UnauthorizedError:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
        - example:
            error:
              code: BBXYYYZZZ
              errors: []
              message: 'Unauthorized: Authentication is required to access this resource'
            metadata:
              correlation: 29146752-ef3a-4569-b397-ff2144412c4a
              status: 401
              timestamp: '2025-01-01T00:00:00Z'
    ForbiddenError:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
        - example:
            error:
              code: BBXYYYZZZ
              errors: []
              message: >-
                Forbidden: You do not have the necessary permissions to access
                this resource
            metadata:
              correlation: 29146752-ef3a-4569-b397-ff2144412c4a
              status: 403
              timestamp: '2025-01-01T00:00:00Z'
    TooManyRequestsError:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
        - example:
            error:
              code: BBXYYYZZZ
              errors: []
              message: >-
                Too Many Requests: You have exceeded the allowed number of
                requests. Please try again later
            metadata:
              correlation: 29146752-ef3a-4569-b397-ff2144412c4a
              status: 429
              timestamp: '2025-01-01T00:00:00Z'
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Unique error code identifier
            errors:
              type: array
              items:
                type: string
              description: List of specific error messages
            message:
              type: string
              description: General error description
          required:
            - code
            - message
        metadata:
          type: object
          properties:
            correlation:
              type: string
              description: Unique identifier for tracking the request
            status:
              type: integer
              description: HTTP status code
            timestamp:
              type: string
              format: date-time
              description: ISO 8601 formatted timestamp of when the error occurred
          required:
            - correlation
            - status
            - timestamp
      required:
        - error
        - meta
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BadRequestError'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnauthorizedError'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ForbiddenError'
    TooManyRequests:
      description: Too Many Requests
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TooManyRequestsError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````