GizChatbot API Documentation
This documentation provides comprehensive information about the GizChatbot API endpoints, including usage instructions, required parameters, and expected responses.
Postman Collection
To simplify integration and testing, you can import our Postman collection:
Download GizChatbot Postman Collection
Or, import it directly into Postman using the following URL:
https://financeadviceiq.com/gizchatbot.postman_collection.json
Base URL
https://financeadviceiq.com/api.php
Authentication
All API requests must include an Authorization header with a valid API token. The token must match the platform's API key stored in the database.
Authorization Header:
Authorization: Bearer YOUR_API_TOKEN
API Endpoints
1. Process Message
Endpoint: POST /api.php?action=process
Description: Processes a user's message, retrieves an appropriate response, and logs the interaction.
Parameters
message
(string, required) - The user's message to process.chat_id
(string, optional) - An identifier for the user or chat session.platform
(string, required) - The platform name (e.g., "WEBSITE").
Request Example
POST /api.php?action=process HTTP/1.1
Host: financeadviceiq.com
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/x-www-form-urlencoded
message=مرحبا&platform=WEBSITE&chat_id=274234329
Response Example
{
"reply": "أهلاً بك! كيف يمكنني مساعدتك؟",
"chat_log_id": "1139"
}
Error Responses
- 400 Bad Request - Missing required parameters.
- 401 Unauthorized - Missing or invalid Authorization token.
- 500 Internal Server Error - Server error processing the message.
2. Fetch Start Bot Nodes
Endpoint: GET /api.php?action=start_bot
Description: Retrieves start bot nodes for navigation purposes.
Parameters
platform
(string, required) - The platform name (e.g., "WEBSITE").parent_id
(integer, optional) - The ID of the parent node (default is 0 for root nodes).
Request Example
GET /api.php?action=start_bot&platform=WEBSITE&parent_id=0 HTTP/1.1
Host: financeadviceiq.com
Authorization: Bearer YOUR_API_TOKEN
Response Example
[
{
"id": 259,
"name": "الخدمـات المالية الرقمية",
"parent_id": 0,
"is_last_node": false
},
{
"id": 282,
"name": "الميزانية",
"parent_id": 0,
"is_last_node": false
},
{
"id": 345,
"name": "الادخار",
"parent_id": 0,
"is_last_node": false
},
{
"id": 346,
"name": "الاستثمار",
"parent_id": 0,
"is_last_node": false
},
{
"id": 347,
"name": "الاقتراض",
"parent_id": 0,
"is_last_node": false
},
{
"id": 349,
"name": "المحافظ الالكترونية",
"parent_id": 0,
"is_last_node": false
},
{
"id": 350,
"name": "أجهزة نقاط البيع",
"parent_id": 0,
"is_last_node": false
},
{
"id": 351,
"name": "التحويلات المالية",
"parent_id": 0,
"is_last_node": false
},
{
"id": 352,
"name": "التأمين",
"parent_id": 0,
"is_last_node": false
},
{
"id": 354,
"name": "التمويل الأخضر",
"parent_id": 0,
"is_last_node": false
},
{
"id": 355,
"name": "الاحتيال المالي",
"parent_id": 0,
"is_last_node": false
}
]
Error Responses
- 400 Bad Request - Missing required parameters.
- 401 Unauthorized - Missing or invalid Authorization token.
- 500 Internal Server Error - Server error fetching start bot nodes.
3. Fetch Help Topics
Endpoint: GET /api.php?action=help_topics
Description: Retrieves a list of help topics to assist the user.
Parameters
platform
(string, required) - The platform name (e.g., "WEBSITE").
Request Example
GET /api.php?action=help_topics&platform=WEBSITE HTTP/1.1
Host: financeadviceiq.com
Authorization: Bearer YOUR_API_TOKEN
Response Example
[
"أنواع الاحتيال المالي الإلكتروني؟",
"ما هو الدفع الإلكتروني؟",
"تطوير البنية التحتية المستدامة؟",
"نماذج عن مشاريع عالمية للتمويل الأخضر؟",
"كيف يتم إعداد الميزانية؟",
"ما هي القروض؟",
"التمويل الأخضر وإدارة المياه؟",
"التحالف العالمي للبنوك مع التمويل الأخضر (GABV)؟"
]
Error Responses
- 400 Bad Request - Missing required parameters.
- 401 Unauthorized - Missing or invalid Authorization token.
- 500 Internal Server Error - Server error fetching help topics.
Error Handling
All error responses will include an error
field with a descriptive message.
Error Response Example
{
"error": "Platform parameter missing"
}
Notes
- Ensure that you replace
YOUR_API_TOKEN
with the actual token provided to you. - The API expects parameters to be sent via GET or POST methods, depending on the endpoint.
- All responses are in JSON format.
- For text content, the API currently supports the Arabic language.
- Import the Postman collection to streamline your API testing and integration process.