Barcode & QR
Generate and read barcodes, QR codes, and Swiss QR-bills
8 endpoints in this category. All require X-API-Key header.
Jump to:
Create Barcode
Create QR Code
Create Swiss QR Code
Read Barcode from Image
Read QR Code from Image
Read Swiss QR Code
Read Barcode from PDF
Read QR Code from PDF
Create Barcode
POST
/api/CreateBarcode
1 token
Generate a barcode image (Code128, EAN, UPC, etc).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
data |
string | required | Data to encode |
type |
string | optional |
code128, ean13, upc, code39
(default: code128)
|
options.scale |
number | optional |
Scale factor
(default: 2)
|
options.height |
number | optional | Bar height in pixels |
returnBase64 |
boolean | optional |
Return base64
(default: true)
|
Request Example
JSON
{"data": "1234567890", "type": "code128", "options": {"scale": 2, "height": 100}, "returnBase64": true}
Code Examples
curl -X POST "https://docbutterfly.com/api/CreateBarcode" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"data": "1234567890", "type": "code128", "options": {"scale": 2, "height": 100}, "returnBase64": true}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""data"": ""1234567890"", ""type"": ""code128"", ""options"": {""scale"": 2, ""height"": 100}, ""returnBase64"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/CreateBarcode", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/CreateBarcode"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"data": "1234567890", "type": "code128", "options": {"scale": 2, "height": 100}, "returnBase64": true}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://docbutterfly.com/api/CreateBarcode
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "data": "1234567890",
│ "type": "code128",
│ "options": {
│ "scale": 2,
│ "height": 100
│ },
│ "returnBase64": true
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/CreateBarcode"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededCreate QR Code
POST
/api/CreateQrCode
1 token
Generate a QR code image.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
data |
string | required | Data to encode |
options.width |
number | optional |
Size in pixels
(default: 256)
|
options.errorCorrectionLevel |
string | optional |
L, M, Q, H
(default: M)
|
returnBase64 |
boolean | optional |
Return base64
(default: true)
|
Request Example
JSON
{"data": "https://example.com", "options": {"width": 256, "errorCorrectionLevel": "M"}, "returnBase64": true}
Code Examples
curl -X POST "https://docbutterfly.com/api/CreateQrCode" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"data": "https://example.com", "options": {"width": 256, "errorCorrectionLevel": "M"}, "returnBase64": true}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""data"": ""https://example.com"", ""options"": {""width"": 256, ""errorCorrectionLevel"": ""M""}, ""returnBase64"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/CreateQrCode", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/CreateQrCode"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"data": "https://example.com", "options": {"width": 256, "errorCorrectionLevel": "M"}, "returnBase64": true}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://docbutterfly.com/api/CreateQrCode
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "data": "https://example.com",
│ "options": {
│ "width": 256,
│ "errorCorrectionLevel": "M"
│ },
│ "returnBase64": true
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/CreateQrCode"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededCreate Swiss QR Code
POST
/api/CreateSwissQrCode
1 token
Generate a Swiss QR-bill payment code.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
account |
string | required | IBAN number |
amount |
number | required | Payment amount |
currency |
string | required | CHF or EUR |
creditor |
object | required | {name, address, zip, city, country} |
returnBase64 |
boolean | optional |
Return base64
(default: true)
|
Request Example
JSON
{"account": "CH9300762011623852957", "amount": 199.95, "currency": "CHF", "creditor": {"name": "Company AG", "zip": "8000", "city": "Zurich", "country": "CH"}, "returnBase64": true}
Code Examples
curl -X POST "https://docbutterfly.com/api/CreateSwissQrCode" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"account": "CH9300762011623852957", "amount": 199.95, "currency": "CHF", "creditor": {"name": "Company AG", "zip": "8000", "city": "Zurich", "country": "CH"}, "returnBase64": true}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""account"": ""CH9300762011623852957"", ""amount"": 199.95, ""currency"": ""CHF"", ""creditor"": {""name"": ""Company AG"", ""zip"": ""8000"", ""city"": ""Zurich"", ""country"": ""CH""}, ""returnBase64"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/CreateSwissQrCode", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/CreateSwissQrCode"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"account": "CH9300762011623852957", "amount": 199.95, "currency": "CHF", "creditor": {"name": "Company AG", "zip": "8000", "city": "Zurich", "country": "CH"}, "returnBase64": true}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://docbutterfly.com/api/CreateSwissQrCode
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "account": "CH9300762011623852957",
│ "amount": 199.95,
│ "currency": "CHF",
│ "creditor": {
│ "name": "Company AG",
│ "zip": "8000",
│ "city": "Zurich",
│ "country": "CH"
│ },
│ "returnBase64": true
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/CreateSwissQrCode"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededRead Barcode from Image
POST
/api/ReadBarcodeImage
1 token
Read barcodes from an image.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
image |
string | required | Base64-encoded image |
Request Example
JSON
{"image": "<base64-image>"}
Response Example
JSON
{"barcodes": [{"type": "CODE_128", "value": "1234567890"}]}
Code Examples
curl -X POST "https://docbutterfly.com/api/ReadBarcodeImage" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"image": "<base64-image>"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""image"": ""<base64-image>""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ReadBarcodeImage", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/ReadBarcodeImage"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"image": "<base64-image>"}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://docbutterfly.com/api/ReadBarcodeImage
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "image": "\u003Cbase64-image\u003E"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/ReadBarcodeImage"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededRead QR Code from Image
POST
/api/ReadQrCodeImage
1 token
Read QR codes from an image.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
image |
string | required | Base64-encoded image |
Request Example
JSON
{"image": "<base64-image>"}
Response Example
JSON
{"codes": [{"value": "https://example.com"}]}
Code Examples
curl -X POST "https://docbutterfly.com/api/ReadQrCodeImage" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"image": "<base64-image>"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""image"": ""<base64-image>""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ReadQrCodeImage", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/ReadQrCodeImage"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"image": "<base64-image>"}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://docbutterfly.com/api/ReadQrCodeImage
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "image": "\u003Cbase64-image\u003E"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/ReadQrCodeImage"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededRead Swiss QR Code
POST
/api/ReadSwissQrCode
1 token
Read and parse Swiss QR-bill data.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
image |
string | required | Base64 image of QR-bill |
Request Example
JSON
{"image": "<base64-image>"}
Code Examples
curl -X POST "https://docbutterfly.com/api/ReadSwissQrCode" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"image": "<base64-image>"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""image"": ""<base64-image>""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ReadSwissQrCode", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/ReadSwissQrCode"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"image": "<base64-image>"}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://docbutterfly.com/api/ReadSwissQrCode
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "image": "\u003Cbase64-image\u003E"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/ReadSwissQrCode"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededRead Barcode from PDF
POST
/api/ReadBarcodeDocument
2 tokens
Read barcodes from a PDF document.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
pdf |
string | required | Base64-encoded PDF |
pages |
array | optional | Array of page numbers to scan (default all) |
Request Example
JSON
{"pdf": "<base64-pdf>", "pages": [1, 2, 3]}
Code Examples
curl -X POST "https://docbutterfly.com/api/ReadBarcodeDocument" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"pdf": "<base64-pdf>", "pages": [1, 2, 3]}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""pdf"": ""<base64-pdf>"", ""pages"": [1, 2, 3]}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ReadBarcodeDocument", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/ReadBarcodeDocument"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"pdf": "<base64-pdf>", "pages": [1, 2, 3]}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://docbutterfly.com/api/ReadBarcodeDocument
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "pdf": "\u003Cbase64-pdf\u003E",
│ "pages": [
│ 1,
│ 2,
│ 3
│ ]
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/ReadBarcodeDocument"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededRead QR Code from PDF
POST
/api/ReadQrCodeDocument
2 tokens
Read QR codes from a PDF document.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
pdf |
string | required | Base64-encoded PDF |
pages |
array | optional | Array of page numbers to scan (default all) |
Request Example
JSON
{"pdf": "<base64-pdf>", "pages": [1, 2, 3]}
Code Examples
curl -X POST "https://docbutterfly.com/api/ReadQrCodeDocument" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"pdf": "<base64-pdf>", "pages": [1, 2, 3]}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""pdf"": ""<base64-pdf>"", ""pages"": [1, 2, 3]}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ReadQrCodeDocument", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/ReadQrCodeDocument"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"pdf": "<base64-pdf>", "pages": [1, 2, 3]}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://docbutterfly.com/api/ReadQrCodeDocument
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "pdf": "\u003Cbase64-pdf\u003E",
│ "pages": [
│ 1,
│ 2,
│ 3
│ ]
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/ReadQrCodeDocument"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as needed