Inventory & Products | Products | Tags | Get Product Tags

Getting Product Tags Data

This document outlines the procedure for making API calls to retrieve product tags data from https://easycms.fi/public_api/get_product_tags/. Utilize various parameters to filter and customize your data retrieval.

Product Tags Data Retrieval

Fetch product tags 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.

Endpoint and Method

  • Endpoint: https://easycms.fi/public_api/get_product_tags/
  • Method: POST



Parameters | Payload

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 tags at a time.

  • Parameters:

    • start - Specify the starting point of the row from which to begin fetching tags.
    • limit - Control the number of tags 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 tags at a time.

  • IN - For filtering by tag IDs (optional, array or single integer).

  • NOT_IN - For excluding specific tag IDs (optional, array or single integer).

  • products_tags_id - Get a specific tag by ID (optional, integer).

  • products_tags_id[] - For filtering by multiple tag IDs (optional, array of integers).

  • search - Search keyword (optional, string). Performs a partial (LIKE) match across multiple product tag 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: products_tags_name, products_tags_number, products_tags_id, crproducts_tags_id
  • visible - Filter by visibility status (optional, 1=visible, 0=hidden). To include hidden product tags in the response, use show_invisible=1 instead.

  • show_invisible: Set to 1 to include product tags with visible=0 (hidden) in the response. By default, only visible product tags (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.



Understanding Product Tag Search

The search parameter enables broad keyword matching across all relevant columns of the product tag record. This is useful for:

  • Quick lookup: Find a tag by partial name (searches across all language variants stored in products_tags_name).
  • Number search: Find tags by their number (products_tags_number) or ID (products_tags_id).
  • UUID search: Look up tags by their CRC ID (crproducts_tags_id).
  • Multi-word search: Use spaces to narrow results — e.g., search=Fundis+Pro will only return tags where one word matches "Fundis" AND another matches "Pro" 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.



Call Examples in Different Languages


# Get all product tags (default: first 50, visible only)
curl -X POST 'https://easycms.fi/public_api/get_product_tags' \
-H 'Authorization1: TOKEN' \
-d 'username=USERNAME&password=PASSWORD&account=ACCOUNT_ID'

# Search product tags by keyword (matches products_tags_name, products_tags_number, etc.)
curl -X POST 'https://easycms.fi/public_api/get_product_tags' \
-H 'Authorization1: TOKEN' \
-d 'username=USERNAME&password=PASSWORD&account=ACCOUNT_ID&search=Fundis'

# Search product tags by multiple keywords (AND logic)
curl -X POST 'https://easycms.fi/public_api/get_product_tags' \
-H 'Authorization1: TOKEN' \
-d 'username=USERNAME&password=PASSWORD&account=ACCOUNT_ID&search=Fundis+Pro'

$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => "https://easycms.fi/public_api/get_product_tags",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_POST => true,
  CURLOPT_POSTFIELDS => http_build_query(['username' => 'USERNAME', 'password' => 'PASSWORD', 'account' => 'ACCOUNT_ID', 'search' => 'Fundis']),
  CURLOPT_HTTPHEADER => array("Authorization1: TOKEN"),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;

import requests
url = "https://easycms.fi/public_api/get_product_tags"
headers = {"Authorization1": "TOKEN"}
payload = {'username': 'USERNAME', 'password': 'PASSWORD', 'account': 'ACCOUNT_ID', 'search': 'Fundis'}
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_product_tags"))
    .headers("Authorization1", "TOKEN")
    .POST(HttpRequest.BodyPublishers.ofString("username=USERNAME&password=PASSWORD&account=ACCOUNT_ID&search=Fundis"))
    .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: 'Fundis'
}).toString();
const options = {
  hostname: 'prolasku.fi',
  path: '/public_api/get_product_tags',
  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 [tagsData, setTagsData] = useState('');
  useEffect(() => {
    const fetchData = async () => {
      try {
        const response = await fetch('https://easycms.fi/public_api/get_product_tags', {
          method: 'POST',
          headers: {'Authorization1': 'TOKEN', 'Content-Type': 'application/x-www-form-urlencoded'},
          body: new URLSearchParams({username: 'USERNAME', password: 'PASSWORD', account: 'ACCOUNT_ID', search: 'Fundis'}).toString()
        });
        const data = await response.text();
        setTagsData(data);
      } catch (error) {
        console.error(error);
      }
    };
    fetchData();
  }, []);
  return (
{tagsData}
); } 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", "Fundis")
        .build()

    val request = Request.Builder()
        .url("https://easycms.fi/public_api/get_product_tags")
        .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", "Fundis")
        });
        using (var httpClient = new HttpClient())
        {
            httpClient.DefaultRequestHeaders.Add("Authorization1", token);
            var response = await httpClient.PostAsync("https://easycms.fi/public_api/get_product_tags", content);
            if (response.IsSuccessStatusCode)
            {
                var responseData = await response.Content.ReadAsStringAsync();
                Console.WriteLine(responseData);
            }
            else
            {
                Console.WriteLine($"Error: {response.StatusCode}");
            }
        }
    }
}

