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
- APIcenter checks whether the purchase order already exists in AFAS, by order number or by reference. An existing purchase order is not created again.
- 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.
- 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.
- 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 SettingsDecides 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 SettingsThe 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 fallback to default id and/or email when customer not found
Customer SettingsEnable use of default debtor
Customer SettingsForce the usage of the customer type id
Customer SettingsWhen 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.
Force the usage of the default debtor
Customer SettingsUse contact persons
Customer SettingsDetermines 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.
Value to use as Default debtor ID
Customer SettingsEnable URL Encoding of data in the endpoints of the target application
General flow settingEnable URL encoding of data in endpoints
General flow settingForce the usage of a single administration set by the default
General flow settingSet the administration
General flow settingSet the administration ID that we use for sending the orders towards
General flow settingThe 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 settingWhat to do with a value that cannot be mapped using the mapping table
General flow settingDefault Revenue Account number
Ledger SettingsThe 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.
Enable the usage of a default revenue account
Ledger SettingsEnable the use of a ledger item
Ledger SettingsEnable use of a default journal
Ledger SettingsTurn 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.
Force the usage of the ledger item usage
Ledger SettingsForce the use of the default journal Id
Ledger SettingsForce the use of the default revenue account
Ledger SettingsLedger item id
Ledger SettingsThe 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 map the revenue account
Ledger SettingsUse 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 map the value of the ledger item
Ledger SettingsUse 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.
Value to be used as the default journal id
Ledger SettingsThe 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 Email address
NotificationsNotifications Slack webhook
NotificationsNotifications frequency
NotificationsReceive Notifications
NotificationsAdd order line for billing costs
Order SettingsAdd order line for commission
Order SettingsAdd order line for payment costs
Order SettingsDefault item code for Payment Costs
Order SettingsDefault item code for billing costs
Order SettingsDefault item code for commission
Order SettingsDefault item code to use for shipping cost order line
Order SettingsDefault order prefix
Order SettingsDefault order suffix
Order SettingsDefault tax class id for billing costs order line
Order SettingsDefault tax class id for commission order line
Order SettingsDefault tax class id for payment fee order line
Order SettingsDefault tax class id for shipping costs order line
Order SettingsDelete orders with states
Order SettingsThe 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.
Description to use for the order line for billing costs
Order SettingsDescription to use for the order line for commission
Order SettingsDescription to use for the order line for payment costs
Order SettingsDescription to use for the order line for shipping costs
Order SettingsEnable order deletion
Order SettingsAllows 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.
Require order line for shipping costs
Order SettingsAFAS 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 SettingsDetermines 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 SettingsUse SKU to search for
Product SettingsDetermines 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.
Maximum number of pages to retrieve
Run behaviourUse page size
Run behaviourEnable the use of a default shipping method
Shipment SettingsForce the use of the default shipping method
Shipment SettingsUse a mapping table to map shipping methods
Shipment SettingsUse 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.
Value to use as the default shipping method id
Shipment SettingsThe 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.
What to do with a value that cannot be mapped using the mapping table
Shipment SettingsEnable the use of a default warehouse
Stock & Warehouse SettingsTurn 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 SettingsUse warehouse mapping table
Stock & Warehouse SettingsValue for the default warehouse id
Stock & Warehouse SettingsWhat to do with a value that cannot be mapped using the mapping table
Stock & Warehouse SettingsEnable the use of a default tax id
Tax & Tax RatesTurn 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.
Force the use of the default tax id
Tax & Tax RatesWhen 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 default tax id mapping table
Tax & Tax RatesUse 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.
Value for the default tax id (exclude '%')
Tax & Tax RatesThe 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.