Skip links

Connect FileMaker with Afterbuy

FileMaker tips and instructions

Connect FileMaker with the Afterbuy API

Afterbuy is a comprehensive e-commerce solution developed primarily for online retailers to efficiently manage sales, customer management and logistics processes. It provides tools for the entire sales process, from listing and selling on marketplaces such as eBay, Amazon and your own online store to shipping and tracking. Afterbuy integrates various sales platforms and automates numerous administrative tasks, making it a popular choice for merchants with large transaction volumes.

Via the Afterbuy API, users can access a variety of business data and processes and import them into an external system, such as a FileMaker-based ERP system (e.g. gFM-Business), import. The API makes it possible to retrieve and integrate data from the following business cases:

  • OrdersDetailed information on orders placed can be retrieved via the API, including order date, order number, payment status, shipping information and the individual order items. This data can be imported into the ERP system to automate order processing, shipping and invoicing.
  • Customer dataInformation about customers who have placed orders, such as name, address, email, telephone number and payment information, can also be retrieved and imported into the CRM module of an ERP system. This enables centralized management of customer contacts and the automation of customer service activities.
  • Products and inventoriesAfterbuy also manages product information and stock levels. Product catalogs with article numbers, descriptions, prices and stock levels can be synchronized via the API. This helps to keep the product data in the ERP system up to date and maintain an overview of the stock.
  • Payments and invoicesThe API enables the retrieval of payment information linked to orders. This can be integrated into the ERP system to monitor the payment status and create automatic invoices.
  • Shipping dataShipping information, such as tracking numbers and shipping service providers, can be recorded via the API to automate shipping management in an ERP system and make it easier to track shipments.

The Afterbuy API thus offers the possibility to integrate almost all relevant data of an e-commerce business model into a FileMaker-based ERP system such as gFM-Business. This leads to centralized data management, greater efficiency in business processing and reduces the manual effort required to synchronize sales, customer and warehouse information.

Four FileMaker ERP platforms for optimal operating processes.

Request information
Professional ERP software

Import of orders and customer data from Afterbuy into FileMaker

This step-by-step guide describes how to import orders and customer data from Afterbuy into a FileMaker database via the API. The steps include setting up the API connection, retrieving the data from Afterbuy and importing it into FileMaker.

Prerequisites
  • Afterbuy account: With access to the API.
  • FileMaker Pro: For local development and administration of the database.
  • API key and access data from Afterbuy.
  • Knowledge of FileMaker scripting and basic web technologies (JSON, HTTP requests).
1. setting up the Afterbuy API

Before you can import data, you must have access to the Afterbuy API:

Request API access

  • Log in to your Afterbuy account.
  • Navigate to Settings > API settings.
  • Request an API key. You will receive an API ID and an API token key.

Read API documentation

  • Read the API documentation, which you can find in the Afterbuy backend.
  • There you will find all the endpoints for retrieving order data, such as GetSoldItems.
2. retrieving orders from Afterbuy

2.1 API endpoint for orders

The end point for retrieving orders is:

https://api.afterbuy.de/afterbuy/ABInterface.aspx

The API uses XML requests to transfer the data. Order data is retrieved using the GetSoldItems command.

2.2 Example request to query order data

Below you will find an example of an XML request to retrieve orders via the API:

2.3 Authentication and retrieval of data

Send the XML request to the endpoint with an HTTP POST request.

Example in cURL:

curl -X POST https://api.afterbuy.de/afterbuy/ABInterface.aspx \
-H "Content-Type: application/xml" \
-d @GetSoldItemsRequest.xml

The response contains all the details of the orders placed in the specified period. This data also contains information about the customers.

FileMaker Crash Course

Fast and effective FileMaker
learning in 20 chapters.

Participate free of charge
3. setup in FileMaker

3.1 Creating the database structure

In FileMaker, you first create tables to save the imported order data. You should create at least the following tables:

  • OrdersTo save the general order data.
  • CustomersFor the customer data of the orders.
  • Order itemsFor the products included in the orders.

The structure could look like this:

  • OrdersOrder number, date, customer_ID, total amount, status, etc.
  • CustomersCustomer_ID, name, address, e-mail, telephone number, etc.
  • Order itemsOrder number, product_ID, quantity, price, etc.

3.2 Importing JSON or XML data into FileMaker

To integrate the data from Afterbuy into FileMaker, you can process the response from the API either as XML or as JSON.

Create FileMaker script for the API call:

  • Use the Insert from URL-command to retrieve the data from the Afterbuy API.
  • Set the URL and the body for the POST request according to the Afterbuy API documentation.

Data processing

