Appearance
Frontview
Get the frontview configured for your Point of Sale. Frontview is a UI hierarchy that groups categories, products, and navigation items for display in your application.
Use pos.frontview_id from /point_info as frontview_id in this request. For product elements, content_id is the service ID from /services and should be used as product in transaction requests.
Endpoint: POST /frontview
Request
bash
curl -X POST https://API-ENDPOINT/frontview \
-H "Content-Type: application/json" \
-d '{
"frontview_id": "69f393a3ebd85",
"auth": {
"id": "21001",
"key": "177757256348500",
"hash": "2effa39516fc86f3eb1fd894152429c1"
}
}'php
<?php
$url = 'https://API-ENDPOINT/frontview';
$key = (string) (time() * 1000);
$data = [
'frontview_id' => '69f393a3ebd85',
'auth' => [
'id' => '21001',
'key' => $key,
'hash' => md5('21001' . $token . $key)
]
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result);javascript
const key = Date.now().toString();
const response = await fetch('https://API-ENDPOINT/frontview', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
frontview_id: '69f393a3ebd85',
auth: {
id: '21001',
key,
hash: md5(`21001${token}${key}`)
}
})
});
const data = await response.json();
console.log(data);python
import hashlib
import time
import requests
url = 'https://API-ENDPOINT/frontview'
key = str(int(time.time() * 1000))
hash_value = hashlib.md5(f"21001{token}{key}".encode()).hexdigest()
response = requests.post(url, json={
'frontview_id': '69f393a3ebd85',
'auth': {
'id': '21001',
'key': key,
'hash': hash_value
}
})
print(response.json())Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
frontview_id | string | Yes | Frontview ID from /point_info response field pos.frontview_id |
auth | object | Yes | Standard authentication object |
Response
json
{
"elements": [
{
"id": 24079,
"parent_id": null,
"type": "category",
"alias": "",
"name": "Games & Gifts",
"active": 1,
"image_large": "https://url-to-file/24079_large.png",
"image_small": null,
"action": "",
"params": [],
"content_id": ""
},
{
"id": 24080,
"parent_id": 24079,
"type": "category",
"alias": "game-pubg",
"name": "PUBG Mobile",
"active": 1,
"image_large": "https://url-to-file/24080_large.jpg",
"image_small": "https://url-to-file/24080_small.jpg",
"action": "",
"params": [],
"content_id": ""
},
{
"id": 24081,
"parent_id": 24080,
"type": "product",
"alias": "",
"name": "PUBG Mobile<br>325 UC<br>Redeem Code",
"active": 1,
"image_large": null,
"image_small": null,
"action": "",
"params": [],
"content_id": "pubg_mobile_20_aed"
},
{
"id": 24435,
"parent_id": 24398,
"type": "other",
"alias": "",
"name": "Etisalat",
"active": 1,
"image_large": "https://url-to-file/24435_large.png",
"image_small": "https://url-to-file/24435_small.png",
"action": "gotoCategory",
"params": { "target_alias": "mobile_etisalat" },
"content_id": ""
},
{
"id": 24439,
"parent_id": 24438,
"type": "other",
"alias": "international",
"name": "international",
"active": 1,
"image_large": "https://url-to-file/24439_large.gif",
"image_small": "https://url-to-file/24439_small.png",
"action": "international",
"params": { "product_slug": "intl2" },
"content_id": ""
}
]
}Response Fields
| Field | Type | Description |
|---|---|---|
elements | array | Flat list of frontview elements. Build the UI hierarchy using id and parent_id. |
Element Fields
| Field | Type | Description |
|---|---|---|
id | integer | Unique frontview element ID |
parent_id | integer/null | Parent element ID. null means a root-level element. |
type | string | Element type: category, product, or other |
alias | string | Optional alias for navigation inside the same frontview |
name | string | Display name. May contain <br> line breaks. |
active | integer | 1 means active. Hide or disable inactive elements. |
image_large | string/null | Large image path for detail views, category banners, or large tiles |
image_small | string/null | Small image path for icons, thumbnails, or compact tiles |
action | string | Action to execute when the element is selected |
params | object/array | Parameters for action, or an empty array when there are no parameters |
content_id | string | Service ID from /services for product elements. Empty for non-product elements. |
Rendering Hierarchy
Frontview returns a flat elements array. Build the tree on the client side:
- Index elements by
id. - Treat elements with
parent_id: nullas root nodes. - Attach each element with a non-null
parent_idto the matching parent. - Preserve the API order for siblings unless your UI has its own ordering rule.
- Render
image_smallfor compact lists andimage_largefor large tiles or detail screens when present.
For type: "category", open or display its child elements. For type: "product", use content_id as the service ID from /services and continue with the relevant transaction flow.
Actions
| Action | When to use | Parameters |
|---|---|---|
Empty string ("") | Default behavior. Categories open their children; products start the transaction flow using content_id. | No action-specific parameters. params.warning may be displayed to the customer when present. |
gotoCategory | Navigate to another category or element inside the same frontview. | target_alias - alias of the destination element. |
gotoPage | Open an application page handled by your integration. | page - page identifier. params - page-specific payload, often a JSON string with encoded request parameters. |
international | Start the International Bridge wizard. The wizard should use the /international-bridge discovery and transaction endpoints. | product_slug - product slug returned by the API. country - optional ISO 3-letter country code. group - optional country group key. |
TIP
When params.target_alias is returned, resolve it against element aliases in the same frontview and navigate to that element.