Skip to content
Automatisering

Explore effortless API implementation for your partners!

There is growing demand for APIs to submit jobs. Not everyone is a programmer — here is a starting point for any beginner to build one themselves.

19 December 2023 · by Germen Kroon

What is an API?

An API (Application Programming Interface) is like the WhatsApp of apps: it sends messages, receives responses and enables interaction. Let us create a simple API.

The benefits

With a single API call, a partner can submit a job, file, XML or JSON. Simple and fast.

What do you need?

Switch now includes a "Switch Core Engine" with Enfocus PitStop Server. You can download a free demo and try it out yourself.

Step 1: Create your API

Using Switch, create a new flow "My first API", add a "Webhook" and connect it to a folder for incoming data. Fill in these parameters:

  • Name: "my api"

  • Path: "my-api-v1"

Ignore the rest for now.

Step 2: Test your API

Activate the flow and download the free app "Postman" to test APIs. Follow these steps:

Step 2: Test your API

  1. Start a new POST (for sending information).

  2. Use the URL: http://127.0.0.1:51088/scripting/my-api-v1.

  3. Choose "raw data" and select "text" for sending.

  4. Type, for example, "Hello! Does this come through?".

Click "Send" and Postman should return { "status": true }, with a file in the "received" folder. Congratulations! You have just made your first API call.

Step 3: Share your API with your partners

It is important that your clients can reach it! Their external IP address must reach Switch. Look up your own external IP and use it as the new API URL for your partners, for example: http://149.143.60.165:51088/scripting/my-api-v1. Make sure port 51088 (or another) in the firewall/router points to the internal IP of the Switch computer.

Step 4: Expand your workflow

From here you can adjust the workflow as desired, for example saving the files with a timestamp and unique number:

Step 4: Expand your workflow

Step 4: Expand your workflow

  1. Add the "Rename" element and a folder.

  2. Check "Replace" on the first action and choose "Act on: Complete filename".

  3. For "Replace by" choose "Single-line text with variables defined" and fill in your desired values, such as a date, UID and counter.

That was quite a ride! Ready for a new way of collaborating? Give it a try now.

Written by Germen Kroon · Tips & Tricks for PrintMatters.

© 2023 Germen Kroon.

Related articles

Automatisering 15 Feb 2026

Automating with Cron

Not every workflow is event-driven. With Cron you start tasks at a fixed time — and with the Cron Scheduler in Griffin Auto you drive Switch on a fully time-based schedule.

Read more
Tech 15 Jun 2025

Talking to machines

Presses and finishing machines spit out data but rarely listen back. With Switch apps, barcodes and JDF you turn that monologue into a dialogue.

Read more
Automatisering 15 Feb 2025

Optimise your production process

Process optimisation does not start with software but with analysis. With the Five Whys method and the Ghent PDF Output Suite you tackle the real cause of errors.

Read more

Never miss an update?

Get the latest tips on workflow automation straight to your inbox.

By subscribing you agree to our privacy policy.