Skip to main content
Skip table of contents

Setting up external access to documents

When you’re working in your ERP system, and want to take a quick look at a document in Routty, you can use an external document link, so you don’t have to start looking for the document in the Routty Archive Search. Integrating this url in your ERP system will allow your users to access all their documents immediately in their browser. Given that they have a valid Routty session.

This guide is mostly relevant for administrators setting up access to documents from outside Routty itself.

To do this, your ERP will be provided with a unique identifier for the file. This identifier is commonly referred to as the Archive Link. This link is usually provided in the export document.

Once you have this identifier, simply go to this link:
https://YOUR_ROUTTY_ENVIRONMENT/portal/app/archive.html?instance=Routty&file=ARCHIVE_LINK

For example, for Dynatos, if the Archive Link is abcdefg123456==, the link would be:
https://dynatos.routty.be/portal/app/archive.html?instance=Routty&file=abcdefg123456==

If the user is already logged in, he/she will be able to see the document immediately. If the user is not yet logged in, he/she will be redirected to the login page first.

Automating token retrieval

If you would like to automate the authentication process, you can set up an API call to do so. This allows users without a Routty account to see documents in the Routty Archive, while still having authentication enabled.

You can follow these steps to create such an application:

  1. Create a “technical” user account in Routty. This is the account that will be used for authentication. It should be a separate account. This account needs to have a role that has access to the Routty Archive. You only need one technical account, regardless of the amount of people using your automatic authentication process.

  2. To access the archive, you will need a token for your technical user. This token ensures Routty that you are authenticated. Without it, Routty will not show you any documents.

    You can request a token by making an API call:

    JSON
    POST https://YOUR_ROUTTY_ENVIRONMENT/portal/api/login/login
    
    // Request
    {
        "instance": 1, // Indicates that you are logging in for the Routty instance, not the Supplier or Customer portal.
        "portalcompany": false, // Indicates that Routty must automatically determine your company based on the user's domain
        "username": "technical@routty.be", // The username for your technical user
        "password": "secret", // The password for your technical user
    }
    
    // Response
    {
        "feedback": "success", // If this field contains "error", something went wrong.
        "message": "New token", // Human-readable message, will contain error information if there was an error
        "data": {
            ... // Contains some fields with information on your user, not relevant here.
            "Token": "dfd1d718b2a28c0963e86d98a0a2b3eb" // Your authentication token!
        }
    }

3. Using your authentication token, you can directly access the Routty Archive, by navigating to:

https://YOUR_ROUTTY_ENVIRONMENT/portal/app/archive.php
?file=ARCHIVE_LINK==&token=AUTHENTICATION_TOKEN

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.