Astranexo Archivo API

Archeion, el archivo fiscal de 5 años; exportaciones e importaciones.

Operations 6

GET /archive Retención de la organización #
GET /archive/exports Exportaciones recientes #
POST /archive/exports Exportar un rango a ZIP #
GET /archive/exports/{id} Estado de una exportación #
GET /archive/exports/{id}/download Descargar el ZIP #
POST /archive/import Importar comprobantes de otro proveedor #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/astranexo-com:astranexo-com-archivo-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

astranexo-com-archivo-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Astranexo Com Archivo API
  version: '1.0'
  contact:
    name: Soporte de Aster
    url: https://astranexo.com/soporte
    email: app@astranexo.com
  description: 'Operations tagged Archivo across 2 of this provider''s published API definitions: aster-openapi.yaml, fe-api-openapi.yaml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://aster.astranexo.com/api/v1
  description: Producción. La misma URL atiende claves de prueba y de producción; la clave decide el ambiente de Hacienda.
security:
- ApiKey: []
tags:
- name: Archivo
  description: Archeion, el archivo fiscal de 5 años; exportaciones e importaciones.
paths:
  /archive:
    get:
      operationId: getArchive
      tags:
      - Archivo
      summary: Retención de la organización
      description: 'Clase de retención de los archivos de la organización: `standard` (90 días después de la

        respuesta de Hacienda) o `archive` (Archeion: 5 años desde la emisión).'
      x-required-ability: documents:export
      responses:
        '200':
          description: Retención.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Envelope'
                - type: object
                  properties:
                    data:
                      $ref: '#/components/schemas/Retention'
        '401':
          $ref: '#/components/responses/Unauthorized'
    servers:
    - url: https://aster.astranexo.com/api/v1
      description: Producción. La misma URL atiende claves de prueba y de producción; la clave decide el ambiente de Hacienda.
  /archive/exports:
    get:
      operationId: listArchiveExports
      tags:
      - Archivo
      summary: Exportaciones recientes
      x-required-ability: documents:export
      responses:
        '200':
          description: Las últimas 50 exportaciones del ambiente de la llave.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Envelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/ArchiveExport'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createArchiveExport
      tags:
      - Archivo
      summary: Exportar un rango a ZIP
      description: 'Arma en segundo plano un ZIP con los XML firmados y las respuestas de Hacienda de los

        documentos emitidos en el rango (días de Costa Rica, inclusive), hasta 3 000 documentos.

        Consultá el estado con `GET /archive/exports/{id}`; queda disponible 7 días.'
      x-required-ability: documents:export
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ArchiveExportRequest'
            example:
              from: '2026-09-01'
              to: '2026-09-30'
      responses:
        '202':
          description: Exportación en cola.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Envelope'
                - type: object
                  properties:
                    data:
                      $ref: '#/components/schemas/ArchiveExport'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/ValidationFailed'
    servers:
    - url: https://aster.astranexo.com/api/v1
      description: Producción. La misma URL atiende claves de prueba y de producción; la clave decide el ambiente de Hacienda.
  /archive/exports/{id}:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
    get:
      operationId: getArchiveExport
      tags:
      - Archivo
      summary: Estado de una exportación
      x-required-ability: documents:export
      responses:
        '200':
          description: Exportación.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Envelope'
                - type: object
                  properties:
                    data:
                      $ref: '#/components/schemas/ArchiveExport'
        '404':
          $ref: '#/components/responses/NotFound'
    servers:
    - url: https://aster.astranexo.com/api/v1
      description: Producción. La misma URL atiende claves de prueba y de producción; la clave decide el ambiente de Hacienda.
  /archive/exports/{id}/download:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
    get:
      operationId: downloadArchiveExport
      tags:
      - Archivo
      summary: Descargar el ZIP
      x-required-ability: documents:export
      responses:
        '200':
          description: El ZIP.
          content:
            application/zip:
              schema:
                type: string
                format: binary
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: La exportación aún no está lista (`export_not_ready`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
    servers:
    - url: https://aster.astranexo.com/api/v1
      description: Producción. La misma URL atiende claves de prueba y de producción; la clave decide el ambiente de Hacienda.
  /archive/import:
    post:
      operationId: importArchive
      tags:
      - Archivo
      summary: Importar comprobantes de otro proveedor
      description: 'Un ZIP (hasta 50 MB, 5 000 archivos) con XML firmados de un proveedor anterior y, si los

        tenés, las respuestas de Hacienda (`MensajeHacienda`). Requiere Archeion y una llave live.

        Cada documento debe ser de la organización (emisor, o receptor en una FEC); las claves ya

        registradas se omiten. Los consecutivos importados no se pueden reutilizar.'
      x-required-ability: invoices:write
      requestBody:
        required: true
        content:
          application/zip:
            schema:
              type: string
              format: binary
          multipart/form-data:
            schema:
              type: object
              required:
              - file
              properties:
                file:
                  type: string
                  format: binary
      responses:
        '200':
          description: Resultado de la importación.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Envelope'
                - type: object
                  properties:
                    data:
                      $ref: '#/components/schemas/ImportResult'
        '402':
          description: Archeion no está activo (`archeion_required`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '422':
          $ref: '#/components/responses/ValidationFailed'
    servers:
    - url: https://aster.astranexo.com/api/v1
      description: Producción. La misma URL atiende claves de prueba y de producción; la clave decide el ambiente de Hacienda.
components:
  schemas:
    ArchiveExportRequest:
      type: object
      required:
      - from
      - to
      properties:
        from:
          type: string
          format: date
        to:
          type: string
          format: date
        environment:
          $ref: '#/components/schemas/Environment'
    ImportResult:
      type: object
      properties:
        imported:
          type: integer
        skipped:
          type: integer
        problems:
          type: array
          items:
            type: object
            properties:
              file:
                type: string
              reason:
                type: string
    ErrorPayload:
      type: object
      required:
      - code
      - message
      properties:
        code:
          type: string
          description: Código estable del error, para usar en el código del cliente.
          example: validation_error
        message:
          type: string
          description: Descripción legible.
        errors:
          type: object
          description: Mensajes por campo (ruta con puntos, por ejemplo `items.0.cabys_code`).
          additionalProperties:
            type: array
            items:
              type: string
    ArchiveExport:
      type: object
      properties:
        id:
          type: string
          format: uuid
        environment:
          $ref: '#/components/schemas/Environment'
        from:
          type: string
          format: date
        to:
          type: string
          format: date
        status:
          type: string
          enum:
          - pending
          - running
          - ready
          - failed
          - expired
        documents:
          type:
          - integer
          - 'null'
        size_bytes:
          type:
          - integer
          - 'null'
        error:
          type:
          - string
          - 'null'
        created_at:
          type: string
          format: date-time
        finished_at:
          type:
          - string
          - 'null'
          format: date-time
        expires_at:
          type:
          - string
          - 'null'
          format: date-time
    Environment:
      type: string
      enum:
      - staging
      - production
      description: Ambiente de Hacienda. Con claves de Aster lo decide la clave.
    Envelope:
      type: object
      description: Envoltura de las respuestas exitosas.
      required:
      - success
      - timestamp
      - api_version
      properties:
        success:
          type: boolean
          const: true
        message:
          type: string
          description: Mensaje legible (en inglés) de algunas operaciones.
        data:
          description: Contenido de la respuesta.
        timestamp:
          type: string
          format: date-time
        api_version:
          type: string
          example: '1.0'
    ErrorEnvelope:
      type: object
      description: Envoltura de los errores.
      required:
      - success
      - error
      - timestamp
      - api_version
      properties:
        success:
          type: boolean
          const: false
        message:
          type: string
          description: Repite `error.message` en los errores de autenticación, permisos, límites, idempotencia y cuota.
        error:
          $ref: '#/components/schemas/ErrorPayload'
        timestamp:
          type: string
          format: date-time
        api_version:
          type: string
          example: '1.0'
    ValidationError:
      description: Error `422 validation_error` con los mensajes por campo.
      allOf:
      - $ref: '#/components/schemas/ErrorEnvelope'
      - type: object
        properties:
          error:
            type: object
            required:
            - code
            - message
            - errors
            properties:
              code:
                type: string
                const: validation_error
              message:
                type: string
                description: Resumen de todos los mensajes, separados por ` | `.
              errors:
                type: object
                additionalProperties:
                  type: array
                  items:
                    type: string
    Retention:
      type: object
      properties:
        class:
          type: string
          enum:
          - standard
          - archive
          - internal
        description:
          type: string
  responses:
    Unauthorized:
      description: 'Clave ausente, desconocida, vencida o revocada: `unauthenticated`, `token_expired`, `key_revoked`, `tenant_unresolved`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            success: false
            message: Unauthenticated.
            error:
              code: unauthenticated
              message: Unauthenticated.
            timestamp: '2026-10-08T16:00:00Z'
            api_version: '1.0'
    NotFound:
      description: 'No existe o no pertenece a la organización ni a su ambiente: `not_found` u otro código específico (`xml_not_available`, `response_not_available`, `pdf_not_available`, `no_documents`, `recipient_not_found`, `document_not_found`, `cabys_not_found`, `tariff_not_found`, `province_not_found`).'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            success: false
            error:
              code: not_found
              message: Document not found.
            timestamp: '2026-10-08T16:00:00Z'
            api_version: '1.0'
    ValidationFailed:
      description: Validación fallida (`validation_error`, con mensajes por campo en `error.errors`) u otra regla de negocio con su propio código.
      content:
        application/json:
          schema:
            anyOf:
            - $ref: '#/components/schemas/ValidationError'
            - $ref: '#/components/schemas/ErrorEnvelope'
          example:
            success: false
            error:
              code: validation_error
              message: A valid email is required.
              errors:
                email:
                - A valid email is required.
            timestamp: '2026-10-08T16:00:00Z'
            api_version: '1.0'
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      description: 'Tu llave de API en el encabezado `Authorization: Bearer <llave>`: `aster_test_…` (pruebas) o `aster_live_…` (producción).'
x-refined-from:
- aster-openapi.yaml
- fe-api-openapi.yaml