Knowledge Base
The Knowledge Base module provides access to the internal articles and categories used as a reference library within EstatePrime. Articles are organised into categories and may include attached files.
Objects
Category object
json
{
"id": 2,
"name": "Sales Process",
"description": "Guides and templates for managing property sales.",
"icon": "fe fe-briefcase",
"color": "#467fcf"
}- id (int): The system id of the category.
- name (string): The display name of the category.
- description (string, nullable): A short description of the category.
- icon (string): A CSS icon class used to display the category icon (e.g.,
fe fe-book). - color (string): A hex color code used to display the category accent (e.g.,
#6c5ffc).
Article object (list)
The list endpoint returns a trimmed version of each article without the full content or attached files:
json
{
"id": 18,
"title": "How to prepare a property for viewing",
"category_id": 2,
"created_by": 1,
"date_created": "2025-01-12 10:00:00",
"date_updated": "2025-02-20 09:30:00",
"views": 142
}Article object (single)
The single endpoint returns the full article including HTML content and attached files:
json
{
"id": 18,
"title": "How to prepare a property for viewing",
"content": "<p>Start by decluttering each room...</p>",
"category_id": 2,
"category_name": "Sales Process",
"created_by": 1,
"date_created": "2025-01-12 10:00:00",
"date_updated": "2025-02-20 09:30:00",
"views": 142,
"files": [
{
"id": 5,
"original_name": "viewing-checklist.pdf",
"mime_type": "application/pdf",
"size": 102400,
"url": "https://files.example.com/kb/a3f9c1d2e.pdf",
"date_created": "2025-01-12 10:05:00"
}
]
}Article fields:
- id (int): The system id of the article.
- title (string): The article title.
- content (string, nullable): The full article body in HTML format. Only returned by the single endpoint.
- category_id (int): The ID of the category this article belongs to.
- category_name (string): The name of the category. Only returned by the single endpoint.
- created_by (int): The user ID of the user who created the article.
- date_created (string): The date and time the article was created in
YYYY-MM-DD HH:MM:SSformat. - date_updated (string, nullable): The date and time the article was last updated, or
nullif never updated. - views (int): The number of times this article has been viewed.
- files (array of objects): Attached files. Only returned by the single endpoint. Each object includes:
- id (int): The system id of the file attachment.
- original_name (string): The original filename as uploaded.
- mime_type (string, nullable): The MIME type of the file (e.g.,
application/pdf,image/png). - size (int): The file size in bytes.
- url (string): The full URL to download the file.
- date_created (string): The date and time the file was attached in
YYYY-MM-DD HH:MM:SSformat.
Get articles
/api/knowledge-base/articles (GET)
Fetch a paginated list of articles (without full content or files).
Request
- Method:
GET - Headers: Include authentication headers as described in the Authentication section.
- Body: JSON object with the following optional parameters:
page(int): The page number to fetch. Defaults to1.category_id(int): Filter by category ID.search(string): Filter by article title (partial match).date_created(object): Filter by creation date range. Must include:min(string): The minimum date inYYYY-MM-DD HH:MM:SSformat, ornullfor no lower limit.max(string): The maximum date inYYYY-MM-DD HH:MM:SSformat, ornullfor no upper limit.
Example Body
json
{
"page": 1,
"category_id": 2,
"search": "viewing"
}Response
- 200 OK: Returns a JSON array of article list objects.
Example Response
json
{
"status": 200,
"page": 1,
"total_pages": 2,
"results_per_page": 50,
"total_results": 54,
"data": [
{
"id": 18,
"title": "How to prepare a property for viewing",
"category_id": 2,
"created_by": 1,
"date_created": "2025-01-12 10:00:00",
"date_updated": "2025-02-20 09:30:00",
"views": 142
}
//Rest of the data...
]
}Get single article
/api/knowledge-base/articles/{id} (GET)
Get a single article by its id, including full content and attached files.
Request
- Method:
GET - Headers: Include authentication headers.
- Path Params: The article id to be fetched.
Example Response
json
{
"status": 200,
"data": {
"id": 18,
"title": "How to prepare a property for viewing",
"content": "<p>Start by decluttering each room...</p>",
"category_id": 2,
"category_name": "Sales Process",
"created_by": 1,
"date_created": "2025-01-12 10:00:00",
"date_updated": "2025-02-20 09:30:00",
"views": 142,
"files": [
{
"id": 5,
"original_name": "viewing-checklist.pdf",
"mime_type": "application/pdf",
"size": 102400,
"url": "https://files.example.com/kb/a3f9c1d2e.pdf",
"date_created": "2025-01-12 10:05:00"
}
]
}
}Response
- 200 OK: Returns the full JSON object of the article.
Get categories
/api/knowledge-base/categories (GET)
Fetch the list of all active knowledge base categories.
Request
- Method:
GET - Headers: Include authentication headers.
Response
- 200 OK: Returns a JSON array of category objects.
Example Response
json
{
"status": 200,
"data": [
{
"id": 1,
"name": "Getting Started",
"description": "Introductory guides for new agents.",
"icon": "fe fe-book",
"color": "#6c5ffc"
},
{
"id": 2,
"name": "Sales Process",
"description": "Guides and templates for managing property sales.",
"icon": "fe fe-briefcase",
"color": "#467fcf"
}
]
}Get single category
/api/knowledge-base/categories/{id} (GET)
Get a single category by its id.
Request
- Method:
GET - Headers: Include authentication headers.
- Path Params: The category id to be fetched.
Example Response
json
{
"status": 200,
"data": {
"id": 2,
"name": "Sales Process",
"description": "Guides and templates for managing property sales.",
"icon": "fe fe-briefcase",
"color": "#467fcf"
}
}Response
- 200 OK: Returns the JSON object of the category.

