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

# Fetch received archive

> Download the official ANAF archive an invoice received through RO e-Factura was imported from. The zip is signed by ANAF and holds the invoice as the supplier sent it.

Returns the official ANAF archive an invoice received through RO e-Factura was imported from, as a zip file signed by ANAF. It holds the invoice exactly as the supplier sent it, before it was converted to GOBL.

| Situation | Status | Answer |
| - | - | - |
| The invoice was imported from RO e-Factura | `200` | Zip holding the supplier's invoice and ANAF's signature |
| The silo entry wasn't imported from RO e-Factura | `404` | `received entry was not found` |
| The invoice belongs to another workspace | `404` | `party belongs to a different workspace` |

The zip is named after the ID of the ANAF message the invoice arrived in, the same value as the invoice's `download-id` meta (for example `3001234567.zip`).


## OpenAPI

````yaml GET /apps/gov-ro/v1/received/{silo_entry_id}/archive
openapi: 3.1.0
info:
  contact:
    email: dev@invopop.com
    name: Invopop Developers
  description: >-
    Set of end-points that help you register parties with the Romania RO
    e-Factura app and download the official ANAF archives of their invoices
    through the API.
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  title: Romania Service API
  version: 0.1.0
servers:
  - description: production
    url: https://api.invopop.com
security:
  - InvopopAuth: []
paths:
  /apps/gov-ro/v1/received/{silo_entry_id}/archive:
    get:
      description: >-
        Download the official ANAF archive an invoice received through RO
        e-Factura was imported from. The zip is signed by ANAF and holds the
        invoice as the supplier sent it.
      parameters:
        - $ref: '#/components/parameters/InvoiceEntryID'
      responses:
        '200':
          $ref: '#/components/responses/Archive'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: >-
            Not Found - The archive isn't available. The `message` says why, see
            the endpoint page.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    InvoiceEntryID:
      description: ID of the bill.Invoice silo entry.
      in: path
      name: silo_entry_id
      required: true
      schema:
        description: ID of the bill.Invoice silo entry.
        example: 0190c3a2-7b1e-7c4d-9f2a-3e5d8b6a1c40
        title: Silo Entry ID
        type: string
  responses:
    Archive:
      description: The official ANAF archive, as a zip file.
      headers:
        Content-Disposition:
          description: Suggested file name of the archive.
          schema:
            type: string
            example: attachment; filename="5001234567.zip"
      content:
        application/zip:
          schema:
            type: string
            format: binary
    Unauthorized:
      description: Unauthorized - Missing or invalid token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalError:
      description: Internal Server Error - The request could not be processed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        message:
          description: Details of the error.
          type: string
  securitySchemes:
    InvopopAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        Use the `Bearer` scheme with a valid JWT token to authenticate requests.

        Example: `Authorization: Bearer <token>`

````

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