Appearance
Categories
Get all available product categories. Use category_id from amounts to filter or group products for display.
Endpoint: POST /international-bridge/categories
Request
bash
curl -X POST https://API-ENDPOINT/international-bridge/categories \
-H "Content-Type: application/json" \
-d '{
"auth": {
"id": 123,
"key": 1706360400000,
"hash": "a1b2c3d4e5f6..."
}
}'php
<?php
$url = 'https://API-ENDPOINT/international-bridge/categories';
$key = time() * 1000;
$data = [
'auth' => [
'id' => 123,
'key' => $key,
'hash' => md5(123 . $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();
const hash = md5(`123${token}${key}`);
const response = await fetch('https://API-ENDPOINT/international-bridge/categories', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
auth: { id: 123, key, hash }
})
});
const data = await response.json();
console.log(data);python
import requests
import hashlib
import time
url = 'https://API-ENDPOINT/international-bridge/categories'
key = int(time.time() * 1000)
hash_value = hashlib.md5(f"123{token}{key}".encode()).hexdigest()
response = requests.post(url, json={
'auth': {
'id': 123,
'key': key,
'hash': hash_value
}
})
print(response.json())Response
json
{
"categories": [
{ "id": "mobile", "parent_id": null, "name": "Mobile Recharge" },
{ "id": "utility", "parent_id": null, "name": "Utilities" },
{ "id": "gift-cards", "parent_id": null, "name": "Gift Cards & Games" },
{ "id": "transport", "parent_id": null, "name": "Transport" },
{ "id": "mobile-airtime", "parent_id": "mobile", "name": "Airtime / Calls" },
{ "id": "mobile-bundles", "parent_id": "mobile", "name": "Bundles & Plans" },
{ "id": "mobile-data", "parent_id": "mobile", "name": "Mobile Internet" },
{ "id": "utility-tv", "parent_id": "utility", "name": "Television" },
{ "id": "utility-internet", "parent_id": "utility", "name": "Internet" },
{ "id": "utility-electricity", "parent_id": "utility", "name": "Electricity" },
{ "id": "utility-water", "parent_id": "utility", "name": "Water" },
{ "id": "utility-gas", "parent_id": "utility", "name": "Gas" },
{ "id": "utility-landline", "parent_id": "utility", "name": "Landline" },
{ "id": "gift-cards-gaming", "parent_id": "gift-cards", "name": "Gaming" },
{ "id": "gift-cards-cash", "parent_id": "gift-cards", "name": "Money" },
{ "id": "gift-cards-entertainment", "parent_id": "gift-cards", "name": "Entertainment" },
{ "id": "gift-cards-retail", "parent_id": "gift-cards", "name": "Retail" },
{ "id": "gift-cards-food", "parent_id": "gift-cards", "name": "Food" },
{ "id": "gift-cards-transport", "parent_id": "gift-cards", "name": "Transport & Travel" }
]
}Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Category identifier (matches category_id in amount objects) |
parent_id | string | Parent category ID (null for root categories) |
name | string | Display name |
Category Hierarchy
Categories form a two-level tree:
| Root Category | Subcategories |
|---|---|
| Mobile Recharge | Airtime / Calls, Bundles & Plans, Mobile Internet |
| Utilities | Television, Internet, Electricity, Water, Gas, Landline |
| Gift Cards & Games | Gaming, Money, Entertainment, Retail, Food, Transport & Travel |
| Transport | (no subcategories) |
Usage
Each amount returned by the Provider endpoint includes a category_id field. Use this to group or filter products for display.