All about AFAS

AFAS: Send purchase orders to AFAS

Send purchase orders from another system to AFAS. APIcenter finds or creates the supplier and checks the articles.

Updated November 9, 2026

This flow sends purchase orders from another application to AFAS and creates them as purchase orders (inkooporders).

How it works

  1. APIcenter checks whether the purchase order already exists in AFAS, by order number or by reference. An existing purchase order is not created again.
  2. APIcenter looks for the supplier by its number or by e-mail address. If the supplier is not found, APIcenter creates it, unless you switched off creating new suppliers in the settings below. In that case, the flow stops with an error.
  3. APIcenter checks whether the articles on the order lines exist in AFAS. Every order line needs an article number. An article that does not exist gives an error.
  4. APIcenter creates the purchase order, with the administration and warehouse from the settings below.

What you need first

  • The articles exist in AFAS, created in AFAS itself or with Send products to AFAS.
  • Set the administration (administratie) and the warehouse (magazijn) in the settings below.
  • The App connector gives access to the connectors this flow uses. See Connect AFAS to APIcenter.

Tips

  • Costs such as shipping costs, payment costs, billing costs and commission can be added as separate order lines, each with an item code. See the settings below.
  • Does a purchase order fail because the supplier was not found? Check the supplier number and e-mail address, or allow APIcenter to create new suppliers.

You find all settings for this flow below, each with its own explanation.

Settings

The settings you see in the dashboard, with what each one does.

Allow creating new supplier

Customer Settings

Decides what happens when APIcenter sends a purchase order to AFAS and cannot find the supplier (crediteur). APIcenter first searches by supplier number and then by email address. When this setting is on (default), APIcenter creates the supplier in AFAS. When it is off, the purchase order is not sent and you see an error in Activity.

Default debtor email address

Customer Settings

The email address of the default debtor (debiteur) in AFAS. APIcenter uses it to find the default debtor when the default debtor is enabled. Use the email address exactly as it is on the debtor in AFAS. If you fill in both this field and the default debtor ID, APIcenter searches by ID first and then by email address.

Enable use of default debtor

Customer Settings

When on, APIcenter always uses the default customer type for relations it creates in AFAS, even if the data contains another type. When off, the default is only used when the data contains no customer type. For AFAS this setting is on by default.

Use contact persons

Customer Settings

Determines whether contact person details are sent to AFAS when APIcenter creates or updates a debtor. When on, the contact person (contactpersoon) from the incoming data is created or updated together with the organisation. When off, only the organisation or person itself is created or updated, without a contact person. Off by default.

Set the administration

General flow setting

The code of the AFAS administration (administratie) APIcenter sends orders, purchase orders and refunds to. Enter the code of the administration, not its name; you can use any administration in your AFAS environment. For refunds an administration is always required. In a multi-store setup you can use a mapping table to send each store to its own administration. Default for AFAS: 01.

Use administration mapping table

General flow setting

The revenue account number APIcenter uses when the data contains none. For sales orders this is set as the counter account (tegenrekening) of debtors that APIcenter creates in AFAS; existing debtors keep their own account. Use an account number that exists in your AFAS administration.

Turn this on to use a default journal (dagboek) when the data contains none. You need a journal when you send orders or refunds to AFAS as a financial mutation. You enter the code in Value to be used as the default journal id.

Ledger item id

Ledger Settings

The ledger item APIcenter fills in when the data contains none. The standard data mapping to AFAS does not use this value, so it only has effect when you use the field in the data mapping of the flow. Prefilled value: 600.

Use a mapping table to translate the revenue account from the other application into an AFAS ledger account number. For sales orders, APIcenter uses it as the revenue account (tegenrekening) of the debtor when it creates a new debtor; existing debtors keep their own. Values that are not in the table are handled by What to do with a value that cannot be mapped using the mapping table. Off by default.

Use a mapping table to translate the ledger item from the other application into the value AFAS should receive. The standard AFAS data mapping for orders does not use the ledger item, so this only has an effect when you use that field in the data mapping. Make sure the table covers every value that can occur in the incoming data. Off by default.

The code of the journal (dagboek) in AFAS on which APIcenter books financial mutations for orders and refunds. Use a journal code that exists in your AFAS administration. If no journal is filled in, APIcenter uses journal 40.

Notifications frequency

Notifications

Receive Notifications

Notifications

Default order prefix

Order Settings

Default order suffix

Order Settings

Delete orders with states

Order Settings

