Notices API
Manage notifications and announcements from the KRA eTIMS/VSCU system.
Overview
The Notices API allows you to retrieve and manage notifications from KRA, including system maintenance announcements, policy updates, and compliance alerts.
List Notices
Get all notices for a branch.
/api/v1/noticesList Notices
Retrieve all notices for a branch with optional filtering by read status.
bhf_id*Branch identifier
is_readFilter by read status
per_pageResults per page (max 100, default 20)
Response
Status: 200 OK
{
"status": "success",
"data": [
{
"id": 1,
"noticeNo": "NOT-2024-001",
"title": "System Maintenance Notice",
"content": "VSCU system will undergo maintenance...",
"dtlUrl": "https://etims.kra.go.ke/notices/123",
"regrDt": "2024-01-15T10:00:00Z",
"noticeType": "01",
"is_read": false,
"read_at": null
}
],
"meta": {
"current_page": 1,
"per_page": 20,
"total": 45,
"last_page": 3,
"timestamp": "2024-01-15T14:30:00Z"
}
}Sync Notices
Fetch new notices from KRA eTIMS/VSCU.
/api/v1/notices/syncSync Notices
Fetch new notices from KRA eTIMS/VSCU system and store them locally.
Field Descriptions
| Field | Type | Required | Description |
|---|---|---|---|
bhf_id | string | Yes | Branch identifier |
last_req_dt | string | No | Last request date (YYYYMMDDHHMMSS format, default: 20180520000000) |
Response
Status: 200 OK
{
"status": "success",
"message": "Notices synced successfully",
"data": {
"synced": 3
}
}Get Notice Details
Retrieve a specific notice.
/api/v1/notices/{id}Get Notice Details
Retrieve detailed information about a specific notice.
id*Notice ID
Response
Status: 200 OK
{
"status": "success",
"data": {
"id": 1,
"noticeNo": "NOT-2024-001",
"title": "System Maintenance Notice",
"content": "VSCU system will undergo maintenance on January 20, 2024 from 2:00 AM to 6:00 AM EAT...",
"dtlUrl": "https://etims.kra.go.ke/notices/123",
"regrDt": "2024-01-15T10:00:00Z",
"noticeType": "01",
"is_read": false,
"read_at": null,
"raw_data": {...}
}
}Mark Notice as Read
Mark a notice as read.
/api/v1/notices/{id}/readMark Notice as Read
Mark a specific notice as read.
id*Notice ID
Response
Status: 200 OK
{
"status": "success",
"message": "Notice marked as read",
"data": {
"id": 1,
"is_read": true,
"read_at": "2024-01-15T14:30:00Z"
}
}Get Unread Count
Get count of unread notices.
/api/v1/notices/unread/countGet Unread Count
Get the count of unread notices for a branch or all branches.
bhf_idFilter by specific branch (omit for all branches)
Response
Status: 200 OK
{
"status": "success",
"data": {
"unread_count": 3
}
}Notice Types
| Code | Description |
|---|---|
01 | System Maintenance |
02 | Policy Update |
03 | Compliance Alert |
04 | General Information |
Code Examples
JavaScript
const axios = require('axios');
const apiKey = process.env.CTAX_API_KEY;
const baseURL = 'https://c-tax.1809ltd.co.ke/api/v1';
// Sync notices from VSCU
const syncResponse = await axios.post(`${baseURL}/notices/sync`, {
bhf_id: '00',
last_req_dt: '20240101000000'
}, {
headers: { Authorization: `Bearer ${apiKey}` }
});
console.log(`Synced ${syncResponse.data.data.synced} notices`);
// Get unread count
const countResponse = await axios.get(`${baseURL}/notices/unread/count?bhf_id=00`, {
headers: { Authorization: `Bearer ${apiKey}` }
});
console.log(`Unread notices: ${countResponse.data.data.unread_count}`);
// Mark as read
await axios.post(`${baseURL}/notices/${noticeId}/read`, {}, {
headers: { Authorization: `Bearer ${apiKey}` }
});PHP
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://c-tax.1809ltd.co.ke/api/v1/',
'headers' => [
'Authorization' => 'Bearer ' . env('CTAX_API_KEY'),
'Content-Type' => 'application/json',
],
]);
// Sync notices from VSCU
$response = $client->post('notices/sync', [
'json' => [
'bhf_id' => '00',
'last_req_dt' => '20240101000000',
],
]);
$result = json_decode($response->getBody(), true);
echo "Synced {$result['data']['synced']} notices\n";
// Get unread count
$count = $client->get('notices/unread/count?bhf_id=00');
$countData = json_decode($count->getBody(), true);
echo "Unread: {$countData['data']['unread_count']}\n";
// Mark as read
$client->post('notices/1/read');Python
import requests
import os
api_key = os.environ['CTAX_API_KEY']
base_url = 'https://c-tax.1809ltd.co.ke/api/v1'
headers = {'Authorization': f'Bearer {api_key}'}
# Sync notices
response = requests.post(
f'{base_url}/notices/sync',
json={'bhf_id': '00', 'last_req_dt': '20240101000000'},
headers=headers
)
print(f"Synced {response.json()['data']['synced']} notices")
# Get unread count
count = requests.get(
f'{base_url}/notices/unread/count?bhf_id=00',
headers=headers
)
print(f"Unread: {count.json()['data']['unread_count']}")
# Mark as read
requests.post(f'{base_url}/notices/1/read', headers=headers)Best Practices
- Regular Syncing - Sync notices daily or on application startup
- User Notifications - Alert users about unread notices
- Store Last Sync Date - Track last sync to avoid duplicate fetches
- Mark as Read - Mark notices as read after user views them
- Display Prominently - Show important notices in dashboard
Related Endpoints
- Branches API - Manage branches
- Devices API - Configure VSCU devices
- Codes API - Sync reference data from KRA