If the response is in XML format, you can use the XML import to import the data directly into the corresponding tables.

Alternatively, you can convert the data into JSON using a script to make it easier to distribute it to the corresponding fields and tables.

Example for retrieving and parsing the data:

Set variable [ $url ; Value: "https://api.afterbuy.de/afterbuy/ABInterface.aspx" ]
Set variable [ $body ; Value: "..." ]
Insert from URL [ $result ; $url ; cURL options: "-X POST --data $body" ]

3.3 Importing data into the FileMaker tables

  • Parse XML or JSON response: Use FileMaker scripts to parse the response and import it into the appropriate tables (orders, customers, line items).
  • You can use the function JSONGetElement or ReadAsText (for XML) to extract the data into the fields and then write them to FileMaker fields using Set Field.

Link data

  • Link the orders to the customers using the customer number.
  • Link the order items to the orders via the order number.

Automated import

  • Create a script in FileMaker that performs the import regularly (e.g. daily) by querying the API and importing new orders into the database.
4. automation and error handling

Regular data updateRegularly retrieve new orders via a FileMaker script and update the order and customer data in the database.

Error handlingImplement error checks in your FileMaker scripts to detect invalid or missing data. Set script triggers to take appropriate action on error messages (e.g. notifications or logs).

FileMaker ERP software with merchandise management, CRM and billing, flexibly customizable.

More information
Professional ERP software

Frequently asked questions about FileMaker and Afterbuy

  • What is the Afterbuy API and how does it work?
    • The Afterbuy API is an interface that makes it possible to access data and functions from Afterbuy. You can use it to retrieve orders, customer data, stock levels and other information and integrate it into systems such as FileMaker. The API uses XML requests and returns the data in a structured form.
  • Why should I connect Afterbuy with FileMaker?
    • By connecting Afterbuy with FileMaker, you can automate your business processes and manage data centrally. For example, you can automatically import orders into FileMaker, synchronize customer data and make shipping processes more efficient.
  • What data can I import into FileMaker via the Afterbuy API?
    • You can use the Afterbuy API to retrieve orders, customer data, product information, stock levels, shipping information and payments and import them into your FileMaker solution.
  • How do I get started with the Afterbuy API in FileMaker?
    • To use the Afterbuy API in FileMaker, you need access data from Afterbuy (API key). You can then set up the API requests in FileMaker using scripts and the "Insert from URL" command to retrieve the data from Afterbuy.
  • How safe is it to use the Afterbuy API in conjunction with FileMaker?
    • The Afterbuy API uses authentication mechanisms, such as API keys and user credentials, to ensure that only authorized users have access to the data. FileMaker also supports secure data connections to ensure secure data exchange.
  • Can I integrate the Afterbuy API into an existing FileMaker database?
    • Yes, you can easily integrate the Afterbuy API into an existing FileMaker database. All you need to do is create tables and fields for the Afterbuy data and set up scripts to communicate with the API.
  • Can I set up automated processes between Afterbuy and FileMaker?
    • Yes, you can create automated scripts that, for example, regularly retrieve orders or customer data from Afterbuy and import them into FileMaker. This helps to optimize workflows and save time.
  • Are there any restrictions on the amount of data that can be retrieved via the API?
    • The Afterbuy API has certain limits, such as the maximum number of records that can be retrieved in a single API call. However, these restrictions can be circumvented by making several API calls in succession.
  • How do I find out what functions the Afterbuy API offers?
    • All available functions of the Afterbuy API are described in the API documentation. You can check there which endpoints and data structures are available to use in your FileMaker solution.
  • What do I do if I have a problem with the Afterbuy API?
    • If you encounter a problem, you should first consult the Afterbuy API documentation to ensure that the API request is formulated correctly. If the problem persists, you can contact Afterbuy support or the FileMaker community for assistance.

Summary

Importing Afterbuy orders into a FileMaker solution requires a combination of API communication, XML/JSON processing and FileMaker scripts. By setting up the Afterbuy API and developing FileMaker scripts, you can create an automated workflow that imports all relevant order and customer data into your system.

In addition to the options described here, you can use many other functions via the Afterbuy API, such as retrieving stock levels, managing product data or editing customer information. These additional functions are described in detail in Afterbuy's comprehensive API documentation and can be integrated into your FileMaker solution in a similar way. The flexible structure of the API allows you to further automate your business processes and customize them to your company's requirements. Use the documentation to exploit the full potential of the API and further optimize your solution.

Share this page:

ERP software as flexible as your company.
We will be happy to advise you.

Customizable ERP software for Mac, Windows and iOS.

You are here: Afterbuy and FileMaker: Optimize your e-commerce processes