This document outlines the procedure for making API calls to retrieve category data from https://easycms.fi/public_api/get_categories/. Utilize various parameters to filter and customize your data retrieval.
Fetch category data effectively using the below API call. Apply the IN or NOT_IN parameters as an array or a single integer to filter results according to your specific needs.
https://easycms.fi/public_api/get_categories/
Each parameter can be used individually or in combination to refine your data retrieval:
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.
Pagination: To manage data effectively, this endpoint supports fetching up to 50 products at a time.
Parameters:
start - Specify the starting point of the row from which to begin fetching products.limit - Control the number of products returned in a single request. The maximum limit is 50, but you can opt for a smaller number based on your needs.
Filters: To manage data effectively, this endpoint supports fetching up to 50 products at a time.
IN - For filtering by category IDs (optional, array or single integer).
NOT_IN - For excluding specific category IDs (optional, array or single integer).
search - Search keyword (optional, string). Performs a partial (LIKE) match across multiple category columns. Supports multi-word queries separated by spaces or + — each word must match at least one column (AND logic between words). Case-insensitive.
category_name, catNumber, cid, crc_iddo_not_show_success_message: Do not show the success message in the response from API server by setting this value to 1, 0 will set to show the success response text
show_invisible: Set to 1 to include categories with visible=0 (hidden) in the response. By default, only visible categories (visible=1) are returned.
return_image_base64: Set to 1 to include the full base64-encoded image data in the image field. By default (0), the image field returns false and the image column is not fetched from the database for better performance. Use image_url instead for displaying images.
Categories are automatically filtered based on which API section key is used for authentication. Each category has three visibility flags:
api_visible_b2c_wp (B2C WordPress API) — default: 1 (visible)api_visible_b2b_app (B2B Mobile App API) — default: 1 (visible)api_visible_inventory_app (Inventory Manager App API) — default: 1 (visible)When authenticating with a WordPress API key, only categories where api_visible_b2c_wp=1 are returned. The same applies to B2B Mobile App and Inventory Manager App keys respectively. Categories with the flag set to 0 are excluded from the response. These fields are also included in each category object in the response.
The search parameter enables broad keyword matching across all relevant columns of the category record. This is useful for:
category_name).catNumber) or internal ID (cid).crc_id).search=SHISHA+TUOTTEET will only return categories where one word matches "SHISHA" AND another matches "TUOTTEET" 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 categories (default: first 50, visible only)
curl -X POST 'https://easycms.fi/public_api/get_categories' \
-H 'Authorization1: TOKEN' \
-d 'username=USERNAME&password=PASSWORD&account=ACCOUNT_ID'
# Search categories by keyword (matches category_name, catNumber, cid, crc_id)
curl -X POST 'https://easycms.fi/public_api/get_categories' \
-H 'Authorization1: TOKEN' \
-d 'username=USERNAME&password=PASSWORD&account=ACCOUNT_ID&search=SHISHA'
# Search categories by multiple keywords (AND logic)
curl -X POST 'https://easycms.fi/public_api/get_categories' \
-H 'Authorization1: TOKEN' \
-d 'username=USERNAME&password=PASSWORD&account=ACCOUNT_ID&search=SHISHA+TUOTTEET'
# Get categories including hidden ones
curl -X POST 'https://easycms.fi/public_api/get_categories' \
-H 'Authorization1: TOKEN' \
-d 'username=USERNAME&password=PASSWORD&account=ACCOUNT_ID&show_invisible=1'
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://easycms.fi/public_api/get_categories",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query(['username' => 'USERNAME', 'password' => 'PASSWORD', 'account' => 'ACCOUNT_ID', 'search' => 'SHISHA']),
CURLOPT_HTTPHEADER => array("Authorization1: TOKEN"),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://easycms.fi/public_api/get_categories"
headers = {"Authorization1": "TOKEN"}
payload = {'username': 'USERNAME', 'password': 'PASSWORD', 'account': 'ACCOUNT_ID', 'search': 'SHISHA'}
response = requests.post(url, headers=headers, data=payload)
print(response.text)
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://easycms.fi/public_api/get_categories"))
.headers("Authorization1", "TOKEN")
.POST(HttpRequest.BodyPublishers.ofString("username=USERNAME&password=PASSWORD&account=ACCOUNT_ID&search=SHISHA"))
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
const https = require('https');
const data = new URLSearchParams({
username: 'USERNAME',
password: 'PASSWORD',
account: 'ACCOUNT_ID',
search: 'SHISHA'
}).toString();
const options = {
hostname: 'prolasku.fi',
path: '/public_api/get_categories',
method: 'POST',
headers: {
'Authorization1': 'TOKEN',
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Length': data.length
}
};
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.write(data);
req.end();
import React, { useEffect, useState } from 'react';
function App() {
const [categoryData, setCategoryData] = useState('');
useEffect(() => {
const fetchData = async () => {
try {
const response = await fetch('https://easycms.fi/public_api/get_categories', {
method: 'POST',
headers: {'Authorization1': 'TOKEN', 'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({username: 'USERNAME', password: 'PASSWORD', account: 'ACCOUNT_ID', search: 'SHISHA'}).toString()
});
const data = await response.text();
setCategoryData(data);
} catch (error) {
console.error(error);
}
};
fetchData();
}, []);
return ({categoryData});
}
export default App;
// Kotlin example requires using a third-party library like OkHttp for POST requests with a body
// Kotlin Example using OkHttp for POST request
import okhttp3.OkHttpClient
import okhttp3.FormBody
import okhttp3.Request
fun main() {
val client = OkHttpClient()
val formBody = FormBody.Builder()
.add("username", "USERNAME")
.add("password", "PASSWORD")
.add("account", "ACCOUNT_ID")
.add("search", "SHISHA")
.build()
val request = Request.Builder()
.url("https://easycms.fi/public_api/get_categories")
.post(formBody)
.addHeader("Authorization1", "TOKEN")
.build()
client.newCall(request).execute().use { response ->
if (!response.isSuccessful) throw IOException("Unexpected code $response")
println(response.body?.string())
}
}
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
var token = "TOKEN";
var content = new FormUrlEncodedContent(new[]
{
new KeyValuePair("username", "USERNAME"),
new KeyValuePair("password", "PASSWORD"),
new KeyValuePair("account", "ACCOUNT_ID"),
new KeyValuePair("search", "SHISHA")
});
using (var httpClient = new HttpClient())
{
httpClient.DefaultRequestHeaders.Add("Authorization1", token);
var response = await httpClient.PostAsync("https://easycms.fi/public_api/get_categories", content);
if (response.IsSuccessStatusCode)
{
var responseData = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseData);
}
else
{
Console.WriteLine($"Error: {response.StatusCode}");
}
}
}
}
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:
- `cid`: Category ID - This is the unique identifier for the category.
- `crc_id`: CRC ID - This is a unique identifier associated with the category.
- `visible`: Visibility Status - Indicates whether the category is visible (1) or not (0).
- `icon`: Icon Presence - Indicates if an icon is associated with the category (true) or not (false).
- `image`: Image Data - By default returns `false` (the base64 data is **not fetched** for performance). Pass `return_image_base64=1` to get the full base64-encoded image data URI (e.g. `data:image/jpeg;base64,...`). Returns `false` if no image is uploaded.
- `image_name`: Image Filename - The filename of the uploaded category image (e.g. `beer_123456-2026-04-14.jpg`). Returns `false` if no image is uploaded.
- `image_url`: Image URL - The full URL to the category image file on the server (e.g. `https://example.com/uploads/category/beer_123456-2026-04-14.jpg`). Returns an empty string if no image is uploaded. Use this for displaying images directly without embedding base64 data.
- `parent_id`: Parent Category ID - If applicable, this is the ID of the parent category.
- `catNumber`: Category Number - A numerical identifier for the category.
- `category_name`: Category Names - An object containing category names in different languages.
- `fi`: Category name in Finnish.
- `en_gb`: Category name in English (Great Britain).
- `zh`: Category name in Chinese.
- `vi`: Category name in Vietnamese.
- `fa_ir`: Category name in Persian (Iran).
- `es`: Category name in Spanish.
These key-value pairs provide comprehensive information about the product and can be used for various purposes in your application.
{
"INFO": {
"start": 0,
"limit": 50,
"count": 50,
"total_count": "55",
"tip": "You may pass the table's main column identifier ex: city_id for tbl_cities, pid for tbl_products, cid for tbl_categories etc... to make a request for a single specific id from your query. EXAMPLE PARAM: city_id = 2 when sending the request for \"get_cities\" "
},
"OUTPUT": [
{
"cid": "117",
"crc_id": "15bd94b4-141c-4b74-9148-1b927d66abd3",
"visible": "1",
"icon": false,
"image": false,
"image_name": "example-2026-04-14-140555839.jpg",
"image_url": "https://example.com/uploads/category/example-2026-04-14-140555839.jpg",
"parent_id": 0,
"catNumber": "4",
"category_name": {
"fi": "Nemo-verkkoliinat",
"en_gb": "MAKEISET",
"zh": "MAKEISET",
"vi": "MAKEISET",
"fa_ir": "Nemo-verkkoliinat",
"es": "Nemo-verkkoliinat"
}
},
{
"cid": "118",
"crc_id": "4e04295f-44dc-473c-a3ad-158222a1fd1a",
"visible": "1",
"icon": false,
"image": false,
"image_name": false,
"image_url": "",
"parent_id": 0,
"catNumber": "5",
"category_name": {
"fi": "LOKUM",
"en_gb": "LOKUM",
"zh": "LOKUM",
"sv": "LOKUM",
"fa_ir": "LOKUM",
"th": "LOKUM",
"ru": "LOKUM",
"no": "LOKUM",
"bn": "LOKUM",
"ne": "LOKUM",
"da": "LOKUM",
"nl": "LOKUM",
"fr": "LOKUM",
"et": "LOKUM",
"de": "LOKUM",
"pl": "LOKUM",
"cs": "LOKUM",
"hr": "LOKUM",
"lt": "LOKUM",
"lv": "LOKUM",
"en_us": "LOKUM",
"vi": "LOKUM",
"es": "LOKUM"
}
},
{
"cid": "119",
"crc_id": "1380449b-248b-4951-add0-5fe0253a22db",
"visible": "1",
"icon": false,
"image": false,
"image_name": false,
"image_url": "",
"parent_id": 0,
"catNumber": "8",
"category_name": {
"fi": "MEHUT/NESTEET",
"en_gb": "MEHUT/NESTEET",
"zh": "MEHUT/NESTEET",
"sv": "MEHUT/NESTEET",
"fa_ir": "MEHUT/NESTEET",
"th": "MEHUT/NESTEET",
"ru": "MEHUT/NESTEET",
"no": "MEHUT/NESTEET",
"bn": "MEHUT/NESTEET",
"ne": "MEHUT/NESTEET",
"da": "MEHUT/NESTEET",
"nl": "MEHUT/NESTEET",
"fr": "MEHUT/NESTEET",
"et": "MEHUT/NESTEET",
"de": "MEHUT/NESTEET",
"pl": "MEHUT/NESTEET",
"cs": "MEHUT/NESTEET",
"hr": "MEHUT/NESTEET",
"lt": "MEHUT/NESTEET",
"lv": "MEHUT/NESTEET",
"en_us": "MEHUT/NESTEET",
"vi": "MEHUT/NESTEET",
"es": "MEHUT/NESTEET"
}
},
{
"cid": "122",
"crc_id": "1be0dd22-4a80-4071-8a74-a36e0ade3897",
"visible": "1",
"icon": false,
"image": false,
"image_name": false,
"image_url": "",
"parent_id": 0,
"catNumber": "10",
"category_name": {
"fi": "SHISHA TUOTTEET",
"en_gb": "SHISHA TUOTTEET",
"zh": "SHISHA TUOTTEET",
"sv": "SHISHA TUOTTEET",
"fa_ir": "SHISHA TUOTTEET",
"th": "SHISHA TUOTTEET",
"ru": "SHISHA TUOTTEET",
"no": "SHISHA TUOTTEET",
"bn": "SHISHA TUOTTEET",
"ne": "SHISHA TUOTTEET",
"da": "SHISHA TUOTTEET",
"nl": "SHISHA TUOTTEET",
"fr": "SHISHA TUOTTEET",
"et": "SHISHA TUOTTEET",
"de": "SHISHA TUOTTEET",
"pl": "SHISHA TUOTTEET",
"cs": "SHISHA TUOTTEET",
"hr": "SHISHA TUOTTEET",
"lt": "SHISHA TUOTTEET",
"lv": "SHISHA TUOTTEET",
"en_us": "SHISHA TUOTTEET",
"vi": "SHISHA TUOTTEET",
"es": "SHISHA TUOTTEET"
}
},
{
"cid": "123",
"crc_id": "6ca6e88a-c237-426a-a5f3-16c97d78500a",
"visible": "1",
"icon": false,
"image": false,
"image_name": false,
"image_url": "",
"parent_id": 0,
"catNumber": "9",
"category_name": {
"fi": "JUUSTOT",
"en_gb": "JUUSTOT",
"zh": "JUUSTOT",
"sv": "JUUSTOT",
"fa_ir": "JUUSTOT",
"th": "JUUSTOT",
"ru": "JUUSTOT",
"no": "JUUSTOT",
"bn": "JUUSTOT",
"ne": "JUUSTOT",
"da": "JUUSTOT",
"nl": "JUUSTOT",
"fr": "JUUSTOT",
"et": "JUUSTOT",
"de": "JUUSTOT",
"pl": "JUUSTOT",
"cs": "JUUSTOT",
"hr": "JUUSTOT",
"lt": "JUUSTOT",
"lv": "JUUSTOT",
"en_us": "JUUSTOT",
"vi": "JUUSTOT",
"es": "JUUSTOT"
}
},
{
"cid": "124",
"crc_id": "b2f12f44-b228-4242-ae6b-9db53ccd2ea5",
"visible": "1",
"icon": false,
"image": false,
"image_name": false,
"image_url": "",
"parent_id": 0,
"catNumber": "11",
"category_name": {
"fi": "HALWA",
"en_gb": "HALWA",
"zh": "HALWA",
"sv": "HALWA",
"fa_ir": "HALWA",
"th": "HALWA",
"ru": "HALWA",
"no": "HALWA",
"bn": "HALWA",
"ne": "HALWA",
"da": "HALWA",
"nl": "HALWA",
"fr": "HALWA",
"et": "HALWA",
"de": "HALWA",
"pl": "HALWA",
"cs": "HALWA",
"hr": "HALWA",
"lt": "HALWA",
"lv": "HALWA",
"en_us": "HALWA",
"vi": "HALWA",
"es": "HALWA"
}
},
],
}
By default, the image field returns false because the base64 image data is not fetched from the database — this significantly reduces response size and improves performance. Use image_url to display category images instead.
Default response (return_image_base64 not set or =0):
"image": false,
"image_name": "beer_123784216-2026-04-14-140555839.jpg",
"image_url": "https://example.com/uploads/category/beer_123784216-2026-04-14-140555839.jpg"
With base64 data (pass return_image_base64=1):
"image": "data:image/jpeg;base64,/9j/4AAQ...",
"image_name": "beer_123784216-2026-04-14-140555839.jpg",
"image_url": "https://example.com/uploads/category/beer_123784216-2026-04-14-140555839.jpg"
Here are the possible error messages and their meanings:
UN-AUTHORIZED - _user_name_password_is_set_but_wrong_value!: Incorrect username or password.this_account_does_not_exist_or_your_credentials_do_not_match_this_account: The account doesn't exist or mismatched credentials.UN-AUTHORIZED - header is set but the header value is not correct!: Incorrect authorization header value.Maximum query size is 50 rows per query: Exceeded maximum limit of 50 rows per query.