Filter Examples

Filter by Visibility (Only Visible Tags)

curl -X POST 'https://easycms.fi/public_api/get_product_tags' \
-H 'Authorization1: TOKEN' \
-d 'username=USERNAME&password=PASSWORD&account=ACCOUNT_ID&visible=1'

Filter by Tag ID

curl -X POST 'https://easycms.fi/public_api/get_product_tags' \
-H 'Authorization1: TOKEN' \
-d 'username=USERNAME&password=PASSWORD&account=ACCOUNT_ID&products_tags_id=5'

Filter by Multiple Tag IDs

curl -X POST 'https://easycms.fi/public_api/get_product_tags' \
-H 'Authorization1: TOKEN' \
-d 'username=USERNAME&password=PASSWORD&account=ACCOUNT_ID&IN[]=1&IN[]=2&IN[]=3'

Handling Endpoint Results

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:


- `products_tags_id`: Tag ID - This is the unique identifier for the tag.
- `crproducts_tags_id`: CRP Tag ID - This is a unique UUID identifier associated with the tag.
- `products_tags_number`: Tag Number - A numerical identifier for the tag.
- `products_tags_name`: Tag Names - An object containing tag names in different languages.
  - `fi`: Tag name in Finnish.
  - `en_gb`: Tag name in English (Great Britain).
  - `sv`: Tag name in Swedish.
  - `es`: Tag name in Spanish.
- `visible`: Visibility Status - Indicates whether the tag is visible (1) or not (0).
- `parent_id`: Parent Tag ID - If applicable, this is the ID of the parent tag (0 = no parent).
- `default_value`: Default Value - Indicates if this is a default tag (1=yes, 0=no).
- `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/png;base64,...`). Returns `false` if no image is uploaded.
- `image_name`: Image Filename - The filename of the uploaded tag image (e.g. `fundis-2026-03-27-014849398.png`). Returns `false` if no image is uploaded.
- `image_url`: Image URL - The full URL to the tag image file on the server (e.g. `https://example.com/uploads/products_tags/fundis-2026-03-27-014849398.png`). Returns an empty string if no image is uploaded. Use this for displaying images directly without embedding base64 data.

These key-value pairs provide comprehensive information about the product tags and can be used for various purposes in your application.
    

{
    "INFO": {
        "total_count": 3,
        "count": 3,
        "start": 0,
        "limit": 50
    },
    "OUTPUT": {
        "response_type": "success",
        "message": "Data returned successfully",
        "0": {
            "products_tags_id": "1",
            "crproducts_tags_id": "",
            "products_tags_number": "2",
            "products_tags_name": {
                "fi_FI": "Fundis",
                "en_GB": "Fundis",
                "sv_SE": "Fundis",
                "zh": "Fundis"
            },
            "image": false,
            "image_name": "fundis-2026-03-27-014849398.png",
            "image_url": "https://example.com/uploads/products_tags/fundis-2026-03-27-014849398.png",
            "parent_id": "0",
            "visible": "1",
            "default_value": "1"
        },
        "1": {
            "products_tags_id": "2",
            "crproducts_tags_id": "",
            "products_tags_number": "1",
            "products_tags_name": {
                "fi_FI": "ProLasku",
                "en_GB": "ProLasku",
                "sv_SE": "ProLasku",
                "zh": "ProLasku"
            },
            "image": false,
            "image_name": "favicon-2026-03-27-113428280.png",
            "image_url": "https://example.com/uploads/products_tags/favicon-2026-03-27-113428280.png",
            "parent_id": "0",
            "visible": "1",
            "default_value": "0"
        }
    }
}
    

Image Data and Performance

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 tag images instead.

Default response (return_image_base64 not set or =0):

"image": false,
"image_name": "fundis-2026-03-27-014849398.png",
"image_url": "https://example.com/uploads/products_tags/fundis-2026-03-27-014849398.png"

With base64 data (pass return_image_base64=1):

"image": "data:image/png;base64,iVBORw0...",
"image_name": "fundis-2026-03-27-014849398.png",
"image_url": "https://example.com/uploads/products_tags/fundis-2026-03-27-014849398.png"

Error Handling

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.