Skip to main content

AFAS

Category: Direct connection · 🏅 Official partner

Dutch ERP system. Official partner. Yres reads from AFAS via the AFAS App connector (the REST services of AFAS Profit/InSite). In Azure Data Factory this becomes a RestService linked service.

Expected input​

You set up the connection through the Add source wizard. Besides the fields that apply to every source (source name, type, integration runtime, whether the credentials are the same for all environments, an optional credential expiry date, tags), the AFAS source asks for the following fields:

FieldNotes
URLThe REST base URL of your AFAS environment. It must end in …afas.online/profitrestservices. Example/placeholder: https://12345.rest.afas.online/profitrestservices, where 12345 is your AFAS environment number.
Client id (from v1.57)The client id of your App connector for OAuth sign-in (client credentials).
Client secret (from v1.57)The matching client secret. Yres stores it in your environment's Key Vault.
API token (up to and including v1.56)The full token blob that AFAS generates for the App connector: <token><version>1</version><data>…</data></token>. Paste the whole value, not just the data part.

Authentication from v1.57: Yres signs in through OAuth with the client id and client secret. Yres requests an access token from AFAS itself and refreshes it automatically; there is nothing else to manage.

If you have an AFAS source and update to 1.57

AFAS retires the classic token in August 2027. Before upgrading to 1.57, create a client id and client secret for your App connector in AFAS, and enter them on your AFAS source in the web app after the upgrade. See the release notes.

Authentication up to and including v1.56: the API token is sent as an Authorization header. Yres builds that header itself: you paste the raw token blob (the XML exactly as AFAS delivers it), and the backend base64-encodes it and prepends the prefix AfasToken . There is no username/password.

Integration runtime: cloud — AutoResolveIntegrationRuntime. AFAS Online is publicly reachable over HTTPS, so a self-hosted integration runtime is not needed.

Where the credentials end up (up to and including v1.56): the frontend stores no secrets. The backend writes the assembled header value (AfasToken + base64 of your token) to the Azure Key Vault of your own environment; the linked service retrieves it as the secret adf-AFAS-connectionstring (the secret falls under the naming group adf-{sourcename}-…). The linked service (AFAS.json) itself is set to Anonymous and sets the token via authHeaders.Authorization as a reference to that Key Vault secret.

Preparation (in AFAS Profit)​

  1. Create an App connector via General → Management → App connector.
  2. Add the GetConnectors that Yres may read (each GetConnector is a source "table" that you can later select as a used table).
  3. From v1.57: create a client id and client secret for OAuth (client credentials) on the App connector. Up to and including v1.56: generate the token. AFAS delivers it as an XML file; the contents are the <token>…</token> blob that you paste into the API token field.
  4. Note your environment number for the URL (https://<environmentnumber>.rest.afas.online/profitrestservices).
Up to and including v1.56: paste the token unmodified — Yres does the encoding

Do not add a prefix or encoding yourself. You paste the raw <token>…</token> blob exactly as AFAS delivers it; the Yres backend performs the base64 encoding, prepends the AfasToken prefix, and stores the result as the connectionstring secret in Key Vault. A token you have already base64-encoded or prefixed with AfasToken yourself gets encoded twice and will not work. Any license/subscription requirements for the App connector are determined by AFAS.

Load types & delta​

AFAS tables are loaded via GetConnectors. The usual load types (FULL, DELTA, IMAGE, OVERWRITE, RELOAD, ADDITIONAL, DELTAIMAGE) apply; delta loading requires a suitable delta column in the relevant GetConnector. AFAS supports two delta columns, just like the SQL sources.

Official documentation: AFAS Profit — GetConnector / App connector.


See also: Integration catalog · All data source requirements · Integrations — overview