This document outlines the procedure for making API calls to retrieve product barcode types data via https://easycms.fi/public_api/get_barcode_types/.
Retrieve barcode types data effectively using the below API call. Apply the required parameters in the request payload to retrieve barcode type information.
https://easycms.fi/public_api/get_barcode_types/TOKEN (api_key): Your unique API key for authentication. How to Create API Credentials.username: Your login username. password: Your login password. account: Your specific account ID. | Parameter | Type | Description |
|---|---|---|
barcode_id |
integer | Specific barcode type ID to retrieve |
search |
string | Search keyword. Performs a partial (LIKE) match across multiple barcode type columns. Supports multi-word queries separated by spaces or + — each word must match at least one column (AND logic between words). Case-insensitive. Searchable columns: barcode_name, barcodeNumber, barcode_id |
visible |
integer | Filter by visibility (1=visible, 0=hidden). To include hidden barcode types in the response, use show_invisible=1 instead. |
show_invisible |
integer | Set to 1 to include barcode types with visible=0 (hidden) in the response. By default, only visible barcode types (visible=1) are returned. |
start |
integer | Starting index for pagination (default: 0) |
limit |
integer | Number of records to return (default: 50, max: 50) |
The search parameter enables broad keyword matching across all relevant columns of the barcode type record. This is useful for:
search=EAN to find TYPE_EAN_8 and TYPE_EAN_13).barcodeNumber) or ID (barcode_id).search=CODE+128 will only return barcode types where one word matches "CODE" AND another matches "128" across any searchable columns.Each word in the search query is matched independently across all searchable columns using OR within a word, and AND between words.
# Get all barcode types
curl -X GET 'https://easycms.fi/public_api/get_barcode_types?username=USERNAME&password=PASSWORD&account=ACCOUNT_ID' \
-H 'Authorization1: TOKEN'
# Get specific barcode type
curl -X GET 'https://easycms.fi/public_api/get_barcode_types?username=USERNAME&password=PASSWORD&account=ACCOUNT_ID&barcode_id=1' \
-H 'Authorization1: TOKEN'
# Search barcode types by keyword (matches barcode_name, barcodeNumber, barcode_id)
curl -X GET 'https://easycms.fi/public_api/get_barcode_types?username=USERNAME&password=PASSWORD&account=ACCOUNT_ID&search=EAN' \
-H 'Authorization1: TOKEN'
# Search barcode types by multiple keywords (AND logic)
curl -X GET 'https://easycms.fi/public_api/get_barcode_types?username=USERNAME&password=PASSWORD&account=ACCOUNT_ID&search=CODE+128' \
-H 'Authorization1: TOKEN'
# Get only visible barcode types
curl -X GET 'https://easycms.fi/public_api/get_barcode_types?username=USERNAME&password=PASSWORD&account=ACCOUNT_ID&visible=1' \
-H 'Authorization1: TOKEN'
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://easycms.fi/public_api/get_barcode_types?" . http_build_query([
'username' => 'USERNAME',
'password' => 'PASSWORD',
'account' => 'ACCOUNT_ID',
'search' => 'EAN'
]),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array("Authorization1: TOKEN"),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://easycms.fi/public_api/get_barcode_types"
headers = {"Authorization1": "TOKEN"}
params = {
'username': 'USERNAME',
'password': 'PASSWORD',
'account': 'ACCOUNT_ID',
'search': 'EAN'
}
response = requests.get(url, headers=headers, params=params)
print(response.text)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://easycms.fi/public_api/get_barcode_types?username=USERNAME&password=PASSWORD&account=ACCOUNT_ID&search=EAN"))
.headers("Authorization1", "TOKEN")
.GET()
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
const https = require('https');
const options = {
hostname: 'easycms.fi',
path: '/public_api/get_barcode_types?username=USERNAME&password=PASSWORD&account=ACCOUNT_ID&search=EAN',
method: 'GET',
headers: {
'Authorization1': 'TOKEN'
}
};
const req = https.request(options, (res) => {
let data = '';
res.on('data', (chunk) => { data += chunk; });
res.on('end', () => { console.log(data); });
});
req.on('error', (e) => { console.error(e); });
req.end();
import okhttp3.OkHttpClient
import okhttp3.Request
fun main() {
val client = OkHttpClient()
val request = Request.Builder()
.url("https://easycms.fi/public_api/get_barcode_types?username=USERNAME&password=PASSWORD&account=ACCOUNT_ID&search=EAN")
.addHeader("Authorization1", "TOKEN")
.build()
client.newCall(request).execute().use { response ->
if (!response.isSuccessful) throw IOException("Unexpected code $response")
println(response.body?.string())
}
}
When you make a request to the endpoint, you receive a JSON response containing various keys and values. Here's an explanation of the response keys and their meanings:
{
"INFO": {
"start": 0,
"limit": 50,
"count": 10,
"total_count": 15
},
"OUTPUT": [
{
"barcode_id": "1",
"barcode_name": "TYPE_CODE_39",
"barcodeNumber": "1",
"visible": "1",
"parent_id": "0"
},
{
"barcode_id": "2",
"barcode_name": "TYPE_CODE_39E",
"barcodeNumber": "2",
"visible": "1",
"parent_id": "0"
},
{
"barcode_id": "3",
"barcode_name": "TYPE_CODE_93",
"barcodeNumber": "3",
"visible": "1",
"parent_id": "0"
},
{
"barcode_id": "8",
"barcode_name": "TYPE_EAN_13",
"barcodeNumber": "8",
"visible": "1",
"parent_id": "0"
}
]
}
- `INFO`: Object containing pagination information
- `start`: Starting index for pagination
- `limit`: Maximum number of records returned
- `count`: Number of records in this response
- `total_count`: Total number of records available
- `OUTPUT`: Array of barcode type objects
- `barcode_id`: Unique identifier for the barcode type
- `barcode_name`: Name of the barcode type (e.g., TYPE_EAN_13)
- `barcodeNumber`: Numeric identifier for the barcode type
- `visible`: Visibility flag (1=visible, 0=hidden)
- `parent_id`: Parent barcode type ID for hierarchical types
Here are the possible error messages and their meanings:
| Error Code | HTTP Status | Description |
|---|---|---|
INVALID_LIMIT |
400 | Maximum query size is 50 rows per query |
BARCODE_TYPE_NOT_FOUND |
404 | Barcode type with the specified barcode_id does not exist |
UN-AUTHORIZED |
401 | Incorrect username or password |
this_account_does_not_exist_or_your_credentials_do_not_match_this_account |
401 | The account doesn't exist or mismatched credentials |
The system supports the following barcode types:
| barcode_id | barcode_name | Description |
|---|---|---|
| 1 | TYPE_CODE_39 | Code 39 |
| 2 | TYPE_CODE_39E | Code 39 Extended |
| 3 | TYPE_CODE_93 | Code 93 |
| 4 | TYPE_STANDARD_2_5 | Standard 2 of 5 |
| 5 | TYPE_INTERLEAVED_2_5 | Interleaved 2 of 5 |
| 6 | TYPE_CODE_128 | Code 128 |
| 7 | TYPE_EAN_8 | EAN-8 |
| 8 | TYPE_EAN_13 | EAN-13 |
| 9 | TYPE_UPC_A | UPC-A |
| 10 | TYPE_UPC_E | UPC-E |