This document outlines the procedure for making API calls to retrieve auxiliary (add-on) products via https://easycms.fi/public_api/get_product_auxiliaries/.
is_auxiliary = 1, hidden from the normal catalog) OR a carrier of auxiliaries — never bothPOST or GET| Mode | Trigger | Returns |
|---|---|---|
| Product | pid given |
The carrier product's assignment rows (one per assigned auxiliary product, with price/vat/discount/barcode/images) |
| Catalog | pid omitted |
Every product flagged is_auxiliary = 1 — the pool the CMS picker offers |
https://easycms.fi/public_api/get_product_auxiliaries/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 | Required | Description |
|---|---|---|---|
pid |
integer | No | Carrier Product ID — switches to product mode |
start |
integer | No | Pagination start (default 0) |
limit |
integer | No | Page size (default 50, max 50) |
{
"INFO": { "mode": "product", "pid": 25327, "start": 0, "limit": 50, "count": 2, "total_count": 2 },
"PRODUCT": { "pid": 25327, "is_auxiliary": 0, "is_carrier": true },
"OUTPUT": [
{
"pid": 25344,
"prdNumber": "9900000000123",
"product_name": "Extra cheese",
"product_name_ml": { "en_gb": "Extra cheese", "fi": "Extra juusto" },
"price": 1.0,
"vat": 14.0,
"discount": 0,
"barcode": "EXTRACHEESE01",
"images": ""
},
{ "pid": 25345, "prdNumber": "9900000000124", "product_name": "Garlic sauce", "product_name_ml": null, "price": 0.8, "vat": 14.0, "discount": 0, "barcode": "GARLIC01", "images": "" }
],
"success": true,
"message": "Data returned successfully"
}
PRODUCT.is_carrier — true when the product has at least one assignmentOUTPUT[].price / vat / discount — the auxiliary product's own fields (what the add-on costs)OUTPUT[].product_name — resolved display name; product_name_ml carries the raw {lang_code: name} map when the product's name is multilingual (null when single-language) — resolve other languages client-sideSame OUTPUT row shape; INFO.mode is catalog and there is no PRODUCT block. Paginate with start/limit.
| error / message | When |
|---|---|
product_not_found_or_not_visible |
pid unknown, deleted, or hidden from this API channel |
pid_must_be_a_valid_positive_integer |
non-numeric pid |
maximum_query_size_is_50_rows_per_query |
limit over 50 |
NOT AUTHORIZED! |
authentication failed |
# A product's add-on offer list
curl -X POST 'https://easycms.fi/public_api/get_product_auxiliaries' \
-H 'Authorization1: TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"username": "USERNAME",
"password": "PASSWORD",
"account": "ACCOUNT_ID",
"pid": 25327
}'
# The tenant's auxiliary catalog (first page)
curl -X POST 'https://easycms.fi/public_api/get_product_auxiliaries' \
-H 'Authorization1: TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"username": "USERNAME",
"password": "PASSWORD",
"account": "ACCOUNT_ID",
"start": 0,
"limit": 50
}'
$ch = curl_init('https://easycms.fi/public_api/get_product_auxiliaries');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization1: TOKEN', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'username' => 'USERNAME',
'password' => 'PASSWORD',
'account' => 'ACCOUNT_ID',
'pid' => 25327
])
]);
$response = json_decode(curl_exec($ch), true);
foreach ($response['OUTPUT'] as $addon) {
// $addon['pid'], $addon['product_name'], $addon['price'], ...
}
const res = await fetch('https://easycms.fi/public_api/get_product_auxiliaries', {
method: 'POST',
headers: { 'Authorization1': 'TOKEN', 'Content-Type': 'application/json' },
body: JSON.stringify({
username: 'USERNAME', password: 'PASSWORD',
account: 'ACCOUNT_ID', pid: 25327
})
});
const data = await res.json();
// data.PRODUCT.is_carrier, data.OUTPUT[] -> the add-on tiles
val body = """{"username":"USERNAME","password":"PASSWORD",
"account":"ACCOUNT_ID","pid":25327}"""
val req = Request.Builder()
.url("https://easycms.fi/public_api/get_product_auxiliaries")
.header("Authorization1", "TOKEN")
.post(body.toRequestBody("application/json".toMediaType()))
.build()
val data = JSONObject(client.newCall(req).execute().body!!.string())
val addons = data.getJSONArray("OUTPUT")