The order statuses for which APIcenter deletes the order in AFAS instead of creating it: Deleted and/or Canceled. When an order comes in with one of these statuses, APIcenter looks up the existing order in AFAS and deletes it. Only works when Enable order deletion is on as well. In the current AFAS flows this applies to sales orders, not to purchase orders.

Enable order deletion

Order Settings

Allows APIcenter to delete orders in AFAS. When on, an incoming order with one of the statuses you select in Delete orders with states is deleted in AFAS instead of being created. Off by default. In the current AFAS flows this applies to sales orders, not to purchase orders.

AFAS has no shipping costs at order level, so shipping costs must be sent as an order line. Turn this on to convert the shipping costs of an order into a separate order line with quantity 1 and the shipping amount. The line is only added when the order actually contains shipping costs, and you also need to fill in the item code. With the financial mutation types Complex and Extreme, this line is booked on the default ledger shipping account. Off by default.

Send Order as

Order Settings

Determines what APIcenter creates in AFAS for each incoming order.

  • Order (default): a sales order (verkooporder). The articles must exist in AFAS and stock is updated.
  • Direct Invoice: a direct invoice (directe factuur), including a stock mutation.
  • Quotation: a quotation (offerte), without a stock mutation.
  • Financial Mutation: a booking in the general ledger, split according to Use financial mutation method. The articles do not need to exist in AFAS.
  • Forecast: a forecast of the expected revenue.

The other options are not supported for AFAS sales orders. For refunds, choose Financial Mutation for a booking in the general ledger; any other choice creates a direct invoice as credit (the AFAS default for refunds). Purchase orders are always created as purchase orders.

Skip negativity flip process

Product Settings

Use SKU to search for

Product Settings

Determines how APIcenter finds the AFAS article for each order line. The product code from the order line is compared with:

  • SKU (default): the item code (artikelcode) in AFAS.
  • Barcode: the barcode of the article.
  • EAN, Alternative ID, Product Type or Product Type and SKU: the alternative article ID in AFAS.

AFAS needs existing articles for orders, invoices and quotations, so an order line without a matching article gives an error.

Use page size

Run behaviour

Use a mapping table to translate the shipping method from the other application into the value AFAS should receive. The standard AFAS data mapping does not send a shipping method, so this only has an effect when you use the shipping method in the data mapping. Values that are not in the table are handled by What to do with a value that cannot be mapped using the mapping table. Off by default.

The shipping method APIcenter uses when the data from the source contains none. The standard data mapping to AFAS does not send the shipping method itself, so this only has effect when you use it in the data mapping or in business rules.

Enable the use of a default warehouse

Stock & Warehouse Settings

Turn this on to use a default warehouse (magazijn). For orders sent to AFAS, APIcenter then puts this warehouse on the order and on order lines without a warehouse. If this is on but no warehouse code is filled in, the order is not sent. Off by default.

Force the usage of the default warehouse

Stock & Warehouse Settings

Use warehouse mapping table

Stock & Warehouse Settings

Value for the default warehouse id

Stock & Warehouse Settings

Turn this on to use a default tax class (VAT code) when the data contains none. You enter the value in Set the value for the default taxclass when products are created. This default is also used for the extra order lines for costs when they have no tax class of their own. Off by default.

When on, APIcenter always uses the default tax class (VAT code), even if the data contains another one. When off (default), the default is only used when the data contains no tax class. For products sent to AFAS, this means every new product gets the default tax class.

Use a mapping table to translate VAT classes or rates from the other application into VAT codes (btw-codes) in AFAS, for example the 21% rate of a webshop into the matching AFAS code. On orders, refunds and purchase orders the code is set per order line; for financial mutations it is also used as the VAT code of the booking. Values that are not in the table are handled by What to do when the mapping can not be made?. Off by default.

The tax class (VAT code) APIcenter uses when the data contains none. Enter the value without a % sign. With a mapping table you can translate the tax values of the source into the VAT codes of AFAS. For products, the tax class is only set when the product is created in AFAS; you change it later in AFAS itself.

Decides what happens when the VAT mapping table has no row for a value from the incoming data.

  • Use default: APIcenter uses the default tax id, if that default is switched on; otherwise the field stays empty.
  • Use value: the original value is sent to AFAS unchanged.
  • Ignore value (the AFAS default): the field stays empty.

For products, AFAS always expects a VAT value, so choose Use default there and set a default tax id.

Still need help?

Ask the support assistant in your dashboard or create a support ticket.

Go to support