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

# Último relevamiento de un CUIT

> El relevamiento más reciente del CUIT en el entorno de la API key, o null.



## OpenAPI

````yaml /openapi.json get /arca-imports
openapi: 3.1.0
info:
  title: Facturear API
  description: >-
    API para emitir facturas electrónicas de ARCA (Argentina) desde tu sistema:
    facturas, notas de crédito y débito, lotes, PDF y XML, envío por email,
    borradores desde documentos, webhooks y reportes. Autenticación con API Key
    en el header x-api-key: la key de testing opera en homologación y la de
    producción emite comprobantes reales.
  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://www.facture.ar/api
    description: Servidor de producción
security:
  - apiKey: []
tags:
  - name: CUITs
    description: CUITs emisores, sus defaults, puntos de venta y diseño
  - name: Facturas
    description: Emitir, listar y consultar facturas, su PDF y XML, y enviarlas por email
  - name: Lotes
    description: 'El resultado de cada emisión: toda factura se procesa en un lote'
  - name: Borradores
    description: >-
      Facturas propuestas desde documentos, planillas o datos, para revisar y
      emitir
  - name: Plantillas
    description: Cómo se lee y se factura cada tipo de documento, y facturas recurrentes
  - name: Importar desde ARCA
    description: Traer a Facturear los comprobantes que ARCA ya autorizó
  - name: Webhooks
    description: Notificaciones a tu sistema cuando pasa algo con tus facturas
  - name: Reportes
    description: Libro IVA Ventas
  - name: Utilidades
    description: Parámetros de ARCA
paths:
  /arca-imports:
    get:
      tags:
        - Importar desde ARCA
      summary: Último relevamiento de un CUIT
      description: >-
        El relevamiento más reciente del CUIT en el entorno de la API key, o
        null.
      parameters:
        - name: cuitId
          in: query
          description: ID del CUIT en Facturear
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Relevamiento
          content:
            application/json:
              schema:
                type: object
                properties:
                  job:
                    oneOf:
                      - $ref: '#/components/schemas/ArcaImport'
                      - type: 'null'
        '400':
          description: Falta cuitId
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: CUIT no encontrado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ArcaImport:
      type: object
      description: >-
        Un relevamiento de los comprobantes que ARCA ya autorizó para un CUIT, y
        su importación a Facturear
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - scanning
            - ready
            - importing
            - done
            - error
            - cancelled
          description: >-
            scanning: relevando; ready: relevado, listo para importar;
            importing: importando; done, error o cancelled
        range:
          type: string
          enum:
            - mes
            - anio
            - anio-pasado
        rangeLabel:
          type: string
        from:
          type:
            - string
            - 'null'
          description: Primer día incluido (DD/MM/AAAA)
        to:
          type:
            - string
            - 'null'
          description: Último día incluido (DD/MM/AAAA)
        imported:
          type: integer
        skipped:
          type: integer
        gaps:
          type: integer
        errorMessage:
          type:
            - string
            - 'null'
        updatedAt:
          type: string
          format: date-time
        pointsOfSale:
          type: array
          items:
            type: integer
        segments:
          type: array
          description: Un tramo por punto de venta y tipo de comprobante
          items:
            type: object
            properties:
              ptoVta:
                type: integer
              cbteTipo:
                type: integer
              cbteTipoName:
                type: string
              lastNumber:
                type: integer
              fromNumber:
                type:
                  - integer
                  - 'null'
              toNumber:
                type:
                  - integer
                  - 'null'
              fromDate:
                type:
                  - string
                  - 'null'
              toDate:
                type:
                  - string
                  - 'null'
              inRange:
                type: integer
              already:
                type: integer
                description: Ya estaban en Facturear
              pending:
                type: integer
              note:
                type:
                  - string
                  - 'null'
              resolved:
                type: boolean
        totals:
          type: object
          properties:
            inRange:
              type: integer
            already:
              type: integer
            pending:
              type: integer
        scan:
          type:
            - object
            - 'null'
          description: Avance del relevamiento; null cuando terminó
          properties:
            phase:
              type: string
              enum:
                - puntos
                - numeracion
                - fechas
            done:
              type: integer
            total:
              type: integer
        cursor:
          type:
            - object
            - 'null'
          description: Por dónde va la importación
          properties:
            ptoVta:
              type: integer
            cbteTipoName:
              type: string
            next:
              type: integer
            toNumber:
              type: integer
    Error:
      type: object
      description: >-
        Error de la API. Los errores de autenticación (401), validación (400),
        CUIT inexistente (404), conflicto (409) e internos (500) vienen como
        application/problem+json (RFC 9457) con code, message y resolution.
        Otros errores vienen como JSON con error y, a veces, details y code. En
        los dos casos está el campo error.
      required:
        - error
      properties:
        error:
          type: string
          description: Mensaje de error
        code:
          type: string
          description: >-
            Código estable: unauthorized, invalid_request, cuit_not_found,
            conflict, internal_error, o códigos propios como
            SUBSCRIPTION_LIMIT_EXCEEDED
        message:
          type: string
          description: Qué pasó (problem+json)
        resolution:
          type: string
          description: Qué hacer para resolverlo (problem+json)
        type:
          type: string
          format: uri
          description: URI del tipo de problema (problem+json)
        title:
          type: string
          description: Título corto del problema (problem+json)
        status:
          type: integer
          description: Código HTTP (problem+json)
        detail:
          type: string
          description: Igual que message (problem+json)
        details:
          description: 'Detalle del error: un texto, o la lista de errores de validación'
  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.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.