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

# Crear facturas

> Crea facturas electrónicas individuales o en lote. El sistema procesa las solicitudes de forma asíncrona a través de un sistema de colas.



## OpenAPI

````yaml /openapi.json post /invoices
openapi: 3.1.0
info:
  title: Facturear API
  description: >-
    API completa para facturación electrónica en Argentina. Integra con AFIP y
    genera facturas electrónicas válidas de forma rápida y segura.
  version: 1.0.0
  contact:
    name: Facturear Support
    email: support@facture.ar
    url: https://facture.ar
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://facture.ar/api
    description: Servidor de producción
security:
  - apiKey: []
paths:
  /invoices:
    post:
      tags:
        - Facturas
      summary: Crear facturas
      description: >-
        Crea facturas electrónicas individuales o en lote. El sistema procesa
        las solicitudes de forma asíncrona a través de un sistema de colas.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/InvoiceRequest'
                - type: array
                  items:
                    $ref: '#/components/schemas/InvoiceRequest'
      responses:
        '202':
          description: Factura(s) aceptada(s) para procesamiento
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/InvoiceResponse'
                  - type: array
                    items:
                      $ref: '#/components/schemas/InvoiceResponse'
        '400':
          description: Datos de factura inválidos
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    InvoiceRequest:
      type: object
      required:
        - cuitId
        - amount
        - description
        - docTipo
        - docNro
        - invoiceType
      properties:
        cuitId:
          type: string
          format: uuid
          description: ID del CUIT emisor
        amount:
          type: number
          format: float
          minimum: 0.01
          description: Monto de la factura
        description:
          type: string
          maxLength: 500
          description: Descripción de la factura
        docTipo:
          type: integer
          description: Tipo de documento del cliente
        docNro:
          type: integer
          description: Número de documento del cliente
        invoiceType:
          type: integer
          description: Tipo de factura
        ivaType:
          type: integer
          description: Tipo de IVA
        currency:
          type: string
          enum:
            - ARS
            - USD
          default: ARS
          description: Moneda de la factura
        dueDate:
          type: string
          format: date
          description: Fecha de vencimiento
    InvoiceResponse:
      type: object
      required:
        - id
        - status
      properties:
        id:
          type: string
          format: uuid
          description: ID único de la factura
        status:
          type: string
          enum:
            - pending
            - processing
          description: Estado inicial de la factura
        message:
          type: string
          description: Mensaje de confirmación
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          description: Código de error
        message:
          type: string
          description: Mensaje de error descriptivo
        details:
          type: object
          description: Detalles adicionales del error
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API Key para autenticación. Formato: test_sk_xxx para testing,
        prod_sk_xxx para producción.

````