How to Generate Barcodes with ByteScout API Server

Hi, In this tutorial, we’ll be generating barcodes using our configured API Server. Let’s get started!

First of all, let me open API Server documentation.

This page lists all API Server methods. But, we are mostly interested in the Barcode generation endpoint. Let’s open that.

API Server Barcodes

Here we have different options such as value, name, type, etcetera. The value represents barcode value, type is barcode type.

We have an API server up and running. Let’s grab the local URL of the API server.

For the sake of simplicity, we’ll be posting a GET request to API Server. While in production, please choose the POST request type then.

API Server Barcodes Tutorial

Now, we’ll be building a request URL. To start with, let’s put an endpoint method name which is ‘barcode/generate’.

Additionally, let’s put other parameters as well. I am adding a value field of “Hello12345”. Also, let me specify the output file name as sampleQr.png. Lastly, let’s specify the barcode output type as QRCode. ByteScout API Server supports most of the barcode types available.

Generate Barcodes with API Server

We have set the storage type as local. Hence, all files will be locally generated. Let’s keep watch on generated files as well. I’ll be cleaning previously generated folders for a better view.

Finally, we’re all set for execution. API Server Endpoint for barcode generation will be in effect as soon as we hit the URL. As we observe, we have instant output.

Barcode Output

Upon reviewing the generated URL, we get QR Code generated. Additionally, Barcode is also stored in the local output folder. Yay!

QR Code Generated

Now, let’s try to generate barcodes of different types. For example, Code128. It’s as easy as changing the barcode type in the API request query. Let’s give it a try!

It’s working as expected! Simple isn’t it?