> ## 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 ANAF link

> Fetch the ANAF authorization link of a party that has accepted the terms.

Returns the ANAF authorization link of a party that has already accepted the terms. Until they are accepted, the endpoint answers `409`.


## OpenAPI

````yaml GET /apps/gov-ro/v1/entry/{silo_entry_id}/link
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/entry/{silo_entry_id}/link:
    get:
      description: >-
        Fetch the ANAF authorization link of a party that has accepted the
        terms.
      parameters:
        - $ref: '#/components/parameters/SiloEntryID'
      responses:
        '200':
          description: The ANAF authorization link.
          content:
            application/json:
              schema:
                type: object
                properties:
                  link:
                    description: ANAF authorization link to send to the certificate holder.
                    type: string
                    example: >-
                      https://logincert.anaf.ro/anaf-oauth2/v1/authorize?response_type=code&client_id=...&state=...
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/Unprocessable'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    SiloEntryID:
      description: ID of the org.Party silo entry being registered.
      in: path
      name: silo_entry_id
      required: true
      schema:
        description: ID of the org.Party silo entry being registered.
        example: 5b45453c-cdd0-11ed-afa1-0242ac120002
        title: Silo Entry ID
        type: string
  responses:
    Unauthorized:
      description: Unauthorized - Missing or invalid token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: >-
        Not Found - The silo entry doesn't exist or belongs to another
        workspace.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: >-
        Conflict - The **Register with ANAF** step hasn't run for the party
        (`registration not started`), or the terms haven't been accepted yet
        (`party has not accepted the terms and conditions`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unprocessable:
      description: >-
        Unprocessable Entity - The silo entry isn't a party, the party has no
        Romanian tax ID, or the registration expired and the **Register with
        ANAF** step has to run again (`registration expired, register the party
        again`).
      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.